LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: romkatv[P]hcproxy/src/forwarder.cc
// Function: hcproxy::(anonymous namespace)::LinkEventHandler::Close(hcproxy::EventLoop*)
void Close(EventLoop* loop) {
    if (readable_ || writable_) {
      LOG(INFO) << "[" << fd() << "] (" << name_ << ") close";
      readable_ = false;
      writable_ = false;
      other_->DecRef();
      loop->Remove(this);
      CHECK(close(fd()) == 0) << Errno();
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
testb $0x1, 0x50(%rax)
jne 0x2fddf
movq -0x78(%rbp), %rax
testb $0x1, 0x51(%rax)
je 0x2ffd6
leaq 0xb5196(%rip), %rsi     # 0xe4f7c
leaq -0x30(%rbp), %rdi
movq %rdi, -0x88(%rbp)
movl $0x11e, %edx            # imm = 0x11E
xorl %ecx, %ecx
callq 0x1c360
movq -0x88(%rbp), %rdi
callq 0x194e0
movq %rax, %rdi
leaq 0xb43cd(%rip), %rsi     # 0xe41e0
callq 0x1bb10
movq %rax, -0x80(%rbp)
jmp 0x2fe1e
movq -0x78(%rbp), %rdi
callq 0x1bb70
movl %eax, -0x8c(%rbp)
jmp 0x2fe2f
movq -0x80(%rbp), %rdi
movl -0x8c(%rbp), %eax
movl %eax, -0x40(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x1bad0
movq %rax, -0x98(%rbp)
jmp 0x2fe4e
movq -0x98(%rbp), %rdi
leaq 0xb518e(%rip), %rsi     # 0xe4fea
callq 0x22810
movq %rax, -0xa0(%rbp)
jmp 0x2fe6a
movq -0xa0(%rbp), %rdi
movq -0x78(%rbp), %rsi
addq $0x38, %rsi
callq 0x1db60
movq %rax, -0xa8(%rbp)
jmp 0x2fe87
movq -0xa8(%rbp), %rdi
leaq 0xb5159(%rip), %rsi     # 0xe4fee
callq 0x1ae20
movq %rax, -0xb0(%rbp)
jmp 0x2fea3
movq -0xb0(%rbp), %rsi
leaq -0x41(%rbp), %rdi
callq 0x194f0
leaq -0x30(%rbp), %rdi
callq 0x1c390
movq -0x78(%rbp), %rax
movb $0x0, 0x50(%rax)
movb $0x0, 0x51(%rax)
movq 0x58(%rax), %rdi
callq 0x31940
movq -0x78(%rbp), %rsi
movq -0x10(%rbp), %rdi
callq 0x32fb0
movq -0x78(%rbp), %rdi
callq 0x1bb70
movl %eax, %edi
callq 0x15140
movb $0x0, -0x69(%rbp)
cmpl $0x0, %eax
jne 0x2fefc
jmp 0x2ff8d
leaq 0xb5079(%rip), %rsi     # 0xe4f7c
leaq -0x68(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
movl $0x123, %edx            # imm = 0x123
movl $0x3, %ecx
callq 0x194b0
movq -0xc0(%rbp), %rdi
movb $0x1, -0x69(%rbp)
callq 0x194e0
movq %rax, %rdi
leaq 0xb481d(%rip), %rsi     # 0xe4754
callq 0x19650
movq %rax, -0xb8(%rbp)
jmp 0x2ff45
movq -0xb8(%rbp), %rdi
leaq 0xb9438(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0xc8(%rbp)
jmp 0x2ff61
callq 0x1c0c0
jmp 0x2ff68
movq -0xc8(%rbp), %rdi
callq 0x1c050
movq %rax, -0xd0(%rbp)
jmp 0x2ff7d
movq -0xd0(%rbp), %rsi
leaq -0x6c(%rbp), %rdi
callq 0x194f0
testb $0x1, -0x69(%rbp)
jne 0x2ff95
jmp 0x2ffc9
leaq -0x68(%rbp), %rdi
callq 0x19500
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x1c390
jmp 0x2ffdf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
testb $0x1, -0x69(%rbp)
jne 0x2ffcb
jmp 0x2ffd4
jmp 0x2ffd6
leaq -0x68(%rbp), %rdi
callq 0x19500
jmp 0x2ffdf
addq $0xd0, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0xe1080
nopl (%rax,%rax)
// File: romkatv[P]hcproxy/src/sock.cc
// Function: hcproxy::SockError(int)
int SockError(int fd) {
  int err = 0;
  socklen_t len = sizeof(err);
  CHECK(getsockopt(fd, SOL_SOCKET, SO_ERROR, &err, &len) == 0) << Errno();
  CHECK(len == sizeof(err));
  return err;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl $0x4, -0xc(%rbp)
movl -0x4(%rbp), %edi
movl $0x1, %esi
movl $0x4, %edx
leaq -0x8(%rbp), %rcx
leaq -0xc(%rbp), %r8
callq 0x15510
movb $0x0, -0x31(%rbp)
cmpl $0x0, %eax
jne 0x31b84
jmp 0x31c1a
leaq 0xb37ae(%rip), %rsi     # 0xe5339
leaq -0x30(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movl $0x1b, %edx
movl $0x3, %ecx
callq 0x194b0
movq -0x80(%rbp), %rdi
movb $0x1, -0x31(%rbp)
callq 0x194e0
movq %rax, -0x78(%rbp)
jmp 0x31bb5
movq -0x78(%rbp), %rdi
leaq 0xb3785(%rip), %rsi     # 0xe5345
callq 0x31ae0
movq %rax, -0x88(%rbp)
jmp 0x31bce
movq -0x88(%rbp), %rdi
leaq 0xb77af(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0x90(%rbp)
jmp 0x31bea
callq 0x1c0c0
jmp 0x31bf1
movq -0x90(%rbp), %rdi
callq 0x1c050
movq %rax, -0x98(%rbp)
jmp 0x31c06
movq -0x98(%rbp), %rsi
leaq -0x47(%rbp), %rdi
callq 0x194f0
jmp 0x31c18
jmp 0x31c1a
testb $0x1, -0x31(%rbp)
jne 0x31c22
jmp 0x31c46
leaq -0x30(%rbp), %rdi
callq 0x19500
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x31(%rbp)
jne 0x31cef
jmp 0x31cf8
movl -0xc(%rbp), %eax
movb $0x0, -0x69(%rbp)
cmpq $0x4, %rax
jne 0x31c58
jmp 0x31cde
leaq 0xb36da(%rip), %rsi     # 0xe5339
leaq -0x68(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
movl $0x1c, %edx
movl $0x3, %ecx
callq 0x194b0
movq -0xa8(%rbp), %rdi
movb $0x1, -0x69(%rbp)
callq 0x194e0
movq %rax, -0xa0(%rbp)
jmp 0x31c92
movq -0xa0(%rbp), %rdi
leaq 0xb36db(%rip), %rsi     # 0xe537b
callq 0x1d970
movq %rax, -0xb0(%rbp)
jmp 0x31cae
movq -0xb0(%rbp), %rdi
leaq 0xb76cf(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0xb8(%rbp)
jmp 0x31cca
movq -0xb8(%rbp), %rsi
leaq -0x6a(%rbp), %rdi
callq 0x194f0
jmp 0x31cdc
jmp 0x31cde
testb $0x1, -0x69(%rbp)
jne 0x31ce6
jmp 0x31d0e
leaq -0x68(%rbp), %rdi
callq 0x19500
leaq -0x30(%rbp), %rdi
callq 0x19500
jmp 0x31d25
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x69(%rbp)
jne 0x31d1a
jmp 0x31d23
movl -0x8(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
leaq -0x68(%rbp), %rdi
callq 0x19500
jmp 0x31d25
movq -0x40(%rbp), %rdi
callq 0xe1080
nop
// File: romkatv[P]hcproxy/src/logging.cc
// Function: hcproxy::internal_logging::LogStreamBase::Flush()
void LogStreamBase::Flush() {
  std::time_t time = std::time(nullptr);
  char time_str[64];
  if (std::strftime(time_str, sizeof(time_str), "%F %T", std::localtime(&time)) == 0) {
    std::strcpy(time_str, "undef");
  }
  std::string msg = strm_->str();
  std::fprintf(stderr, "[%s %s %s:%d] %s\n", time_str, Str(severity_), file_, line_, msg.c_str());
  strm_.reset();
  errno = errno_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x15940
movq %rax, -0x10(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x15890
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl $0x40, %esi
leaq 0xb357f(%rip), %rdx     # 0xe53a0
callq 0x158d0
cmpq $0x0, %rax
jne 0x31e3c
leaq -0x50(%rbp), %rdi
leaq 0xb356f(%rip), %rsi     # 0xe53a6
callq 0x156d0
movq -0x90(%rbp), %rdi
addq $0x18, %rdi
callq 0x320e0
movq %rax, %rsi
leaq -0x70(%rbp), %rdi
callq 0xa88f0
movq -0x90(%rbp), %rax
movq 0xfe022(%rip), %rcx     # 0x12fe88
movq (%rcx), %rcx
movq %rcx, -0xa8(%rbp)
leaq -0x50(%rbp), %rcx
movq %rcx, -0xa0(%rbp)
movl 0x14(%rax), %edi
callq 0x31f50
movq %rax, -0x98(%rbp)
jmp 0x31e8c
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0xb8(%rbp)
movl 0x10(%rax), %eax
movl %eax, -0xb0(%rbp)
leaq -0x70(%rbp), %rdi
callq 0xb1320
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rdx
movq -0x98(%rbp), %rcx
movq -0xb8(%rbp), %r8
movl -0xb0(%rbp), %r9d
leaq 0xb34d2(%rip), %rsi     # 0xe53ac
movq %rax, (%rsp)
movb $0x0, %al
callq 0x15880
movq -0x90(%rbp), %rdi
addq $0x18, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x32100
movq -0x90(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xac(%rbp)
callq 0x15640
movl -0xac(%rbp), %ecx
movl %ecx, (%rax)
leaq -0x70(%rbp), %rdi
callq 0xaf8e0
addq $0xc0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0xaf8e0
movq -0x78(%rbp), %rdi
callq 0xe1080
nopw %cs:(%rax,%rax)
// File: romkatv[P]hcproxy/src/logging.cc
// Function: hcproxy::internal_logging::(anonymous namespace)::Str(hcproxy::internal_logging::Severity)
const char* Str(Severity severity) {
  switch (severity) {
    case INFO:
      return "INFO";
    case WARN:
      return "WARN";
    case ERROR:
      return "ERROR";
    case FATAL:
      return "FATAL";
  }
  return "UNKNOWN";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x3, %rax
ja 0x31fac
movq -0x18(%rbp), %rax
leaq 0xb3421(%rip), %rcx     # 0xe5390
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xb343f(%rip), %rax     # 0xe53be
movq %rax, -0x8(%rbp)
jmp 0x31fb7
leaq 0xb3437(%rip), %rax     # 0xe53c3
movq %rax, -0x8(%rbp)
jmp 0x31fb7
leaq 0xb342f(%rip), %rax     # 0xe53c8
movq %rax, -0x8(%rbp)
jmp 0x31fb7
leaq 0xb3428(%rip), %rax     # 0xe53ce
movq %rax, -0x8(%rbp)
jmp 0x31fb7
leaq 0xb3421(%rip), %rax     # 0xe53d4
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: romkatv[P]hcproxy/src/event_loop.cc
// Function: hcproxy::EventLoop::ScheduleOrRun(std::function<void ()>)
void EventLoop::ScheduleOrRun(std::function<void()> f) {
  CHECK(f);
  if (std::this_thread::get_id() == loop_.get_id()) {
    f();
  } else {
    Schedule(std::move(f));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rsi, -0x90(%rbp)
movq %rdi, %rax
movq -0x90(%rbp), %rdi
movq %rdi, -0x88(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
callq 0x26250
movb $0x0, -0x31(%rbp)
testb $0x1, %al
jne 0x339d2
jmp 0x339d7
jmp 0x33a5d
leaq 0xb19fe(%rip), %rsi     # 0xe53dc
leaq -0x30(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
movl $0x5b, %edx
movl $0x3, %ecx
callq 0x194b0
movq -0xa0(%rbp), %rdi
movb $0x1, -0x31(%rbp)
callq 0x194e0
movq %rax, -0x98(%rbp)
jmp 0x33a11
movq -0x98(%rbp), %rdi
leaq 0xb2b29(%rip), %rsi     # 0xe6548
callq 0x1bb10
movq %rax, -0xa8(%rbp)
jmp 0x33a2d
movq -0xa8(%rbp), %rdi
leaq 0xb5950(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0xb0(%rbp)
jmp 0x33a49
movq -0xb0(%rbp), %rsi
leaq -0x45(%rbp), %rdi
callq 0x194f0
jmp 0x33a5b
jmp 0x33a5d
testb $0x1, -0x31(%rbp)
jne 0x33a65
jmp 0x33a82
leaq -0x30(%rbp), %rdi
callq 0x19500
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x31(%rbp)
jne 0x33abd
jmp 0x33ac6
callq 0x342e0
movq -0x80(%rbp), %rdi
movq %rax, -0x50(%rbp)
addq $0x50, %rdi
callq 0x34310
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x27c50
testb $0x1, %al
jne 0x33aaf
jmp 0x33ac8
movq -0x88(%rbp), %rdi
callq 0x26280
jmp 0x33b13
leaq -0x30(%rbp), %rdi
callq 0x19500
jmp 0x33b1c
movq -0x88(%rbp), %rsi
leaq -0x78(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x26180
movq -0x80(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x33630
jmp 0x33af1
leaq -0x78(%rbp), %rdi
callq 0x1af20
jmp 0x33b13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x1af20
jmp 0x33b1c
addq $0xc0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0xe1080
nopw %cs:(%rax,%rax)
// File: romkatv[P]hcproxy/src/event_loop.cc
// Function: hcproxy::(anonymous namespace)::PopFunc(int)
void PopFunc(int pipe) {
  std::function<void()>* f;
  int n;
  CHECK((n = read(pipe, &f, sizeof(f))) == sizeof(f)) << Errno();
  (*f)();
  delete f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
leaq -0x10(%rbp), %rsi
movl $0x8, %edx
callq 0x15250
movl %eax, -0x14(%rbp)
cltq
movb $0x0, -0x39(%rbp)
cmpq $0x8, %rax
jne 0x33b60
jmp 0x33bdb
leaq 0xb1875(%rip), %rsi     # 0xe53dc
leaq -0x38(%rbp), %rdi
movq %rdi, -0x60(%rbp)
movl $0x1f, %edx
movl $0x3, %ecx
callq 0x194b0
movq -0x60(%rbp), %rdi
movb $0x1, -0x39(%rbp)
callq 0x194e0
movq %rax, %rdi
leaq 0xb1978(%rip), %rsi     # 0xe550d
callq 0x34330
movq %rax, -0x58(%rbp)
jmp 0x33ba0
movq -0x58(%rbp), %rdi
leaq 0xb57e0(%rip), %rsi     # 0xe938b
callq 0x19450
movq %rax, -0x68(%rbp)
jmp 0x33bb6
callq 0x1c0c0
movq -0x68(%rbp), %rdi
callq 0x1c050
movq %rax, -0x70(%rbp)
jmp 0x33bca
movq -0x70(%rbp), %rsi
leaq -0x4f(%rbp), %rdi
callq 0x194f0
jmp 0x33bd9
jmp 0x33bdb
testb $0x1, -0x39(%rbp)
jne 0x33be3
jmp 0x33c00
leaq -0x38(%rbp), %rdi
callq 0x19500
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
testb $0x1, -0x39(%rbp)
jne 0x33c37
jmp 0x33c40
movq -0x10(%rbp), %rdi
callq 0x26280
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, %rax
je 0x33c2e
movq -0x78(%rbp), %rdi
callq 0x1af20
movq -0x78(%rbp), %rdi
movl $0x20, %esi
callq 0x34c20
addq $0x80, %rsp
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x19500
jmp 0x33c42
movq -0x48(%rbp), %rdi
callq 0xe1080
nopl (%rax,%rax)
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: RandomlyGenNextCondition(Condition)
Condition RandomlyGenNextCondition(Condition last_condition) {
  switch (last_condition) {
  case Condition::Normal:
    // 1. Condition Excellent is not simulated: I don't have a good approximation on the probability
    // of transition Normal -> Excellent.  One source quotes the number 0.02, but that looks too
    // high to me.  Even the 0.25 probability of Normal -> Good is likely too high.
    return random_real() > 0.75 ? Condition::Good : Condition::Normal;
  case Condition::Good:
    return Condition::Normal;
  case Condition::Excellent:
    return Condition::Poor;
  case Condition::Poor:
    return Condition::Normal;
  default:
    ASSERT(false) << "Unsupported condition: " << static_cast<unsigned char>(last_condition);
    // Suppress compiler warning if ASSERT() is disabled.
    return Condition::Normal;
  }
}

// Assembly:
subq $0x18, %rsp
movb %dil, %al
movb %al, 0x16(%rsp)
movzbl 0x16(%rsp), %eax
movq %rax, 0x8(%rsp)
subq $0x3, %rax
ja 0x251d
movq 0x8(%rsp), %rax
leaq 0x10c31(%rip), %rcx     # 0x130f8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1b059(%rip), %rdi     # 0x1d530
callq 0x26f0
movsd 0x10b24(%rip), %xmm1    # 0x13008
movb $0x1, %al
xorl %ecx, %ecx
movb %cl, 0x6(%rsp)
ucomisd %xmm1, %xmm0
movb %al, 0x7(%rsp)
ja 0x24fe
movb 0x6(%rsp), %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
movb %al, 0x17(%rsp)
jmp 0x2522
movb $0x0, 0x17(%rsp)
jmp 0x2522
movb $0x3, 0x17(%rsp)
jmp 0x2522
movb $0x0, 0x17(%rsp)
jmp 0x2522
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: main
int main() {
  Driver driver;
  for (size_t count = 0; ; ++count) {
    driver.simulate();
    driver.train();
  }
  return 0;
}

// Assembly:
subq $0x228, %rsp            # imm = 0x228
movl $0x0, 0x224(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x27c0
movq $0x0, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x2930
jmp 0x25a1
leaq 0x20(%rsp), %rdi
callq 0x3730
jmp 0x25ad
jmp 0x25af
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x2595
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x10(%rsp)
movl %eax, 0xc(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x38c0
movq 0x10(%rsp), %rdi
callq 0x22c0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: Driver::train()
void train() {
    bool track_simulation = simulate_count % 16 == 0;
    const size_t size = training_data.size();
    for (size_t i = 0; i < 100; ++i) {
      ++train_count;
      size_t id = size * random_real();
      auto& example = training_data[id];
      scn.train(std::get<0>(example), std::get<1>(example), std::get<2>(example), step_size, track_simulation && i == 0);
    }
  }

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x30(%rsp)
movq (%rdi), %rax
andq $0xf, %rax
cmpq $0x0, %rax
sete %al
andb $0x1, %al
movb %al, 0x5f(%rsp)
addq $0x1b0, %rdi            # imm = 0x1B0
callq 0xe270
movq %rax, 0x50(%rsp)
movq $0x0, 0x48(%rsp)
cmpq $0x64, 0x48(%rsp)
jae 0x38b4
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rcx
incq %rcx
movq %rcx, 0x8(%rax)
movaps 0xf99c(%rip), %xmm1     # 0x13130
movq 0x50(%rsp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0xf99a(%rip), %xmm1     # 0x13140
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, (%rsp)
leaq 0x19d6f(%rip), %rdi     # 0x1d530
callq 0x26f0
movq 0x30(%rsp), %rdi
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
mulsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0xf82a(%rip), %xmm1     # 0x13018
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, 0x40(%rsp)
addq $0x1b0, %rdi            # imm = 0x1B0
movq 0x40(%rsp), %rsi
callq 0xfb00
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x38(%rsp)
addq $0x10, %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
callq 0xfb30
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
callq 0xfce0
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
callq 0xfcf0
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
xorl %eax, %eax
testb $0x1, 0x5f(%rsp)
movb %al, 0x2f(%rsp)
je 0x3875
cmpq $0x0, 0x48(%rsp)
sete %al
movb %al, 0x2f(%rsp)
movsd 0x20(%rsp), %xmm0
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
movb 0x2f(%rsp), %al
movzbl %al, %ecx
andl $0x1, %ecx
movsd 0xf784(%rip), %xmm1     # 0x13020
callq 0x123a0
movq 0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
jmp 0x3771
addq $0x68, %rsp
retq
nopl (%rax)
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: mlp::SoftMaxAndSigmoid::forward()
void forward(void) override final {
    // SoftMax
    double xmax = x(0);
    for (size_t i = 1; i < size; ++i) {
      xmax = std::max(xmax, x(i));
    }
    ASSERT(std::fabs(xmax) < 1.e100) << xmax;

    double sum = 0.;
    for (size_t i = 0; i < size; ++i) {
      y(i) = std::exp(x(i) - xmax);
      sum += y(i);
    }
    ASSERT(sum >= 1.0 && sum <= 1.01 * size) << sum;

    sum = 1.0 / sum;
    for (size_t i = 0; i < size; ++i) {
      y(i) *= sum;
    }

    // Sigmoid
    y(size) = 1. / (1. + std::exp(bias - x(size)));
  }

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8b00
movsd (%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movq $0x1, 0x40(%rsp)
movq 0x20(%rsp), %rcx
movq 0x40(%rsp), %rax
cmpq 0x18(%rcx), %rax
jae 0x9bbd
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x8b00
movq %rax, %rsi
leaq 0x48(%rsp), %rdi
callq 0x9f90
movsd (%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x9b73
xorps %xmm0, %xmm0
movsd %xmm0, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x20(%rsp), %rcx
movq 0x30(%rsp), %rax
cmpq 0x18(%rcx), %rax
jae 0x9c5d
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x30(%rsp), %rsi
callq 0x8b00
movsd (%rax), %xmm0
subsd 0x48(%rsp), %xmm0
callq 0x22e0
movq 0x20(%rsp), %rax
movsd %xmm0, 0x18(%rsp)
movq 0x10(%rax), %rdi
movq 0x30(%rsp), %rsi
callq 0x8b00
movsd 0x18(%rsp), %xmm0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movsd %xmm0, (%rcx)
movq 0x10(%rax), %rdi
movq 0x30(%rsp), %rsi
callq 0x8b00
movsd (%rax), %xmm0
addsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x9bcf
movsd 0x93c3(%rip), %xmm0     # 0x13028
divsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rax
cmpq 0x18(%rcx), %rax
jae 0x9cc7
movq 0x20(%rsp), %rax
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x10(%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x8b00
movsd 0x10(%rsp), %xmm0
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x9c7a
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x18(%rax), %rsi
callq 0x8b00
movsd 0x937f(%rip), %xmm0     # 0x13060
subsd (%rax), %xmm0
callq 0x22e0
movq 0x20(%rsp), %rax
movsd 0x9331(%rip), %xmm1     # 0x13028
addsd %xmm0, %xmm1
movsd 0x9325(%rip), %xmm0     # 0x13028
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x10(%rax), %rdi
movq 0x18(%rax), %rsi
callq 0x8b00
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
addq $0x58, %rsp
retq
nopl (%rax)
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: mlp::SoftMaxAndSigmoid::backward_propagate(double)
void backward_propagate(double) override final {
    // SoftMax
    double sum = 0.;
    for (size_t i = 0; i < size; ++i) {
      x.D(i) = y(i) * y.D(i);
      sum += x.D(i);
    }
    for (size_t i = 0; i < size; ++i) {
      x.D(i) -= y(i) * sum;
    }

    // Sigmoid
    x.D(size) = y.D(size) * y(size) * (1. - y(size));
  }

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movsd %xmm0, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x38(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
movq $0x0, 0x48(%rsp)
movq 0x38(%rsp), %rcx
movq 0x48(%rsp), %rax
cmpq 0x18(%rcx), %rax
jae 0x9e0b
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x48(%rsp), %rsi
callq 0x8b00
movq %rax, %rcx
movq 0x38(%rsp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x10(%rax), %rdi
movq 0x48(%rsp), %rsi
callq 0x8b30
movsd 0x28(%rsp), %xmm0
movq %rax, %rcx
movq 0x38(%rsp), %rax
mulsd (%rcx), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x8(%rax), %rdi
movq 0x48(%rsp), %rsi
callq 0x8b30
movsd 0x30(%rsp), %xmm0
movq %rax, %rcx
movq 0x38(%rsp), %rax
movsd %xmm0, (%rcx)
movq 0x8(%rax), %rdi
movq 0x48(%rsp), %rsi
callq 0x8b30
movsd (%rax), %xmm0
addsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
jmp 0x9d5b
movq $0x0, 0x40(%rsp)
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %rax
cmpq 0x18(%rcx), %rax
jae 0x9ead
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x8b00
movq %rax, %rcx
movq 0x38(%rsp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x8(%rax), %rdi
movq 0x40(%rsp), %rsi
callq 0x8b30
movsd 0x18(%rsp), %xmm0
movsd 0x20(%rsp), %xmm2
movsd (%rax), %xmm1
movq %xmm0, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
xorq %rdx, %rcx
movq %rcx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x9e14
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x18(%rax), %rsi
callq 0x8b30
movq %rax, %rcx
movq 0x38(%rsp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, (%rsp)
movq 0x10(%rax), %rdi
movq 0x18(%rax), %rsi
callq 0x8b00
movsd (%rsp), %xmm0
movq %rax, %rcx
movq 0x38(%rsp), %rax
mulsd (%rcx), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x10(%rax), %rdi
movq 0x18(%rax), %rsi
callq 0x8b00
movsd 0x8(%rsp), %xmm0
movq %rax, %rcx
movq 0x38(%rsp), %rax
movsd 0x9111(%rip), %xmm1     # 0x13028
subsd (%rcx), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x8(%rax), %rdi
movq 0x18(%rax), %rsi
callq 0x8b30
movsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rax)
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: UCT::initState(State const&)
double initState(const State& s) {
    ASSERT(all_states.find(s) == all_states.end()) << s.DebugString();

    StateStatistics stat;
    const mlp::Edge& edge = scn.forward(s);
    const std::array<double, TotalActionCount>& noise = dir.gen();
    const double eps = 0.25;
    for (size_t ac_id = 0; ac_id < TotalActionCount; ++ac_id) {
      Action ac = static_cast<Action>(ac_id);
      stat.prior(ac) = edge(ac_id) * (1. - eps) + eps * noise[ac_id];
      stat.count(ac) = 0;
      stat.value(ac) = 0.;
      if (!s.CanExecuteAction(ac)) {
        stat.setValid(ac, false);
      }
    }
    all_states.emplace(s, stat);
    return edge(TotalActionCount);
  }

// Assembly:
subq $0x328, %rsp            # imm = 0x328
movq %rdi, 0x320(%rsp)
movq %rsi, 0x318(%rsp)
movq 0x320(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xab80
movq 0x10(%rsp), %rax
movq 0x130(%rax), %rdi
movq 0x318(%rsp), %rsi
callq 0xabd0
movq 0x10(%rsp), %rdi
movq %rax, 0x48(%rsp)
callq 0xacf0
movq %rax, 0x40(%rsp)
movsd 0x88c5(%rip), %xmm0     # 0x13078
movsd %xmm0, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
cmpq $0x1d, 0x30(%rsp)
jae 0xa8a6
movq 0x30(%rsp), %rax
movb %al, 0x2f(%rsp)
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0xadf0
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0xae20
movsd (%rsp), %xmm0
movsd 0x886d(%rip), %xmm1     # 0x13078
mulsd (%rax), %xmm1
movsd 0x87f1(%rip), %xmm2     # 0x13008
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x50(%rsp), %rdi
movzbl 0x2f(%rsp), %esi
callq 0xae50
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
leaq 0x50(%rsp), %rdi
movzbl 0x2f(%rsp), %esi
callq 0xaea0
movq $0x0, (%rax)
leaq 0x50(%rsp), %rdi
movzbl 0x2f(%rsp), %esi
callq 0xaef0
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movq 0x318(%rsp), %rdi
movzbl 0x2f(%rsp), %esi
callq 0xaf40
testb $0x1, %al
jne 0xa891
leaq 0x50(%rsp), %rdi
xorl %edx, %edx
movzbl 0x2f(%rsp), %esi
callq 0xb140
jmp 0xa893
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0xa7c2
movq 0x10(%rsp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq 0x318(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0xb1c0
movq %rax, 0x18(%rsp)
movb %dl, 0x20(%rsp)
movq 0x48(%rsp), %rdi
movl $0x1d, %esi
callq 0xadf0
movsd (%rax), %xmm0
addq $0x328, %rsp            # imm = 0x328
retq
nopl (%rax,%rax)
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: State::IsActionSupported(Action) const
bool IsActionSupported(Action ac) const {
    switch (ac) {
    case Action::Reuse:
      return false;
    default:
      return true;
    }
  }

// Assembly:
movb %sil, %al
movq %rdi, -0x10(%rsp)
movb %al, -0x11(%rsp)
movb -0x11(%rsp), %al
subb $0x18, %al
jne 0xbe4d
jmp 0xbe46
movb $0x0, -0x1(%rsp)
jmp 0xbe52
movb $0x1, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nopl (%rax)
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: State::operator==(State const&) const
bool operator==(const State& s) const {
    if (done() || s.done()) {
      return done() && s.done() ? quality == s.quality : false;
    }
    // Otherwise, none of the 2 states are finished.
    if (cp != s.cp) return false;
    if (progress != s.progress) return false;
    if (quality != s.quality) return false;
    if (durability != s.durability) return false;
    if (inner_quiet != s.inner_quiet) return false;
    if (condition != s.condition) return false;
    for (unsigned i = 0; i < Buff2ID(Buff::NumBuffs); ++i) {
      if (buff[i] != s.buff[i]) return false;
    }
    return true;
  }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xd0f0
testb $0x1, %al
jne 0xcf51
movq 0x20(%rsp), %rdi
callq 0xd0f0
testb $0x1, %al
jne 0xcf51
jmp 0xcfa5
movq 0x10(%rsp), %rdi
callq 0xd0f0
testb $0x1, %al
jne 0xcf61
jmp 0xcf8e
movq 0x20(%rsp), %rdi
callq 0xd0f0
testb $0x1, %al
jne 0xcf71
jmp 0xcf8e
movq 0x10(%rsp), %rax
movswl 0x4(%rax), %eax
movq 0x20(%rsp), %rcx
movswl 0x4(%rcx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, 0xf(%rsp)
jmp 0xcf96
xorl %eax, %eax
movb %al, 0xf(%rsp)
jmp 0xcf96
movb 0xf(%rsp), %al
andb $0x1, %al
movb %al, 0x37(%rsp)
jmp 0xd0db
movq 0x10(%rsp), %rax
movswl (%rax), %eax
movq 0x20(%rsp), %rcx
movswl (%rcx), %ecx
cmpl %ecx, %eax
je 0xcfc3
movb $0x0, 0x37(%rsp)
jmp 0xd0db
movq 0x10(%rsp), %rax
movswl 0x2(%rax), %eax
movq 0x20(%rsp), %rcx
movswl 0x2(%rcx), %ecx
cmpl %ecx, %eax
je 0xcfe3
movb $0x0, 0x37(%rsp)
jmp 0xd0db
movq 0x10(%rsp), %rax
movswl 0x4(%rax), %eax
movq 0x20(%rsp), %rcx
movswl 0x4(%rcx), %ecx
cmpl %ecx, %eax
je 0xd003
movb $0x0, 0x37(%rsp)
jmp 0xd0db
movq 0x10(%rsp), %rax
movswl 0x6(%rax), %eax
movq 0x20(%rsp), %rcx
movswl 0x6(%rcx), %ecx
cmpl %ecx, %eax
je 0xd023
movb $0x0, 0x37(%rsp)
jmp 0xd0db
movq 0x10(%rsp), %rax
movzbl 0x8(%rax), %eax
movq 0x20(%rsp), %rcx
movzbl 0x8(%rcx), %ecx
cmpl %ecx, %eax
je 0xd043
movb $0x0, 0x37(%rsp)
jmp 0xd0db
movq 0x10(%rsp), %rax
movb 0x9(%rax), %al
movq 0x20(%rsp), %rcx
cmpb 0x9(%rcx), %al
je 0xd05c
movb $0x0, 0x37(%rsp)
jmp 0xd0db
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0x8(%rsp)
movl $0x9, %edi
callq 0x6b30
movb %al, %cl
movl 0x8(%rsp), %eax
movzbl %cl, %ecx
cmpl %ecx, %eax
jae 0xd0d6
movq 0x10(%rsp), %rdi
addq $0xa, %rdi
movl 0x1c(%rsp), %eax
movl %eax, %esi
callq 0xb600
movzbl (%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rdi
addq $0xa, %rdi
movl 0x1c(%rsp), %eax
movl %eax, %esi
callq 0xb600
movq %rax, %rcx
movl 0x4(%rsp), %eax
movzbl (%rcx), %ecx
cmpl %ecx, %eax
je 0xd0c7
movb $0x0, 0x37(%rsp)
jmp 0xd0db
jmp 0xd0c9
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0xd064
movb $0x1, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: UCT::select(State const&, double)
Action select(const State& s, double inv_temp) {
    ASSERT(all_states.find(s) != all_states.end()) << s.DebugString();
    std::array<double, TotalActionCount> p;

    double sum = 0.;
    StateStatistics& stat = all_states.at(s);
    for (size_t ac_id = 0; ac_id < TotalActionCount; ++ac_id) {
      Action ac = static_cast<Action>(ac_id);
      if (stat.valid(ac)) {
        p[ac_id] = std::pow(stat.count(ac), inv_temp);
        sum += p[ac_id];
      } else {
        p[ac_id] = 0.;
      }
    }
    if (sum == 0.) {
      return Action::NumActions; // Resign.
    }
    double r = random_real() * sum;
    for (size_t ac_id = 0; ac_id < TotalActionCount; ++ac_id) {
      Action ac = static_cast<Action>(ac_id);
      if (!stat.valid(ac)) continue;
      r -= p[ac_id];
      if (r < 0.) {
        return ac;
      }
    }
    ASSERT(false) << s.DebugString() << " " << stat.DebugString();
    return Action::NumActions;
  }

// Assembly:
subq $0x148, %rsp            # imm = 0x148
movq %rdi, 0x138(%rsp)
movq %rsi, 0x130(%rsp)
movsd %xmm0, 0x128(%rsp)
movq 0x138(%rsp), %rdi
xorps %xmm0, %xmm0
movsd %xmm0, 0x38(%rsp)
addq $0x138, %rdi            # imm = 0x138
movq 0x130(%rsp), %rsi
callq 0x10a20
movq %rax, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
cmpq $0x1d, 0x28(%rsp)
jae 0xef46
movq 0x28(%rsp), %rax
movb %al, 0x27(%rsp)
movq 0x30(%rsp), %rdi
movzbl 0x27(%rsp), %esi
callq 0x10f20
testb $0x1, %al
jne 0xeebd
jmp 0xef1b
movq 0x30(%rsp), %rdi
movzbl 0x27(%rsp), %esi
callq 0xaea0
movq (%rax), %rdi
movsd 0x128(%rsp), %xmm0
callq 0x11150
movsd %xmm0, (%rsp)
movq 0x28(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0xb7c0
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x28(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0xb7c0
movsd (%rax), %xmm0
addsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
jmp 0xef31
movq 0x28(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0xb7c0
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
jmp 0xef33
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0xee93
movsd 0x38(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xef64
jp 0xef64
movb $0x1d, 0x147(%rsp)
jmp 0xf000
leaq 0xe5c5(%rip), %rdi      # 0x1d530
callq 0x26f0
mulsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
cmpq $0x1d, 0x10(%rsp)
jae 0xeff8
movq 0x10(%rsp), %rax
movb %al, 0xf(%rsp)
movq 0x30(%rsp), %rdi
movzbl 0xf(%rsp), %esi
callq 0x10f20
testb $0x1, %al
jne 0xefab
jmp 0xefe8
movq 0x10(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0xb7c0
movsd (%rax), %xmm1
movsd 0x18(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x18(%rsp), %xmm0
jbe 0xefe6
movb 0xf(%rsp), %al
movb %al, 0x147(%rsp)
jmp 0xf000
jmp 0xefe8
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0xef85
movb $0x1d, 0x147(%rsp)
movb 0x147(%rsp), %al
addq $0x148, %rsp            # imm = 0x148
retq
nop
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: State::ExecuteAction(Action)
bool ExecuteAction(Action ac) {
    const short percentage = SuccessPercentage(ac);
    const bool is_action_successful = percentage >= 100 ? true : random_real() * 100 < percentage;
    Condition next_condition = RandomlyGenNextCondition(condition);
    return DeterministicExecuteAction(ac, is_action_successful, next_condition);
  }

// Assembly:
subq $0x28, %rsp
movb %sil, %al
movq %rdi, 0x20(%rsp)
movb %al, 0x1f(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movzbl 0x1f(%rsp), %esi
callq 0x111a0
movw %ax, 0x1c(%rsp)
movswl 0x1c(%rsp), %eax
cmpl $0x64, %eax
jl 0xfa8b
movb $0x1, %al
movb %al, 0xf(%rsp)
jmp 0xfaba
leaq 0xda9e(%rip), %rdi      # 0x1d530
callq 0x26f0
movaps %xmm0, %xmm1
movsd 0x35fe(%rip), %xmm0     # 0x130a0
mulsd %xmm0, %xmm1
movswl 0x1c(%rsp), %eax
cvtsi2sd %eax, %xmm0
ucomisd %xmm1, %xmm0
seta %al
movb %al, 0xf(%rsp)
movq 0x10(%rsp), %rax
movb 0xf(%rsp), %cl
andb $0x1, %cl
movb %cl, 0x1b(%rsp)
movzbl 0x9(%rax), %edi
callq 0x24a0
movq 0x10(%rsp), %rdi
movb %al, 0x1a(%rsp)
movb 0x1f(%rsp), %cl
movb 0x1b(%rsp), %al
andb $0x1, %al
movzbl %cl, %esi
movzbl %al, %edx
movzbl 0x1a(%rsp), %ecx
callq 0x11230
andb $0x1, %al
addq $0x28, %rsp
retq
nopl (%rax)
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: UCT::set_target_probability(State const&, double, std::array<double, 29ul>&)
void set_target_probability(const State& s, double inv_temp,
                              std::array<double, TotalActionCount>& p) {
    ASSERT(!s.done()) << s.DebugString();
    ASSERT(all_states.find(s) != all_states.end()) << s.DebugString();
    StateStatistics& stat = all_states.at(s);
    ASSERT(stat.total_count > 0) << s.DebugString() << " " << stat.DebugString();
    double sum = 0.;
    for (size_t ac_id = 0; ac_id < TotalActionCount; ++ac_id) {
      Action ac = static_cast<Action>(ac_id);
      if (stat.valid(ac) && stat.count(ac) > 0) {
        p[ac_id] = std::pow((double)stat.count(ac), inv_temp);
      } else {
        p[ac_id] = 0.1;
      }
      sum += p[ac_id];
    }
    ASSERT(sum >= 1) << s.DebugString() << " " << stat.DebugString();
    sum = 1. / sum;
    for (size_t ac_id = 0; ac_id < TotalActionCount; ++ac_id) {
      p[ac_id] *= sum;
    }
  }

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movsd %xmm0, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x50(%rsp), %rdi
addq $0x138, %rdi            # imm = 0x138
movq 0x48(%rsp), %rsi
callq 0x10a20
movq %rax, 0x30(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
cmpq $0x1d, 0x20(%rsp)
jae 0xfc73
movq 0x20(%rsp), %rax
movb %al, 0x1f(%rsp)
movq 0x30(%rsp), %rdi
movzbl 0x1f(%rsp), %esi
callq 0x10f20
testb $0x1, %al
jne 0xfbb0
jmp 0xfc26
movq 0x30(%rsp), %rdi
movzbl 0x1f(%rsp), %esi
callq 0xaea0
cmpq $0x0, (%rax)
jbe 0xfc26
movq 0x30(%rsp), %rdi
movzbl 0x1f(%rsp), %esi
callq 0xaea0
movq (%rax), %xmm0
movaps 0x3551(%rip), %xmm1     # 0x13130
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x3555(%rip), %xmm1     # 0x13140
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x40(%rsp), %xmm1
callq 0x22b0
movsd %xmm0, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xb7c0
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
jmp 0xfc41
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xb7c0
movsd 0x346b(%rip), %xmm0     # 0x130a8
movsd %xmm0, (%rax)
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0xb7c0
movsd (%rax), %xmm0
addsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0xfb86
movsd 0x33ad(%rip), %xmm0     # 0x13028
divsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movq $0x0, 0x10(%rsp)
cmpq $0x1d, 0x10(%rsp)
jae 0xfccf
movsd 0x28(%rsp), %xmm0
movsd %xmm0, (%rsp)
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0xb7c0
movsd (%rsp), %xmm0
mulsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0xfc90
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: State::SuccessPercentage(Action) const
short SuccessPercentage(Action ac) const {
    if ((ac == Action::FocusedSynthesis || ac == Action::FocusedTouch)
        && buff[Buff2ID(Buff::Observe)] > 0) {
      return 100;
    }
    return ALL_ACTIONS[Action2ID(ac)].probability_percentage;
  }

// Assembly:
subq $0x28, %rsp
movb %sil, %al
movq %rdi, 0x18(%rsp)
movb %al, 0x17(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpb $0x6, 0x17(%rsp)
je 0x111c8
cmpb $0x7, 0x17(%rsp)
jne 0x111fe
movq 0x8(%rsp), %rax
addq $0xa, %rax
movq %rax, (%rsp)
movl $0x7, %edi
callq 0x6b30
movq (%rsp), %rdi
movzbl %al, %eax
movl %eax, %esi
callq 0xb600
movzbl (%rax), %eax
cmpl $0x0, %eax
jle 0x111fe
movw $0x64, 0x26(%rsp)
jmp 0x11222
movzbl 0x17(%rsp), %edi
callq 0x2740
movzbl %al, %eax
movl %eax, %esi
leaq 0xa8ac(%rip), %rdi      # 0x1bac0
callq 0x2710
movw 0xa(%rax), %ax
movw %ax, 0x26(%rsp)
movw 0x26(%rsp), %ax
addq $0x28, %rsp
retq
nopl (%rax)
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: State::DeterministicExecuteAction(Action, bool, Condition)
bool DeterministicExecuteAction(Action ac, bool is_action_successful, Condition next_condition) {
    Check();
    ASSERT(!done()) << DebugString();
    ASSERT(SuccessPercentage(ac) < 100 || is_action_successful)
      << "Action can not fail: " << ALL_ACTIONS[Action2ID(ac)].name;
    ASSERT(CheckConditionTransition(next_condition))
      << "Impossible condition transition: " << DebugString() << " " << static_cast<unsigned>(next_condition);
    if (CanExecuteAction(ac)) {
      // Apply any effect in cp, durability, progress, quality, and inner quiet stack.  Change in cp
      // and durability is always carried out, while others only when the action is successful.
      ApplyCPDurabilityChange(ac);
      if (is_action_successful) {
        ApplyProgressChange(ac);
        ApplyQualityChange(ac);
      }
      ApplyInnerQuietChange(ac, is_action_successful);
      ApplyPersistentBuffEffect(ac);
      if (is_action_successful) {
        ApplyBuffChange(ac);
      }
      condition = next_condition;
      return true;
    } else {
      return false;
    }
  }

// Assembly:
subq $0x28, %rsp
movb %cl, %al
movb %dl, %cl
movb %sil, %dl
movq %rdi, 0x18(%rsp)
movb %dl, 0x17(%rsp)
andb $0x1, %cl
movb %cl, 0x16(%rsp)
movb %al, 0x15(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x11310
movq 0x8(%rsp), %rdi
movzbl 0x17(%rsp), %esi
callq 0xaf40
testb $0x1, %al
jne 0x11276
jmp 0x112fc
movq 0x8(%rsp), %rdi
movzbl 0x17(%rsp), %esi
callq 0x11320
testb $0x1, 0x16(%rsp)
je 0x112aa
movq 0x8(%rsp), %rdi
movzbl 0x17(%rsp), %esi
callq 0x11420
movq 0x8(%rsp), %rdi
movzbl 0x17(%rsp), %esi
callq 0x11580
movq 0x8(%rsp), %rdi
movb 0x17(%rsp), %cl
movb 0x16(%rsp), %al
andb $0x1, %al
movzbl %cl, %esi
movzbl %al, %edx
callq 0x11880
movq 0x8(%rsp), %rdi
movzbl 0x17(%rsp), %esi
callq 0x11990
testb $0x1, 0x16(%rsp)
je 0x112e9
movq 0x8(%rsp), %rdi
movzbl 0x17(%rsp), %esi
callq 0x11a80
movq 0x8(%rsp), %rax
movb 0x15(%rsp), %cl
movb %cl, 0x9(%rax)
movb $0x1, 0x27(%rsp)
jmp 0x11301
movb $0x0, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopl (%rax)
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: State::ApplyCPDurabilityChange(Action)
void ApplyCPDurabilityChange(Action ac) {
    const ActionParams& ac_effect = ALL_ACTIONS[Action2ID(ac)];
    // Apply any CP changes.  Assume that CP check has been done already.
    cp += ac_effect.d_cp;
    if (cp > params.max_cp) {
      cp = params.max_cp;
    }
    ASSERT(cp >= 0) << DebugString() << " " << ac_effect.name;

    // Apply any durability and progress changes.  This needs to take Waste Not or Waste Not II into
    // consideration.  Durability after this action can become negative.
    short d_durability = ac_effect.d_durability;
    if (d_durability == 0) {
      return;
    }
    if (d_durability < 0 && buff[Buff2ID(Buff::WasteNot)] > 0) {
      ASSERT(d_durability % 2 == 0) << static_cast<unsigned char>(ac) << " " << d_durability;
      d_durability /= 2;
    }
    durability += d_durability;
    if (durability > params.max_durability) {
      durability = params.max_durability;
    }
  }

// Assembly:
subq $0x38, %rsp
movb %sil, %al
movq %rdi, 0x30(%rsp)
movb %al, 0x2f(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movzbl 0x2f(%rsp), %edi
callq 0x2740
movzbl %al, %eax
movl %eax, %esi
leaq 0xa770(%rip), %rdi      # 0x1bac0
callq 0x2710
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x20(%rsp)
movq 0x20(%rsp), %rcx
movsbl 0x8(%rcx), %edx
movswl (%rax), %ecx
addl %edx, %ecx
movw %cx, (%rax)
movswl (%rax), %eax
cmpl $0x21c, %eax            # imm = 0x21C
jle 0x11387
movq 0x10(%rsp), %rax
movw $0x21c, (%rax)          # imm = 0x21C
movq 0x20(%rsp), %rax
movsbl 0x9(%rax), %eax
movw %ax, 0x1e(%rsp)
movswl 0x1e(%rsp), %eax
cmpl $0x0, %eax
jne 0x113a1
jmp 0x11414
movswl 0x1e(%rsp), %eax
cmpl $0x0, %eax
jge 0x113ec
movq 0x10(%rsp), %rax
addq $0xa, %rax
movq %rax, 0x8(%rsp)
movl $0x5, %edi
callq 0x6b30
movq 0x8(%rsp), %rdi
movzbl %al, %eax
movl %eax, %esi
callq 0x11d30
movzbl (%rax), %eax
cmpl $0x0, %eax
jle 0x113ec
movswl 0x1e(%rsp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movw %ax, 0x1e(%rsp)
movq 0x10(%rsp), %rax
movswl 0x1e(%rsp), %edx
movswl 0x6(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x6(%rax)
movswl 0x6(%rax), %eax
cmpl $0x46, %eax
jle 0x11414
movq 0x10(%rsp), %rax
movw $0x46, 0x6(%rax)
addq $0x38, %rsp
retq
nopl (%rax)
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: State::ApplyProgressChange(Action)
void ApplyProgressChange(Action ac) {
    const ActionParams& ac_effect = ALL_ACTIONS[Action2ID(ac)];
    if (!(ac_effect.flags & PROGRESS)) {
      return;
    }
    unsigned efficiency = ac_effect.efficiency;
    short d_progress = buff[Buff2ID(Buff::Ingenuity)] > 0 ? params.ig_progress : params.base_progress;
    d_progress *= efficiency / 100.;
    progress += d_progress;

    if (progress < params.max_progress) {
      return;
    }
    if (buff[Buff2ID(Buff::FinalAppraisal)] > 0) {
      progress = params.max_progress - 1;
      buff[Buff2ID(Buff::FinalAppraisal)] = 0;
    } else {
      progress = params.max_progress;
    }
  }

// Assembly:
subq $0x48, %rsp
movb %sil, %al
movq %rdi, 0x40(%rsp)
movb %al, 0x3f(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x20(%rsp)
movzbl 0x3f(%rsp), %edi
callq 0x2740
movzbl %al, %eax
movl %eax, %esi
leaq 0xa670(%rip), %rdi      # 0x1bac0
callq 0x2710
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movzwl 0xe(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x11470
jmp 0x11576
movq 0x20(%rsp), %rax
movq 0x30(%rsp), %rcx
movswl 0xc(%rcx), %ecx
movl %ecx, 0x2c(%rsp)
addq $0xa, %rax
movq %rax, 0x18(%rsp)
movl $0x6, %edi
callq 0x6b30
movq 0x18(%rsp), %rdi
movzbl %al, %eax
movl %eax, %esi
callq 0x11d30
movq %rax, %rcx
movq 0x20(%rsp), %rax
movzbl (%rcx), %ecx
testl %ecx, %ecx
movl $0x16d, %edx            # imm = 0x16D
movl $0x27f, %ecx            # imm = 0x27F
cmovgl %edx, %ecx
movw %cx, 0x2a(%rsp)
movl 0x2c(%rsp), %ecx
cvtsi2sd %rcx, %xmm1
movsd 0x1bcc(%rip), %xmm0     # 0x130a0
divsd %xmm0, %xmm1
movswl 0x2a(%rsp), %ecx
cvtsi2sd %ecx, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movw %cx, 0x2a(%rsp)
movswl 0x2a(%rsp), %edx
movswl 0x2(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x2(%rax)
movswl 0x2(%rax), %eax
cmpl $0x160d, %eax           # imm = 0x160D
jge 0x1150a
jmp 0x11576
movq 0x20(%rsp), %rax
addq $0xa, %rax
movq %rax, 0x10(%rsp)
movl $0x8, %edi
callq 0x6b30
movq 0x10(%rsp), %rdi
movzbl %al, %eax
movl %eax, %esi
callq 0x11d30
movzbl (%rax), %eax
cmpl $0x0, %eax
jle 0x1156b
movq 0x20(%rsp), %rax
movw $0x160c, 0x2(%rax)      # imm = 0x160C
addq $0xa, %rax
movq %rax, 0x8(%rsp)
movl $0x8, %edi
callq 0x6b30
movq 0x8(%rsp), %rdi
movzbl %al, %eax
movl %eax, %esi
callq 0x11d30
movb $0x0, (%rax)
jmp 0x11576
movq 0x20(%rsp), %rax
movw $0x160d, 0x2(%rax)      # imm = 0x160D
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: State::ApplyInnerQuietChange(Action, bool)
void ApplyInnerQuietChange(Action ac, bool is_action_successful) {
    if (inner_quiet > 0) {
      if (is_action_successful) {
        switch (ac) {
        case Action::BasicTouch:
        case Action::DelicateSynthesis:
        case Action::FocusedTouch:
        case Action::HastyTouch:
        case Action::PrudentTouch:
        case Action::StandardTouch:
          inner_quiet += 1;
          break;
        case Action::PreparatoryTouch:
        case Action::PreciseTouch:
          inner_quiet += 2;
          break;
        case Action::ByregotsBlessing:
          inner_quiet = 0;
          break;
        case Action::PatientTouch:
          inner_quiet *= 2;
          break;
        case Action::InnerQuiet:
          ASSERT(false) << DebugString();
          break;
        default:
          break;
        }
        if (inner_quiet > 11) {
          inner_quiet = 11;
        }
      } else if (ac == Action::PatientTouch) {
        inner_quiet = (inner_quiet + 1) / 2;
      }
    } else if (ac == Action::InnerQuiet) {
      inner_quiet = 1;
    } else if (ac == Action::Reflect) {
      inner_quiet = 3;
    }
  }

// Assembly:
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rsp)
movb %cl, -0x9(%rsp)
andb $0x1, %al
movb %al, -0xa(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movzbl 0x8(%rax), %eax
cmpl $0x0, %eax
jle 0x11960
testb $0x1, -0xa(%rsp)
je 0x11937
movb -0x9(%rsp), %al
decb %al
movzbl %al, %ecx
movq %rcx, -0x20(%rsp)
subb $0x18, %al
ja 0x1191c
movq -0x20(%rsp), %rax
leaq 0x18fc(%rip), %rcx      # 0x131d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rsp), %rax
movzbl 0x8(%rax), %ecx
addl $0x1, %ecx
movb %cl, 0x8(%rax)
jmp 0x1191e
movq -0x18(%rsp), %rax
movzbl 0x8(%rax), %ecx
addl $0x2, %ecx
movb %cl, 0x8(%rax)
jmp 0x1191e
movq -0x18(%rsp), %rax
movb $0x0, 0x8(%rax)
jmp 0x1191e
movq -0x18(%rsp), %rax
movzbl 0x8(%rax), %ecx
shll %ecx
movb %cl, 0x8(%rax)
jmp 0x1191e
jmp 0x1191e
jmp 0x1191e
movq -0x18(%rsp), %rax
movzbl 0x8(%rax), %eax
cmpl $0xb, %eax
jle 0x11935
movq -0x18(%rsp), %rax
movb $0xb, 0x8(%rax)
jmp 0x1195e
cmpb $0x12, -0x9(%rsp)
jne 0x1195c
movq -0x18(%rsp), %rax
movzbl 0x8(%rax), %eax
addl $0x1, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x18(%rsp), %rax
movb %cl, 0x8(%rax)
jmp 0x1195e
jmp 0x11986
cmpb $0xb, -0x9(%rsp)
jne 0x11972
movq -0x18(%rsp), %rax
movb $0x1, 0x8(%rax)
jmp 0x11984
cmpb $0x17, -0x9(%rsp)
jne 0x11982
movq -0x18(%rsp), %rax
movb $0x3, 0x8(%rax)
jmp 0x11984
jmp 0x11986
retq
nopw (%rax,%rax)
// File: hantaoyin[P]ffxiv-crafting-mcts/ffxiv-crafting-mcts.C
// Function: State::ApplyPersistentBuffEffect(Action)
void ApplyPersistentBuffEffect(Action ac) {
    if (buff[Buff2ID(Buff::Manipulation)] > 0 && ac != Action::Manipulation) {
      durability += 5;
      if (durability > params.max_durability) {
        durability = params.max_durability;
      }
    }
    // Decrease all active buff counters by 1.
    for (auto& b : buff) {
      if (b > 0) --b;
    }

// Assembly:
subq $0x48, %rsp
movb %sil, %al
movq %rdi, 0x40(%rsp)
movb %al, 0x3f(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
addq $0xa, %rax
movq %rax, 0x10(%rsp)
movl $0x3, %edi
callq 0x6b30
movq 0x10(%rsp), %rdi
movzbl %al, %eax
movl %eax, %esi
callq 0x11d30
movzbl (%rax), %eax
cmpl $0x0, %eax
jle 0x11a01
cmpb $0xe, 0x3f(%rsp)
je 0x11a01
movq 0x8(%rsp), %rax
movswl 0x6(%rax), %ecx
addl $0x5, %ecx
movw %cx, 0x6(%rax)
movswl 0x6(%rax), %eax
cmpl $0x46, %eax
jle 0x119ff
movq 0x8(%rsp), %rax
movw $0x46, 0x6(%rax)
jmp 0x11a01
movq 0x8(%rsp), %rax
addq $0xa, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
callq 0x11d60
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
callq 0x11d70
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x11a6e
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jle 0x11a5c
movq 0x18(%rsp), %rax
movb (%rax), %cl
addb $-0x1, %cl
movb %cl, (%rax)
jmp 0x11a5e
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x11a2d
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)