// File: /workspace/github_cpp_makefile_star2_O1/ndsol[P]git-mine/git-mine.cpp
// Function: MineBoss::start()
void start() {
    size_t nCPU = 0;
    FILE* cpuinfo = fopen("/proc/cpuinfo", "r");
    if (!cpuinfo) {
      fprintf(stderr, "Failed to open /proc/cpuinfo: %d %s\n", errno, strerror(errno));
      return;
    }
    char buf[256];
    while (!feof(cpuinfo)) {
      if (!fgets(buf, sizeof(buf), cpuinfo)) {
        if (feof(cpuinfo)) break;
        fprintf(stderr, "Read /proc/cpuinfo failed: %d %s\n", errno,
                strerror(errno));
        return;
      }
      buf[strcspn(buf, "\r\n")] = 0;
      if (!strncmp(buf, "processor", strlen("processor"))) {
        int n = strcspn(buf, ":");
        if (n < (int)strlen(buf)) {
          size_t v;
          int end;
          if (sscanf(buf + n + 1, "%zu%n", &v, &end) == 1 &&
              (int)strlen(buf + n + 1) == end) {
            if (v + 1 > nCPU) {
              nCPU = v + 1;
            }
          }
        }
      }
    }
    fclose(cpuinfo);
    if (pool.size()) {
      fprintf(stderr, "pool not empty - already started?\n");
      return;
    }
    if (atime_hint < orig.atime()) {
      if (atime_hint) {
        fprintf(stderr, "invalid atime_hint %lld (must be at least %lld)\n",
                atime_hint, orig.atime());
      }
      atime_hint = orig.atime();
    }
    if (ctime_hint < orig.ctime()) {
      if (ctime_hint) {
        fprintf(stderr, "invalid ctime_hint %lld (must be at least %lld)\n",
                ctime_hint, orig.ctime());
      }
      ctime_hint = orig.ctime();
    }

    // Lock bossMutex while adding threads to pool.
    std::unique_lock<std::mutex> lock(bossMutex);
    for (size_t i = 0; i < nCPU; i++) {
      pool.emplace(pool.begin(), new ThreadLocal(this, i, nCPU));
    }
    start_t = Clock::now();
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, %rbx
leaq 0x683f(%rip), %rdi      # 0xc30e
leaq 0x6895(%rip), %rsi      # 0xc36b
callq 0x32b0
testq %rax, %rax
je 0x5cf3
movq %rax, %r15
movq %rbx, (%rsp)
movq %rax, %rdi
callq 0x33b0
testl %eax, %eax
je 0x5aff
xorl %r14d, %r14d
jmp 0x5bdf
leaq 0x20(%rsp), %r12
leaq 0x671c(%rip), %r13      # 0xc227
movabsq $0x6f737365636f7270, %rbp # imm = 0x6F737365636F7270
xorl %r14d, %r14d
movq %r12, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdx
callq 0x33d0
testq %rax, %rax
je 0x5bcf
movq %r12, %rdi
movq %r13, %rsi
callq 0x3040
movb $0x0, 0x20(%rsp,%rax)
movq 0x20(%rsp), %rax
xorq %rbp, %rax
movzbl 0x28(%rsp), %ecx
xorq $0x72, %rcx
orq %rax, %rcx
jne 0x5bbd
movq %r12, %rdi
leaq 0x6a32(%rip), %rsi      # 0xc593
callq 0x3040
movq %rax, %rbx
movq %r12, %rdi
callq 0x3100
cmpl %eax, %ebx
jge 0x5bbd
movslq %ebx, %rbx
leaq 0x21(%rsp), %rax
addq %rax, %rbx
movq %rbx, %rdi
leaq 0x6620(%rip), %rsi      # 0xc1aa
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
xorl %eax, %eax
callq 0x3210
cmpl $0x1, %eax
jne 0x5bbd
movq %rbx, %rdi
callq 0x3100
cmpl %eax, 0x8(%rsp)
jne 0x5bbd
movq 0x10(%rsp), %rax
incq %rax
cmpq %r14, %rax
cmovaq %rax, %r14
movq %r15, %rdi
callq 0x33b0
testl %eax, %eax
je 0x5b18
jmp 0x5bdf
movq %r15, %rdi
callq 0x33b0
testl %eax, %eax
je 0x5d3b
movq %r15, %rdi
callq 0x3220
movq (%rsp), %rbx
movq 0x1b8(%rbx), %rax
cmpq 0x1b0(%rbx), %rax
jne 0x5cfa
movq 0x120(%rbx), %rcx
movq 0x130(%rbx), %rdx
cmpq %rcx, %rdx
jge 0x5c29
testq %rdx, %rdx
jne 0x5d01
movq 0x120(%rbx), %rax
movq %rax, 0x130(%rbx)
movq 0x128(%rbx), %rcx
movq 0x138(%rbx), %rdx
cmpq %rcx, %rdx
jge 0x5c53
testq %rdx, %rdx
jne 0x5d1e
movq 0x128(%rbx), %rax
movq %rax, 0x138(%rbx)
leaq 0x150(%rbx), %rax
leaq 0x10(%rsp), %rbx
movq %rax, (%rbx)
movb $0x0, 0x8(%rbx)
movq %rbx, %rdi
callq 0x6e94
movb $0x1, 0x8(%rbx)
testq %r14, %r14
je 0x5cc7
movq (%rsp), %rax
leaq 0x1b0(%rax), %r15
xorl %r12d, %r12d
leaq 0x8(%rsp), %r13
movq (%r15), %rbp
movl $0x340, %edi            # imm = 0x340
callq 0x3230
movq %rax, %rbx
movq %rax, %rdi
movq (%rsp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x6dc2
movq %rbx, 0x8(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x6ed0
incq %r12
cmpq %r12, %r14
jne 0x5c8a
callq 0x32f0
movq (%rsp), %rcx
movq %rax, 0x140(%rcx)
leaq 0x10(%rsp), %rdi
callq 0x6e7e
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3610
jmp 0x5ce1
callq 0x35b6
jmp 0x5ce1
movq 0xa2c8(%rip), %rax      # 0xffd0
movq (%rax), %rdi
leaq 0x667e(%rip), %rsi      # 0xc390
xorl %eax, %eax
callq 0x3340
jmp 0x5c1b
movq 0xa2ab(%rip), %rax      # 0xffd0
movq (%rax), %rdi
leaq 0x6692(%rip), %rsi      # 0xc3c1
xorl %eax, %eax
callq 0x3340
jmp 0x5c45
callq 0x35d8
jmp 0x5ce1
movq %rax, %r14
movl $0x340, %esi            # imm = 0x340
movq %rbx, %rdi
callq 0x3240
jmp 0x5d57
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x6e7e
movq %r14, %rdi
callq 0x3480
nop