LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/thread.cpp
// Function: ThreadsManager::init()
void ThreadsManager::init() {

  int threadID[MAX_THREADS];

  // This flag is needed to properly end the threads when program exits
  allThreadsShouldExit = false;

  // Threads will sent to sleep as soon as created, only main thread is kept alive
  activeThreads = 1;
  threads[0].state = Thread::SEARCHING;

  // Allocate pawn and material hash tables for main thread
  init_hash_tables();

  lock_init(&mpLock);

  // Initialize thread and split point locks
  for (int i = 0; i < MAX_THREADS; i++)
  {
      lock_init(&threads[i].sleepLock);
      cond_init(&threads[i].sleepCond);

      for (int j = 0; j < MAX_ACTIVE_SPLIT_POINTS; j++)
          lock_init(&(threads[i].splitPoints[j].lock));
  }

  // Create and startup all the threads but the main that is already running
  for (int i = 1; i < MAX_THREADS; i++)
  {
      threads[i].state = Thread::INITIALIZING;
      threadID[i] = i;

#if defined(_MSC_VER)
      bool ok = (CreateThread(NULL, 0, start_routine, (LPVOID)&threadID[i], 0, NULL) != NULL);
#else
      pthread_t pthreadID;
      bool ok = (pthread_create(&pthreadID, NULL, start_routine, (void*)&threadID[i]) == 0);
      pthread_detach(pthreadID);
#endif
      if (!ok)
      {
          std::cout << "Failed to create thread number " << i << std::endl;
          ::exit(EXIT_FAILURE);
      }

      // Wait until the thread has finished launching and is gone to sleep
      while (threads[i].state == Thread::INITIALIZING) {}
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
movb $0x0, 0x38(%rdi)
movl $0x1, %eax
movl %eax, 0x34(%rdi)
leaq 0x40(%rdi), %r12
movl %eax, 0xc8(%rdi)
callq 0x291d0
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5600
imulq $0x560, %r14, %r15      # imm = 0x560
leaq (%r12,%r15), %rdi
addq $0x30, %rdi
xorl %esi, %esi
callq 0x5600
leaq (%r12,%r15), %rdi
addq $0x58, %rdi
xorl %esi, %esi
callq 0x54d0
movl $0x118, %r15d           # imm = 0x118
leaq (%rbx,%r15), %rdi
xorl %esi, %esi
callq 0x5600
addq $0x98, %r15
cmpq $0x5d8, %r15            # imm = 0x5D8
jne 0x29101
incq %r14
addq $0x560, %rbx            # imm = 0x560
cmpq $0x20, %r14
jne 0x290d6
movl $0x1, %ebx
leaq -0x2c4(%rip), %r14      # 0x28e74
leaq 0x8(%rsp), %r15
imulq $0x560, %rbx, %r13      # imm = 0x560
movl $0x0, 0x88(%r12,%r13)
leaq (%rsp,%rbx,4), %rcx
addq $0x10, %rcx
movl %ebx, (%rcx)
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x57d0
movl %eax, %ebp
movq 0x8(%rsp), %rdi
callq 0x52b0
testl %ebp, %ebp
jne 0x291a1
leaq (%r12,%r13), %rax
addq $0x88, %rax
cmpl $0x0, (%rax)
je 0x29181
incq %rbx
cmpq $0x20, %rbx
jne 0x2913d
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x12df8(%rip), %rdi     # 0x3bfa0
leaq 0x9376(%rip), %rsi      # 0x32525
callq 0x53d0
movq %rax, %rdi
movl %ebx, %esi
callq 0x5760
movq %rax, %rdi
callq 0x51c0
movl $0x1, %edi
callq 0x54e0
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/thread.cpp
// Function: ThreadsManager::exit()
void ThreadsManager::exit() {

  // Force the woken up threads to exit idle_loop() and hence terminate
  allThreadsShouldExit = true;

  for (int i = 0; i < MAX_THREADS; i++)
  {
      // Wake up all the threads and waits for termination
      if (i != 0)
      {
          threads[i].wake_up();
          while (threads[i].state != Thread::TERMINATED) {}
      }

      // Now we can safely destroy the locks and wait conditions
      lock_destroy(&threads[i].sleepLock);
      cond_destroy(&threads[i].sleepCond);

      for (int j = 0; j < MAX_ACTIVE_SPLIT_POINTS; j++)
          lock_destroy(&(threads[i].splitPoints[j].lock));
  }

  lock_destroy(&mpLock);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb $0x1, 0x38(%rdi)
leaq 0x40(%rdi), %r15
movq %rdi, (%rsp)
leaq 0x118(%rdi), %r12
xorl %r13d, %r13d
testq %r13, %r13
je 0x2927d
imulq $0x560, %r13, %rbx      # imm = 0x560
leaq (%r15,%rbx), %rbp
leaq (%r15,%rbx), %r14
addq $0x30, %r14
movq %r14, %rdi
callq 0x55f0
leaq (%r15,%rbx), %rdi
addq $0x58, %rdi
callq 0x5030
movq %r14, %rdi
callq 0x52e0
movl 0x88(%rbp), %eax
cmpl $0x5, %eax
jne 0x29272
imulq $0x560, %r13, %rbx      # imm = 0x560
leaq (%r15,%rbx), %rdi
addq $0x30, %rdi
callq 0x5490
leaq (%r15,%rbx), %rdi
addq $0x58, %rdi
callq 0x5830
xorl %r14d, %r14d
leaq (%r12,%r14), %rdi
callq 0x5490
addq $0x98, %r14
cmpq $0x4c0, %r14            # imm = 0x4C0
jne 0x292a1
incq %r13
addq $0x560, %r12            # imm = 0x560
cmpq $0x20, %r13
jne 0x2923d
movq (%rsp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5490
nop
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/thread.cpp
// Function: ThreadsManager::available_slave_exists(int) const
bool ThreadsManager::available_slave_exists(int master) const {

  assert(master >= 0 && master < activeThreads);

  for (int i = 0; i < activeThreads; i++)
      if (i != master && threads[i].is_available_to(master))
          return true;

  return false;
}

// Assembly:
movslq 0x34(%rdi), %rcx
testq %rcx, %rcx
setg %al
jle 0x29358
movslq %esi, %rdx
movl %edx, %esi
negq %rsi
addq $0xc8, %rdi
movq %rcx, %r8
negq %r8
movl $0x1, %r9d
leaq (%rsi,%r9), %r10
cmpq $0x1, %r10
je 0x2933b
movl (%rdi), %r10d
cmpl $0x2, %r10d
jne 0x2933b
movslq 0x10(%rdi), %r10
testq %r10, %r10
je 0x29358
imulq $0x98, %r10, %r10
addq %rdx, %r10
cmpb $0x0, -0xb(%rdi,%r10)
jne 0x29358
cmpq %rcx, %r9
setb %al
addq $0x560, %rdi            # imm = 0x560
leaq (%r8,%r9), %r10
incq %r10
incq %r9
cmpq $0x1, %r10
jne 0x2930d
andb $0x1, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/tt.cpp
// Function: TranspositionTable::set_size(unsigned long)
void TranspositionTable::set_size(size_t mbSize) {

  size_t newSize = 1024;

  // Transposition table consists of clusters and each cluster consists
  // of ClusterSize number of TTEntries. Each non-empty entry contains
  // information of exactly one position and newSize is the number of
  // clusters we are going to allocate.
  while (2ULL * newSize * sizeof(TTCluster) <= (mbSize << 20))
      newSize *= 2;

  if (newSize == size)
      return;

  generation = 0;
  size = newSize;
  delete [] entries;
  entries = new (std::nothrow) TTCluster[size];
  if (!entries)
  {
      std::cerr << "Failed to allocate " << mbSize
                << " MB for transposition table." << std::endl;
      exit(EXIT_FAILURE);
  }
  clear();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rcx
shlq $0x14, %rcx
movl $0x400, %edx            # imm = 0x400
movq %rdx, %rax
movq %rdx, %rsi
shlq $0x7, %rsi
addq %rdx, %rdx
cmpq %rcx, %rsi
jbe 0x29d89
cmpq (%r14), %rax
jne 0x29da6
popq %rbx
popq %r14
popq %r15
retq
movb $0x0, 0x10(%r14)
movq %rax, (%r14)
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x29dbc
callq 0x5520
movq (%r14), %r15
movq %r15, %rax
shrq $0x3a, %rax
shlq $0x6, %r15
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %r15, %rdi
movq 0x1214c(%rip), %rsi     # 0x3bf28
callq 0x5700
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x29e01
movb $0x0, 0x10(%r14)
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x5210
movq 0x121e8(%rip), %rdi     # 0x3bff0
leaq 0x7796(%rip), %rsi      # 0x315a5
callq 0x53d0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x50f0
leaq 0x8fba(%rip), %rsi      # 0x32de0
movq %rax, %rdi
callq 0x53d0
movq %rax, %rdi
callq 0x51c0
movl $0x1, %edi
callq 0x54e0
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/tt.cpp
// Function: TranspositionTable::store(unsigned long, Value, ValueType, Depth, Move, Value, Value)
void TranspositionTable::store(const Key posKey, Value v, ValueType t, Depth d, Move m, Value statV, Value kingD) {

  int c1, c2, c3;
  TTEntry *tte, *replace;
  uint32_t posKey32 = posKey >> 32; // Use the high 32 bits as key inside the cluster

  tte = replace = first_entry(posKey);

  for (int i = 0; i < ClusterSize; i++, tte++)
  {
      if (!tte->key() || tte->key() == posKey32) // Empty or overwrite old
      {
          // Preserve any existing ttMove
          if (m == MOVE_NONE)
              m = tte->move();

          tte->save(posKey32, v, t, d, m, generation, statV, kingD);
          return;
      }

      // Implement replace strategy
      c1 = (replace->generation() == generation ?  2 : 0);
      c2 = (tte->generation() == generation || tte->type() == VALUE_TYPE_EXACT ? -2 : 0);
      c3 = (tte->depth() < replace->depth() ?  1 : 0);

      if (c1 + c2 + c3 > 0)
          replace = tte;
  }
  replace->save(posKey32, v, t, d, m, generation, statV, kingD);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl 0x40(%rsp), %r15d
movl 0x38(%rsp), %r10d
movl (%rdi), %r11d
decl %r11d
andl %esi, %r11d
shrq $0x20, %rsi
movq 0x8(%rdi), %r14
shlq $0x6, %r11
leaq (%r14,%r11), %rbx
movl (%r14,%r11), %r11d
testl %r11d, %r11d
sete %bpl
cmpl %esi, %r11d
sete %r14b
xorl %r11d, %r11d
orb %bpl, %r14b
je 0x29ea2
movq %rbx, %r14
jmp 0x29f21
movb 0x10(%rdi), %bpl
movq %rbx, %r15
xorl %r14d, %r14d
cmpb %bpl, 0x7(%r15)
sete %r13b
movl $0xfffffffe, %r12d      # imm = 0xFFFFFFFE
cmpb %bpl, 0x7(%rbx)
je 0x29ed3
xorl %r12d, %r12d
cmpb $0x3, 0x6(%rbx)
setne %r12b
leal -0x2(,%r12,2), %r12d
movb %r13b, %r14b
addl %r14d, %r14d
movzwl 0xa(%rbx), %r13d
xorl %eax, %eax
cmpw 0xa(%r15), %r13w
setl %al
addl %r12d, %r14d
orl %eax, %r14d
movq %rbx, %r14
jg 0x29ef6
movq %r15, %r14
cmpl $-0x3, %r11d
je 0x29f52
movl 0x10(%rbx), %r12d
addq $0x10, %rbx
decl %r11d
testl %r12d, %r12d
je 0x29f14
movq %r14, %r15
cmpl %esi, %r12d
jne 0x29ea9
cmpl $-0x3, %r11d
setb %r11b
movl 0x40(%rsp), %r15d
testl %r9d, %r9d
jne 0x29f2b
movzwl 0x4(%rbx), %r9d
movb 0x10(%rdi), %bpl
movl %esi, (%rbx)
movw %r9w, 0x4(%rbx)
movb %cl, 0x6(%rbx)
movb %bpl, 0x7(%rbx)
movw %dx, 0x8(%rbx)
movw %r8w, 0xa(%rbx)
movw %r10w, 0xc(%rbx)
movw %r15w, 0xe(%rbx)
jmp 0x29f62
negl %r11d
cmpl $0x3, %r11d
setae %r11b
movl 0x40(%rsp), %r15d
testb %r11b, %r11b
je 0x29f8e
movb 0x10(%rdi), %al
movl %esi, (%r14)
movw %r9w, 0x4(%r14)
movb %cl, 0x6(%r14)
movb %al, 0x7(%r14)
movw %dx, 0x8(%r14)
movw %r8w, 0xa(%r14)
movw %r10w, 0xc(%r14)
movw %r15w, 0xe(%r14)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/tt.cpp
// Function: TranspositionTable::full(long) const
uint32_t TranspositionTable::full(int64_t x) const {
  uint32_t c = 0;
  uint32_t w = (uint32_t) (x % size); // size is Cluster count
  for (unsigned int k = 0; k < 1000; k++)
    {
      w = (w * 0x1234567 + 0xfedcba9) % size;
      if (entries[w].data[k%ClusterSize].generation() == generation)
        c++;
    }
  return c;
}

// Assembly:
movq %rsi, %rax
movq (%rdi), %rsi
movq 0x8(%rdi), %r8
xorl %r9d, %r9d
xorl %edx, %edx
divq %rsi
movb 0x10(%rdi), %dil
xorl %ecx, %ecx
imull $0x1234567, %edx, %eax  # imm = 0x1234567
addl $0xfedcba9, %eax        # imm = 0xFEDCBA9
xorl %edx, %edx
divq %rsi
movq %rdx, %rax
shlq $0x6, %rax
addq %r8, %rax
movl %r9d, %r10d
andl $0x3, %r10d
shll $0x4, %r10d
xorl %r11d, %r11d
cmpb %dil, 0x7(%r10,%rax)
sete %r11b
addl %r11d, %ecx
incl %r9d
cmpl $0x3e8, %r9d            # imm = 0x3E8
jne 0x29fde
movl %ecx, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/./rkiss.h
// Function: VarTuning::rand_double()
uint64_t rand64() {

    const uint64_t
      e = s.a - rotate(s.b,  7);
    s.a = s.b ^ rotate(s.c, 13);
    s.b = s.c + rotate(s.d, 37);
    s.c = s.d + e;
    return s.d = e + s.a;
  }

// Assembly:
movq 0x29cd0(%rdi), %rax
movq 0x29cd8(%rdi), %rcx
movq %rcx, %rdx
rolq $0xd, %rdx
xorq %rax, %rdx
rolq $0x7, %rax
movq 0x29cc8(%rdi), %rsi
subq %rax, %rsi
movq %rdx, 0x29cc8(%rdi)
movq 0x29ce0(%rdi), %rax
movq %rax, %r8
rolq $0x25, %r8
addq %rcx, %r8
movq %r8, 0x29cd0(%rdi)
addq %rsi, %rax
movq %rax, 0x29cd8(%rdi)
addq %rsi, %rdx
movq %rdx, 0x29ce0(%rdi)
andl $0xffffff, %edx         # imm = 0xFFFFFF
cvtsi2sd %edx, %xmm0
mulsd 0x8d6d(%rip), %xmm0     # 0x32e00
retq
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/tuning.cpp
// Function: VarTuning::rand_unit_vector(double*, int)
void VarTuning::rand_unit_vector(tune_t* vector, int size) {
	
	double norm;
	int64_t s = 0;
	int64_t ran;
	
	for (int k = 0; k < size; ++k) {
		ran = rkiss.rand<unsigned>() % 16777216;
		ran *= (rkiss.rand<unsigned>() % 2 ? 1 : -1);
		vector[k] = tune_t(ran);
		s += (ran * ran);
	}
	
	norm = sqrt(s);

	for (int k = 0; k < size; ++k) {
		vector[k] /= norm;
		cout << vector[k] << endl;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
xorpd %xmm1, %xmm1
movl %edx, %r12d
xorpd %xmm0, %xmm0
testl %edx, %edx
jle 0x2a173
movq 0x29cc8(%rdi), %r8
movq 0x29cd0(%rdi), %rsi
movq 0x29cd8(%rdi), %r9
movq 0x29ce0(%rdi), %rax
xorl %ecx, %ecx
xorl %edx, %edx
movq %r9, %r10
rolq $0xd, %r10
xorq %rsi, %r10
rolq $0x7, %rsi
subq %rsi, %r8
movq %rax, %r11
rolq $0x25, %r11
addq %r9, %r11
addq %r8, %rax
movq %r8, %rsi
addq %r10, %rsi
movl %esi, %r14d
andl $0xffffff, %r14d        # imm = 0xFFFFFF
movq %rax, %r8
rolq $0xd, %r8
xorq %r11, %r8
rolq $0x7, %r11
subq %r11, %r10
leaq (%r10,%rsi), %r9
rolq $0x25, %rsi
addq %rax, %rsi
movq %r10, %rax
addq %r8, %rax
movq %r14, %r10
negq %r10
testb $0x1, %al
cmovneq %r14, %r10
xorps %xmm0, %xmm0
cvtsi2sd %r10d, %xmm0
movsd %xmm0, (%rbx,%rcx,8)
imulq %r10, %r10
addq %r10, %rdx
incq %rcx
cmpq %rcx, %r12
jne 0x2a0d7
movq %r8, 0x29cc8(%rdi)
movq %rsi, 0x29cd0(%rdi)
movq %r9, 0x29cd8(%rdi)
movq %rax, 0x29ce0(%rdi)
xorps %xmm0, %xmm0
cvtsi2sd %rdx, %xmm0
ucomisd %xmm1, %xmm0
jb 0x2a182
xorps %xmm1, %xmm1
sqrtsd %xmm0, %xmm1
jmp 0x2a18b
callq 0x5300
movapd %xmm0, %xmm1
testl %ebp, %ebp
jle 0x2a1ed
xorl %r13d, %r13d
movq 0x11e07(%rip), %r14     # 0x3bfa0
movsd %xmm1, (%rsp)
movsd (%rbx,%r13,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rbx,%r13,8)
movq %r14, %rdi
callq 0x56b0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5050
movq %rax, %rdi
callq 0x5270
movsd (%rsp), %xmm1
incq %r13
cmpq %r13, %r12
jne 0x2a19e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/tuning.cpp
// Function: VarTuning::VarTuning(int, ...)
VarTuning::VarTuning(int s, ...) {
	
	for (int k = abs(rand() % 10000); k > 0; --k) {
		rkiss.rand<unsigned>();
	}
	
	updateCount = 0;
	size = s;
	
	assert(size >= 0 && size < 100);
	
	va_list vl;
	va_start(vl, s);
	for (int k = 0; k < size; ++k) {
		var[k].valueptr = (tune_t*)va_arg(vl, double*);
		var[k].value = *var[k].valueptr;
		var[k].startvalue = *var[k].valueptr;
		var[k].deltaAxisFactor = DELTA_AXIS_FACTOR;
		var[k].sdevSum = 0.0;
		var[k].varSum = 0.0;
		var[k].applyFactor = APPLY_FACTOR;
		memset(var[k].history, 0, sizeof(tune_t) * TUNE_HISTORY_SIZE);
		var[k].historyIndex = 0;
	}
	va_end(vl);
	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x2a261
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
addq $0x29cc8, %rdi          # imm = 0x29CC8
callq 0x8f3c
callq 0x5100
movslq %eax, %r8
imulq $0x68db8bad, %r8, %rax  # imm = 0x68DB8BAD
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x2c, %rax
addl %ecx, %eax
imull $0x2710, %eax, %eax     # imm = 0x2710
subl %eax, %r8d
je 0x2a30e
movq 0x29cc8(%rbx), %rax
movq 0x29cd0(%rbx), %rsi
movq 0x29cd8(%rbx), %rdx
movq 0x29ce0(%rbx), %rcx
movl %r8d, %edi
negl %edi
cmpl %edi, %r8d
cmovgl %r8d, %edi
incl %edi
movq %rsi, %r8
rolq $0x7, %r8
movq %rax, %r9
movq %rdx, %rax
rolq $0xd, %rax
xorq %rsi, %rax
movq %rcx, %rsi
rolq $0x25, %rsi
subq %r8, %r9
addq %rdx, %rsi
movq %rcx, %rdx
addq %r9, %rdx
movq %r9, %rcx
addq %rax, %rcx
decl %edi
cmpl $0x1, %edi
jg 0x2a2be
movq %rsi, 0x29cd0(%rbx)
movq %rdx, 0x29cd8(%rbx)
movq %rax, 0x29cc8(%rbx)
movq %rcx, 0x29ce0(%rbx)
movl $0x0, 0x29cc4(%rbx)
movl %ebp, 0x29cc0(%rbx)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
movslq 0x29cc0(%rbx), %rcx
testq %rcx, %rcx
jle 0x2a3ec
movl (%rsp), %ebp
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%rsp), %rax
imulq $0x6b0, %rcx, %r12      # imm = 0x6B0
xorl %r13d, %r13d
cmpl $0x28, %ebp
ja 0x2a386
movq %rax, %r15
movl %ebp, %eax
addq 0x18(%rsp), %rax
addl $0x8, %ebp
movl %ebp, (%rsp)
jmp 0x2a38f
leaq 0x8(%rax), %r15
movq %r15, 0x8(%rsp)
movq (%rax), %rax
leaq (%rbx,%r13), %r14
addq $0x68, %r14
movq %rax, -0x68(%r14)
movsd (%rax), %xmm0
movsd %xmm0, -0x60(%r14)
movsd (%rax), %xmm0
movsd %xmm0, -0x58(%r14)
xorps %xmm0, %xmm0
movups %xmm0, -0x28(%r14)
movaps 0x8a5f(%rip), %xmm0     # 0x32e20
movups %xmm0, -0x40(%r14)
movl $0x640, %edx            # imm = 0x640
movq %r14, %rdi
xorl %esi, %esi
callq 0x5210
movl $0x0, -0x8(%r14)
addq $0x6b0, %r13            # imm = 0x6B0
movq %r15, %rax
cmpq %r13, %r12
jne 0x2a36f
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/tuning.cpp
// Function: VarTuning::prepare_deltas()
void VarTuning::prepare_deltas() {
	double norm;
	int64_t s = 0;
	int64_t ran;
	
	for (int k = 0; k < size; ++k) {
		ran = rkiss.rand<unsigned>() % 16777216;
		ran *= (rkiss.rand<unsigned>() % 2 ? 1 : -1);
		var[k].delta = tune_t(ran);
		s += (ran * ran);
	}
	
	norm = sqrt(s);
	
	// normalize
	for (int k = 0; k < size; ++k) {
		var[k].delta *= (var[k].startvalue * var[k].deltaAxisFactor / norm);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x29cc0(%rdi), %rcx
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
testq %rcx, %rcx
jle 0x2a4e5
movq 0x29cc8(%rbx), %r8
movq 0x29cd0(%rbx), %rdi
movq 0x29cd8(%rbx), %r9
movq 0x29ce0(%rbx), %rax
imulq $0x6b0, %rcx, %rcx      # imm = 0x6B0
xorl %edx, %edx
xorl %esi, %esi
movq %r9, %r10
rolq $0xd, %r10
xorq %rdi, %r10
rolq $0x7, %rdi
subq %rdi, %r8
movq %rax, %r11
rolq $0x25, %r11
addq %r9, %r11
addq %r8, %rax
movq %r8, %rdi
addq %r10, %rdi
movl %edi, %r14d
andl $0xffffff, %r14d        # imm = 0xFFFFFF
movq %rax, %r8
rolq $0xd, %r8
xorq %r11, %r8
rolq $0x7, %r11
subq %r11, %r10
leaq (%r10,%rdi), %r9
rolq $0x25, %rdi
addq %rax, %rdi
movq %r10, %rax
addq %r8, %rax
movq %r14, %r10
negq %r10
testb $0x1, %al
cmovneq %r14, %r10
xorps %xmm0, %xmm0
cvtsi2sd %r10d, %xmm0
movsd %xmm0, 0x18(%rbx,%rdx)
imulq %r10, %r10
addq %r10, %rsi
addq $0x6b0, %rdx            # imm = 0x6B0
cmpq %rdx, %rcx
jne 0x2a444
movq %r8, 0x29cc8(%rbx)
movq %rdi, 0x29cd0(%rbx)
movq %r9, 0x29cd8(%rbx)
movq %rax, 0x29ce0(%rbx)
xorps %xmm0, %xmm0
cvtsi2sd %rsi, %xmm0
ucomisd %xmm1, %xmm0
jb 0x2a4f1
sqrtsd %xmm0, %xmm0
jmp 0x2a4f6
callq 0x5300
movslq 0x29cc0(%rbx), %rax
testq %rax, %rax
jle 0x2a533
imulq $0x6b0, %rax, %rax      # imm = 0x6B0
xorl %ecx, %ecx
movsd 0x10(%rbx,%rcx), %xmm1
mulsd 0x28(%rbx,%rcx), %xmm1
divsd %xmm0, %xmm1
mulsd 0x18(%rbx,%rcx), %xmm1
movsd %xmm1, 0x18(%rbx,%rcx)
addq $0x6b0, %rcx            # imm = 0x6B0
cmpq %rcx, %rax
jne 0x2a50b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/uci.cpp
// Function: (anonymous namespace)::perft(Position&, std::__cxx11::basic_istringstream<char, std::char_traits<char>, std::allocator<char>>&)
void perft(Position& pos, UCIParser& up) {

    int depth, time;
    int64_t n;

    if (!(up >> depth))
        return;

    time = get_system_time();

    n = perft(pos, depth * ONE_PLY);

    time = get_system_time() - time;

    std::cout << "\nNodes " << n
              << "\nTime (ms) " << time
              << "\nNodes/second " << int(n / (time / 1000.0)) << std::endl;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rsi
callq 0x5220
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2b785
callq 0x16e80
movq %rax, %r15
movl 0xc(%rsp), %esi
addl %esi, %esi
leaq 0x3a0061(%rip), %rdi    # 0x3cb728
callq 0x21912
movq %rax, %rbx
callq 0x16e80
movq %rax, %r14
subl %r15d, %r14d
movq 0x108bf(%rip), %r15     # 0x3bfa0
leaq 0x786a(%rip), %rsi      # 0x32f52
movl $0x7, %edx
movq %r15, %rdi
callq 0x5460
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5390
movq %rax, %r15
leaq 0x7850(%rip), %rsi      # 0x32f5a
movl $0xb, %edx
movq %rax, %rdi
callq 0x5460
movq %r15, %rdi
movl %r14d, %esi
callq 0x5760
movq %rax, %r15
leaq 0x783a(%rip), %rsi      # 0x32f66
movl $0xe, %edx
movq %rax, %rdi
callq 0x5460
cvtsi2sd %rbx, %xmm0
cvtsi2sd %r14d, %xmm1
divsd 0x76ed(%rip), %xmm1     # 0x32e38
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
movq %r15, %rdi
callq 0x5760
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5050
movq %rax, %rdi
callq 0x5270
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/ucioption.cpp
// Function: CaseInsensitiveLess::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
bool CaseInsensitiveLess::operator() (const string& s1, const string& s2) const {

  int c1, c2;
  size_t i = 0;

  while (i < s1.size() && i < s2.size())
  {
      c1 = tolower(s1[i]);
      c2 = tolower(s2[i++]);

      if (c1 != c2)
          return c1 < c2;
  }
  return s1.size() < s2.size();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r15
movq 0x8(%rsi), %r14
movq (%rdx), %r12
movq %rdx, (%rsp)
movq 0x8(%rdx), %r13
cmpq %r13, %r14
cmovbq %r14, %r13
xorl %ebx, %ebx
cmpq %rbx, %r13
je 0x2b849
movsbl (%r15,%rbx), %edi
callq 0x55d0
movl %eax, %ebp
movsbl (%r12,%rbx), %edi
incq %rbx
callq 0x55d0
cmpl %eax, %ebp
je 0x2b822
setl %al
jmp 0x2b854
movq (%rsp), %rax
cmpq 0x8(%rax), %r14
setb %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/ATOMIC-LICHESS[P]ATOMKRAFT/ucioption.cpp
// Function: OptionsMap::print_all[abi:cxx11]() const
string OptionsMap::print_all() const {

  std::stringstream s;

  for (size_t i = 0; i <= size(); i++)
      for (OptionsMap::const_iterator it = begin(); it != end(); ++it)
          if (it->second.idx == i)
          {
              const UCIOption& o = it->second;
              s << "\noption name " << it->first << " type " << o.type;

              if (o.type != "button")
                  s << " default " << o.defaultValue;

              if (o.type == "spin")
                  s << " min " << o.minValue << " max " << o.maxValue;

              break;
          }
  return s.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x5290
leaq 0x8(%r14), %rbp
leaq 0x20(%rsp), %r15
xorl %ebx, %ebx
movq 0x18(%r14), %r12
cmpq %rbp, %r12
je 0x2d8fa
cmpq %rbx, 0xa8(%r12)
je 0x2d806
movq %r12, %rdi
callq 0x5470
movq %rax, %r12
cmpq %rbp, %rax
jne 0x2d7e7
jmp 0x2d8fa
movl $0xd, %edx
movq %r15, %rdi
leaq 0x577b(%rip), %rsi      # 0x32f90
callq 0x5460
movq 0x20(%r12), %rsi
movq 0x28(%r12), %rdx
movq %r15, %rdi
callq 0x5460
movq %rax, %r13
movl $0x6, %edx
movq %rax, %rdi
leaq 0x5760(%rip), %rsi      # 0x32f9e
callq 0x5460
movq 0x80(%r12), %rsi
movq 0x88(%r12), %rdx
movq %r13, %rdi
callq 0x5460
leaq 0x80(%r12), %r13
movq %r13, %rdi
leaq 0x571c(%rip), %rsi      # 0x32f89
callq 0x5120
testl %eax, %eax
je 0x2d89c
movl $0x9, %edx
movq %r15, %rdi
leaq 0x5720(%rip), %rsi      # 0x32fa5
callq 0x5460
movq 0x40(%r12), %rsi
movq 0x48(%r12), %rdx
movq %r15, %rdi
callq 0x5460
movq %r13, %rdi
leaq 0x5709(%rip), %rsi      # 0x32faf
callq 0x5120
testl %eax, %eax
jne 0x2d8fa
movl $0x5, %edx
movq %r15, %rdi
leaq 0x56f6(%rip), %rsi      # 0x32fb4
callq 0x5460
movl 0xa0(%r12), %esi
movq %r15, %rdi
callq 0x5760
movq %rax, %r13
movl $0x5, %edx
movq %rax, %rdi
leaq 0x56d5(%rip), %rsi      # 0x32fba
callq 0x5460
movl 0xa4(%r12), %esi
movq %r13, %rdi
callq 0x5760
incq %rbx
cmpq 0x28(%r14), %rbx
jbe 0x2d7da
leaq 0x28(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x5690
movq 0xe618(%rip), %rsi      # 0x3bf38
leaq 0x10(%rsp), %rdi
callq 0x52c0
leaq 0x90(%rsp), %rdi
callq 0x5140
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2d94e
movq %rax, %rbx
movq 0xe5e0(%rip), %rsi      # 0x3bf38
leaq 0x10(%rsp), %rdi
callq 0x52c0
leaq 0x90(%rsp), %rdi
callq 0x5140
movq %rbx, %rdi
callq 0x5790
nop
// File: /workspace/github_cpp_makefile_star2_O1/Distrotech[P]stund/stun.cxx
// Function: stunParseAtrAddress(char*, unsigned int, StunAtrAddress4&)
static bool 
stunParseAtrAddress( char* body, unsigned int hdrLen,  StunAtrAddress4& result )
{
   if ( hdrLen != 8 )
   {
      clog << "hdrLen wrong for Address" <<endl;
      return false;
   }
   result.pad = *body++;
   result.family = *body++;
   if (result.family == IPv4Family)
   {
      UInt16 nport;
      memcpy(&nport, body, 2); body+=2;
      result.ipv4.port = ntohs(nport);
		
      UInt32 naddr;
      memcpy(&naddr, body, 4); body+=4;
      result.ipv4.addr = ntohl(naddr);
      return true;
   }
   else if (result.family == IPv6Family)
   {
      clog << "ipv6 not supported" << endl;
   }
   else
   {
      clog << "bad address family: " << result.family << endl;
   }
	
   return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x8, %esi
jne 0x3ec0
movq %rdx, %rbx
movb (%rdi), %al
movb %al, (%rdx)
movzbl 0x1(%rdi), %eax
movb %al, 0x1(%rdx)
cmpl $0x2, %eax
je 0x3ed5
cmpl $0x1, %eax
jne 0x3f21
movzwl 0x2(%rdi), %eax
rolw $0x8, %ax
movw %ax, 0x4(%rbx)
movl 0x4(%rdi), %eax
bswapl %eax
movl %eax, 0x8(%rbx)
movb $0x1, %al
jmp 0x3f19
movq 0x90f1(%rip), %rbx      # 0xcfb8
leaq 0x62ea(%rip), %rsi      # 0xa1b8
movl $0x18, %edx
jmp 0x3ee8
movq 0x90dc(%rip), %rbx      # 0xcfb8
leaq 0x62ee(%rip), %rsi      # 0xa1d1
movl $0x12, %edx
movq %rbx, %rdi
callq 0x21f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x9090(%rip), %r14      # 0xcfb8
leaq 0x62b5(%rip), %rsi      # 0xa1e4
movl $0x14, %edx
movq %r14, %rdi
callq 0x21f0
movb 0x1(%rbx), %al
leaq 0x7(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x21f0
movq %rax, %rbx
movq (%rax), %rax
jmp 0x3ef3
// File: /workspace/github_cpp_makefile_star2_O1/Distrotech[P]stund/stun.cxx
// Function: operator<<(std::ostream&, StunAddress4 const&)
ostream& 
operator<<( ostream& strm, const StunAddress4& addr)
{
   UInt32 ip = addr.addr;
   strm << ((int)(ip>>24)&0xFF) << ".";
   strm << ((int)(ip>>16)&0xFF) << ".";
   strm << ((int)(ip>> 8)&0xFF) << ".";
   strm << ((int)(ip>> 0)&0xFF) ;
	
   strm << ":" << addr.port;
	
   return strm;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rsi), %ebp
movl %ebp, %esi
shrl $0x18, %esi
callq 0x22a0
leaq 0x5d0c(%rip), %r15      # 0x9c89
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21f0
movl %ebp, %esi
shrl $0x10, %esi
movl $0xff, %r12d
andl %r12d, %esi
movq %rbx, %rdi
callq 0x22a0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21f0
movl %ebp, %esi
shrl $0x8, %esi
andl %r12d, %esi
movq %rbx, %rdi
callq 0x22a0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21f0
andl %r12d, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x22a0
leaq 0x5cb4(%rip), %rsi      # 0x9c9b
movl $0x1, %edx
movq %rbx, %rdi
callq 0x21f0
movzwl (%r14), %esi
movq %rbx, %rdi
callq 0x2130
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Distrotech[P]stund/stun.cxx
// Function: stunParseAtrString(char*, unsigned int, StunAtrString&)
static bool 
stunParseAtrString( char* body, unsigned int hdrLen,  StunAtrString& result )
{
   if ( hdrLen >= STUN_MAX_STRING )
   {
      clog << "String is too large" << endl;
      return false;
   }
   else
   {
      if (hdrLen % 4 != 0)
      {
         clog << "Bad length string " << hdrLen << endl;
         return false;
      }
		
      result.sizeValue = hdrLen;
      memcpy(&result.value, body, hdrLen);
      result.value[hdrLen] = 0;
      return true;
   }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
cmpl $0x100, %esi            # imm = 0x100
jb 0x403a
movq 0x8f97(%rip), %rbx      # 0xcfb8
leaq 0x620c(%rip), %rsi      # 0xa234
movl $0x13, %edx
movq %rbx, %rdi
callq 0x21f0
movq (%rbx), %rax
jmp 0x406a
testb $0x3, %bl
je 0x4098
movq 0x8f72(%rip), %r14      # 0xcfb8
leaq 0x61fb(%rip), %rsi      # 0xa248
movl $0x12, %edx
movq %r14, %rdi
callq 0x21f0
movl %ebx, %esi
movq %r14, %rdi
callq 0x2130
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdx, %r14
movq %rdi, %rsi
movw %bx, 0x100(%rdx)
movl %ebx, %ebx
movq %rdx, %rdi
movq %rbx, %rdx
callq 0x2170
movb $0x0, (%r14,%rbx)
movb $0x1, %al
jmp 0x4090
// File: /workspace/github_cpp_makefile_star2_O1/Distrotech[P]stund/stun.cxx
// Function: encodeAtrString(char*, unsigned short, StunAtrString const&)
static char* 
encodeAtrString(char* ptr, UInt16 type, const StunAtrString& atr)
{
   assert(atr.sizeValue % 4 == 0);
	
   ptr = encode16(ptr, type);
   ptr = encode16(ptr, atr.sizeValue);
   ptr = encode(ptr, atr.value, atr.sizeValue);
   return ptr;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testb $0x3, 0x100(%rdx)
jne 0x4af8
movq %rdi, %rbx
rolw $0x8, %si
movw %si, (%rdi)
movzwl 0x100(%rdx), %eax
rolw $0x8, %ax
movw %ax, 0x2(%rdi)
addq $0x4, %rdi
movzwl 0x100(%rdx), %r14d
movq %rdx, %rsi
movq %r14, %rdx
callq 0x2170
leaq (%rbx,%r14), %rax
addq $0x4, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x5796(%rip), %rdi      # 0xa295
leaq 0x4c4f(%rip), %rsi      # 0x9755
leaq 0x579f(%rip), %rcx      # 0xa2ac
movl $0x20b, %edx            # imm = 0x20B
callq 0x2120
// File: /workspace/github_cpp_makefile_star2_O1/Distrotech[P]stund/stun.cxx
// Function: stunCreatePassword(StunAtrString const&, StunAtrString*)
void
stunCreatePassword(const StunAtrString& username, StunAtrString* password)
{
   char hmac[20];
   char key[] = "Fluffy";
   //char buffer[STUN_MAX_STRING];
   computeHmac(hmac, username.value, strlen(username.value), key, strlen(key));
   toHex(hmac, 20, password->value);
   password->sizeValue = 40;
   password->value[40]=0;
	
   //clog << "password=" << password->value << endl;
}

// Assembly:
xorl %eax, %eax
leaq 0x5630(%rip), %rcx      # 0xa370
leaq 0x5649(%rip), %rdx      # 0xa390
movzbl (%rax,%rcx), %edi
movl %edi, %r8d
shrl $0x4, %r8d
andl $0xf, %edi
movb (%r8,%rdx), %r8b
movb %r8b, (%rsi,%rax,2)
movb (%rdi,%rdx), %dil
movb %dil, 0x1(%rsi,%rax,2)
incq %rax
cmpl $0x14, %eax
jne 0x4d47
xorl %ecx, %ecx
movb %cl, (%rsi,%rax,2)
movw $0x28, 0x100(%rsi)
movb %cl, 0x28(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/Distrotech[P]stund/stun.cxx
// Function: operator<<(std::ostream&, UInt128 const&)
ostream& operator<< ( ostream& strm, const UInt128& r )
{
   strm << int(r.octet[0]);
   for ( int i=1; i<16; i++ )
   {
      strm << ':' << int(r.octet[i]);
   }
    
   return strm;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzbl (%rsi), %esi
callq 0x22a0
movl $0x1, %r12d
leaq 0x7(%rsp), %r15
movb $0x3a, 0x7(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x21f0
movzbl (%r14,%r12), %esi
movq %rax, %rdi
callq 0x22a0
incq %r12
cmpq $0x10, %r12
jne 0x4da1
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Distrotech[P]stund/stun.cxx
// Function: stunParseServerName(char*, StunAddress4&)
bool
stunParseServerName( char* name, StunAddress4& addr)
{
   assert(name);
	
   // TODO - put in DNS SRV stuff.
	
   bool ret = stunParseHostName( name, addr.addr, addr.port, 3478); 
   if ( ret != true ) 
   {
       addr.port=0xFFFF;
   }	
   return ret;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x4f2c
movq %rsi, %rbx
addq $0x4, %rsi
movq %rbx, %rdx
movl $0xd96, %ecx            # imm = 0xD96
callq 0x4ddb
testb %al, %al
jne 0x4f2a
movw $0xffff, (%rbx)         # imm = 0xFFFF
popq %rbx
retq
leaq 0x4692(%rip), %rdi      # 0x95c5
leaq 0x481b(%rip), %rsi      # 0x9755
leaq 0x4ae0(%rip), %rcx      # 0x9a21
movl $0x3c5, %edx            # imm = 0x3C5
callq 0x2120
// File: /workspace/github_cpp_makefile_star2_O1/Distrotech[P]stund/stun.cxx
// Function: stunStopServer(StunServerInfo&)
void
stunStopServer(StunServerInfo& info)
{
   if (info.myFd > 0) closesocket(info.myFd);
   if (info.altPortFd > 0) closesocket(info.altPortFd);
   if (info.altIpFd > 0) closesocket(info.altIpFd);
   if (info.altIpPortFd > 0) closesocket(info.altIpPortFd);
   
   if (info.relay)
   {
      for (int i=0; i<MAX_MEDIA_RELAYS; ++i)
      {
         StunMediaRelay* relay = &info.relays[i];
         if (relay->fd)
         {
            closesocket(relay->fd);
            relay->fd = 0;
         }
      }
   }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x10(%rdi), %edi
testl %edi, %edi
jle 0x5b1b
callq 0x22c0
movl 0x14(%rbx), %edi
testl %edi, %edi
jle 0x5b27
callq 0x22c0
movl 0x18(%rbx), %edi
testl %edi, %edi
jle 0x5b33
callq 0x22c0
movl 0x1c(%rbx), %edi
testl %edi, %edi
jle 0x5b3f
callq 0x22c0
cmpb $0x1, 0x20(%rbx)
jne 0x5b6d
movl $0x2c, %r14d
movl (%rbx,%r14), %edi
testl %edi, %edi
je 0x5b60
callq 0x22c0
movl $0x0, (%rbx,%r14)
addq $0x18, %r14
cmpq $0x2f0c, %r14           # imm = 0x2F0C
jne 0x5b4b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/Distrotech[P]stund/stun.cxx
// Function: stunFindLocalInterfaces(unsigned int*, int)
int 
stunFindLocalInterfaces(UInt32* addresses,int maxRet)
{
#if defined(WIN32) || defined(__sparc__)
   return 0;
#else
   struct ifconf ifc;
	
   int s = socket( AF_INET, SOCK_DGRAM, 0 );
   int len = 100 * sizeof(struct ifreq);
	
   char buf[ len ];
	
   ifc.ifc_len = len;
   ifc.ifc_buf = buf;
	
   int e = ioctl(s,SIOCGIFCONF,&ifc);
   char *ptr = buf;
   int tl = ifc.ifc_len;
   int count=0;
	
   while ( (tl > 0) && ( count < maxRet) )
   {
      struct ifreq* ifr = (struct ifreq *)ptr;
		
      int si = sizeof(ifr->ifr_name) + sizeof(struct sockaddr);
      tl -= si;
      ptr += si;
      //char* name = ifr->ifr_ifrn.ifrn_name;
      //cerr << "name = " << name << endl;
		
      struct ifreq ifr2;
      ifr2 = *ifr;
		
      e = ioctl(s,SIOCGIFADDR,&ifr2);
      if ( e == -1 )
      {
         break;
      }
		
      //cerr << "ioctl addr e = " << e << endl;
		
      struct sockaddr a = ifr2.ifr_addr;
      struct sockaddr_in* addr = (struct sockaddr_in*) &a;
		
      UInt32 ai = ntohl( addr->sin_addr.s_addr );
      if (int((ai>>24)&0xFF) != 127)
      {
         addresses[count++] = ai;
      }
		
#if 0
      cerr << "Detected interface "
           << int((ai>>24)&0xFF) << "." 
           << int((ai>>16)&0xFF) << "." 
           << int((ai>> 8)&0xFF) << "." 
           << int((ai    )&0xFF) << endl;
#endif
   }
	
   closesocket(s);
	
   return count;
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xff8, %rsp            # imm = 0xFF8
movl %esi, %ebx
movq %rdi, 0x8(%rsp)
movl $0x2, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x2090
movl %eax, %ebp
movq %rsp, (%rsp)
leaq 0x40(%rsp), %r15
movl $0xfa0, (%r15)          # imm = 0xFA0
leaq 0x50(%rsp), %r13
movq %r13, 0x8(%r15)
movl $0x8912, %esi           # imm = 0x8912
movl %eax, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2230
movl (%r15), %r14d
leaq 0x10(%rsp), %r12
xorl %r15d, %r15d
testl %r14d, %r14d
jle 0x662e
cmpl %ebx, %r15d
jge 0x662e
movq 0x20(%r13), %rax
movq %rax, 0x30(%rsp)
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movaps %xmm1, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movl $0x8915, %esi           # imm = 0x8915
movl %ebp, %edi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2230
cmpl $-0x1, %eax
je 0x6621
movl 0x24(%rsp), %ecx
bswapl %ecx
movl %ecx, %edx
andl $0xff000000, %edx       # imm = 0xFF000000
cmpl $0x7f000000, %edx       # imm = 0x7F000000
je 0x6621
movslq %r15d, %rdx
incl %r15d
movq 0x8(%rsp), %rsi
movl %ecx, (%rsi,%rdx,4)
addq $0x20, %r13
addl $-0x20, %r14d
cmpl $-0x1, %eax
jne 0x65c0
movl %ebp, %edi
callq 0x22c0
movq (%rsp), %rsp
movl %r15d, %eax
addq $0xff8, %rsp            # imm = 0xFF8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Distrotech[P]stund/stun.cxx
// Function: stunBuildReqSimple(StunMessage*, StunAtrString const&, bool, bool, unsigned int)
void
stunBuildReqSimple( StunMessage* msg,
                    const StunAtrString& username,
                    bool changePort, bool changeIp, unsigned int id )
{
   assert( msg );
   memset( msg , 0 , sizeof(*msg) );
	
   msg->msgHdr.msgType = BindRequestMsg;
	
   for ( int i=0; i<16; i=i+4 )
   {
      assert(i+3<16);
      int r = stunRand();
      msg->msgHdr.id.octet[i+0]= r>>0;
      msg->msgHdr.id.octet[i+1]= r>>8;
      msg->msgHdr.id.octet[i+2]= r>>16;
      msg->msgHdr.id.octet[i+3]= r>>24;
   }
	
   if ( id != 0 )
   {
      msg->msgHdr.id.octet[0] = id; 
   }
	
   msg->hasChangeRequest = true;
   msg->changeRequest.value =(changeIp?ChangeIpFlag:0) | 
      (changePort?ChangePortFlag:0);
	
   if ( username.sizeValue > 0 )
   {
      msg->hasUsername = true;
      msg->username = username;
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x66fc
movl %r8d, %r12d
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x4c8, %edx            # imm = 0x4C8
xorl %esi, %esi
callq 0x2110
movw $0x1, (%r14)
movq $-0x4, %r13
callq 0x4b17
movl %eax, 0x8(%r14,%r13)
addq $0x4, %r13
cmpq $0xc, %r13
jb 0x6689
testl %r12d, %r12d
je 0x66a6
movb %r12b, 0x4(%r14)
movb $0x1, 0x34(%r14)
movzbl %r15b, %eax
movzbl %bpl, %ecx
addl %ecx, %ecx
leal (%rcx,%rax,4), %eax
movl %eax, 0x38(%r14)
cmpw $0x0, 0x100(%rbx)
je 0x66ed
movb $0x1, 0x5c(%r14)
addq $0x5e, %r14
movl $0x102, %edx            # imm = 0x102
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2170
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x37e9(%rip), %rdi      # 0x9eec
leaq 0x304b(%rip), %rsi      # 0x9755
leaq 0x37df(%rip), %rcx      # 0x9ef0
movl $0x6a4, %edx            # imm = 0x6A4
callq 0x2120
// File: /workspace/github_cpp_makefile_star2_O1/Distrotech[P]stund/stun.cxx
// Function: stunGetUserNameAndPassword(StunAddress4 const&, StunAtrString*, StunAtrString*)
void 
stunGetUserNameAndPassword(  const StunAddress4& dest, 
                             StunAtrString* username,
                             StunAtrString* password)
{ 
   // !cj! This is totally bogus - need to make TLS connection to dest and get a
   // username and password to use 
   stunCreateUserName(dest, username);
   stunCreatePassword(*username, password);
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
callq 0x4b80
xorl %eax, %eax
leaq 0x3c43(%rip), %rcx      # 0xa370
leaq 0x3c5c(%rip), %rdx      # 0xa390
movzbl (%rax,%rcx), %esi
movl %esi, %edi
shrl $0x4, %edi
andl $0xf, %esi
movb (%rdi,%rdx), %dil
movb %dil, (%rbx,%rax,2)
movb (%rsi,%rdx), %sil
movb %sil, 0x1(%rbx,%rax,2)
incq %rax
cmpl $0x14, %eax
jne 0x6734
xorl %ecx, %ecx
movb %cl, (%rbx,%rax,2)
movw $0x28, 0x100(%rbx)
movb %cl, 0x28(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/btbujiangjun[P]abcdl/include/utils/ParallelOperator.h
// Function: abcdl::utils::ParallelOperator<int>::parallel_mul2one(int*, unsigned long, std::function<void (int*)> const&) const
void parallel_mul2one(T* op1,
                          const size_t num_op1,
                          const std::function<void(T*)> &f) const{
        size_t block_size = get_block_size(num_op1);
        size_t num_thread = get_num_thread(num_op1, block_size);
        std::vector<std::thread> threads(num_thread);

        for(size_t i = 0; i != num_thread; i++){
            threads[i] = std::thread(
                [&op1, &f](size_t start_idx, size_t end_idx){
                    for(size_t ti = start_idx; ti != end_idx; ti++){
                        f(&op1[ti]);
                    }
                }, i * block_size, std::min(num_op1, (i + 1) * block_size)
            );
        }

        for(auto& thread : threads){
            thread.join();
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %rbx
movq %rdx, %rcx
movq %rsi, 0x50(%rsp)
movq %rdx, 0x8(%rsp)
movq (%rdi), %r14
movq 0x8(%rdi), %rsi
movq %rdx, %rax
xorl %edx, %edx
divq %r14
cmpq $0x1, %rdx
sbbq $-0x1, %rax
cmpq %rcx, %rsi
movq %rcx, %rbp
cmovbq %rsi, %rbp
cmpq %rsi, %rax
cmovaeq %rax, %rbp
cmpq %rbp, %rsi
jb 0xa370
movq %rcx, %rax
xorl %edx, %edx
divq %rbp
movq %rax, %r14
cmpq $0x1, %rdx
sbbq $-0x1, %r14
leaq 0x38(%rsp), %rdi
leaq 0x20(%rsp), %rdx
movq %r14, %rsi
callq 0xa482
testq %r14, %r14
je 0xa3ee
xorl %r15d, %r15d
leaq 0x18(%rsp), %r13
xorl %r12d, %r12d
leaq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
movq %r15, 0x18(%rsp)
addq %rbp, %r15
movq %r15, 0x10(%rsp)
leaq 0x10(%rsp), %rcx
cmpq 0x8(%rsp), %r15
jb 0xa3bf
leaq 0x8(%rsp), %rcx
leaq 0x30(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %r13, %rdx
callq 0xa4fa
movq 0x38(%rsp), %rax
cmpq $0x0, (%rax,%r12,8)
jne 0xa424
movq 0x30(%rsp), %rcx
movq %rcx, (%rax,%r12,8)
incq %r12
cmpq %r12, %r14
jne 0xa392
movq 0x38(%rsp), %rbx
movq 0x40(%rsp), %r14
cmpq %r14, %rbx
je 0xa40b
movq %rbx, %rdi
callq 0x95a0
addq $0x8, %rbx
jmp 0xa3f8
leaq 0x38(%rsp), %rdi
callq 0xa594
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x90c0
jmp 0xa42b
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0xa594
movq %rbx, %rdi
callq 0x95d0
// File: /workspace/github_cpp_makefile_star2_O1/btbujiangjun[P]abcdl/include/utils/ParallelOperator.h
// Function: abcdl::utils::ParallelOperator<int>::parallel_mul2one(int*, unsigned long, int const&, std::function<void (int*, int const&)> const&) const
void parallel_mul2one(T* op1,
                          const size_t num_op1,
                          const T& op2,
                          const std::function<void(T*, const T&)> &f) const{
        size_t block_size = get_block_size(num_op1);
        size_t num_thread = get_num_thread(num_op1, block_size);
        std::vector<std::thread> threads(num_thread);

        for(size_t i = 0; i != num_thread; i++){
            threads[i] = std::thread(
                [&op1, &op2, &f](size_t start_idx, size_t end_idx){
                    for(size_t ti = start_idx; ti != end_idx; ti++){
                        f(&op1[ti], op2);
                    }
                }, i * block_size, std::min(num_op1, (i + 1) * block_size)
            );
        }

        for(auto& thread : threads){
            thread.join();
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %rcx
movq %rsi, 0x38(%rsp)
movq %rdx, (%rsp)
movq (%rdi), %r15
movq 0x8(%rdi), %rsi
movq %rdx, %rax
xorl %edx, %edx
divq %r15
cmpq $0x1, %rdx
sbbq $-0x1, %rax
cmpq %rcx, %rsi
movq %rcx, %r12
cmovbq %rsi, %r12
cmpq %rsi, %rax
cmovaeq %rax, %r12
cmpq %r12, %rsi
jb 0xa628
movq %rcx, %rax
xorl %edx, %edx
divq %r12
movq %rax, %r15
cmpq $0x1, %rdx
sbbq $-0x1, %r15
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rdx
movq %r15, %rsi
callq 0xa482
testq %r15, %r15
je 0xa6a4
xorl %r13d, %r13d
xorl %ebp, %ebp
leaq 0x38(%rsp), %rax
movq %rax, 0x40(%rsp)
movq %r14, 0x48(%rsp)
movq %rbx, 0x50(%rsp)
movq %r13, 0x10(%rsp)
addq %r12, %r13
movq %r13, 0x8(%rsp)
leaq 0x8(%rsp), %rcx
cmpq (%rsp), %r13
jb 0xa673
movq %rsp, %rcx
leaq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0xa6f6
movq 0x20(%rsp), %rax
cmpq $0x0, (%rax,%rbp,8)
jne 0xa6da
movq 0x18(%rsp), %rcx
movq %rcx, (%rax,%rbp,8)
incq %rbp
cmpq %rbp, %r15
jne 0xa644
movq 0x20(%rsp), %rbx
movq 0x28(%rsp), %r14
cmpq %r14, %rbx
je 0xa6c1
movq %rbx, %rdi
callq 0x95a0
addq $0x8, %rbx
jmp 0xa6ae
leaq 0x20(%rsp), %rdi
callq 0xa594
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x90c0
jmp 0xa6e1
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0xa594
movq %rbx, %rdi
callq 0x95d0
// File: /workspace/github_cpp_makefile_star2_O1/btbujiangjun[P]abcdl/include/utils/ParallelOperator.h
// Function: abcdl::utils::ParallelOperator<int>::parallel_mul2one_copy(int*, int const*, unsigned long, std::function<void (int*, int const&)> const&) const
void parallel_mul2one_copy(T* result_data,
                               const T* op1,
                               const size_t num_op1,
                               const std::function<void(T*, const T&)> &f) const{
        size_t block_size = get_block_size(num_op1);
        size_t num_thread = get_num_thread(num_op1, block_size);
        std::vector<std::thread> threads(num_thread);

        for(size_t i = 0; i != num_thread; i++){
            threads[i] = std::thread(
                [&result_data, &op1, &f](size_t start_idx, size_t end_idx){
                    for(size_t ti = start_idx; ti != end_idx; ti++){
                        f(&result_data[ti], op1[ti]);
                    }
                }, i * block_size, std::min(num_op1, (i + 1) * block_size)
            );
        }

        for(auto& thread : threads){
            thread.join();
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %rbx
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x8(%rsp)
movq (%rdi), %r14
movq 0x8(%rdi), %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %r14
cmpq $0x1, %rdx
sbbq $-0x1, %rax
cmpq %rcx, %rsi
movq %rcx, %rbp
cmovbq %rsi, %rbp
cmpq %rsi, %rax
cmovaeq %rax, %rbp
cmpq %rbp, %rsi
jb 0xa7f8
movq %rcx, %rax
xorl %edx, %edx
divq %rbp
movq %rax, %r14
cmpq $0x1, %rdx
sbbq $-0x1, %r14
leaq 0x28(%rsp), %rdi
leaq 0x50(%rsp), %rdx
movq %r14, %rsi
callq 0xa482
testq %r14, %r14
je 0xa880
xorl %r15d, %r15d
leaq 0x18(%rsp), %r13
xorl %r12d, %r12d
leaq 0x48(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x58(%rsp)
movq %rbx, 0x60(%rsp)
movq %r15, 0x18(%rsp)
addq %rbp, %r15
movq %r15, 0x10(%rsp)
leaq 0x10(%rsp), %rcx
cmpq 0x8(%rsp), %r15
jb 0xa851
leaq 0x8(%rsp), %rcx
leaq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movq %r13, %rdx
callq 0xa8d2
movq 0x28(%rsp), %rax
cmpq $0x0, (%rax,%r12,8)
jne 0xa8b6
movq 0x20(%rsp), %rcx
movq %rcx, (%rax,%r12,8)
incq %r12
cmpq %r12, %r14
jne 0xa81a
movq 0x28(%rsp), %rbx
movq 0x30(%rsp), %r14
cmpq %r14, %rbx
je 0xa89d
movq %rbx, %rdi
callq 0x95a0
addq $0x8, %rbx
jmp 0xa88a
leaq 0x28(%rsp), %rdi
callq 0xa594
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x90c0
jmp 0xa8bd
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xa594
movq %rbx, %rdi
callq 0x95d0