LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/harry830622[P]floorplanner/src/net.cpp
// Function: Net::Net(std::vector<int, std::allocator<int>> const&, std::vector<Point, std::allocator<Point>> const&)
Net::Net(const vector<int>& macro_ids,
         const vector<Point>& terminal_coordinates)
    : min_x_(numeric_limits<double>::max()),
      min_y_(numeric_limits<double>::max()),
      max_x_(numeric_limits<double>::lowest()),
      max_y_(numeric_limits<double>::lowest()),
      macro_ids_(macro_ids) {
  for (const Point& terminal_coordinate : terminal_coordinates) {
    const double terminal_x = terminal_coordinate.x();
    const double terminal_y = terminal_coordinate.y();
    if (terminal_x < min_x_) {
      min_x_ = terminal_x;
    }
    if (terminal_y < min_y_) {
      min_y_ = terminal_y;
    }
    if (terminal_x > max_x_) {
      max_x_ = terminal_x;
    }
    if (terminal_y > max_y_) {
      max_y_ = terminal_y;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rdi, %r14
movaps 0x25ff(%rip), %xmm0     # 0x1cc10
movups %xmm0, (%rdi)
movapd 0x2604(%rip), %xmm0     # 0x1cc20
movupd %xmm0, 0x10(%rdi)
leaq 0x20(%rdi), %rbx
movq %rbx, %rdi
callq 0x12242
movq (%r12), %r15
movq 0x8(%r12), %r12
cmpq %r12, %r15
je 0x1a69f
movq %r15, %rdi
callq 0x1aa7e
movsd %xmm0, (%rsp)
movq %r15, %rdi
callq 0x1aa84
movsd (%r14), %xmm1
ucomisd (%rsp), %xmm1
jbe 0x1a666
movsd (%rsp), %xmm1
movsd %xmm1, (%r14)
movsd 0x8(%r14), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x1a678
movsd %xmm0, 0x8(%r14)
movsd (%rsp), %xmm1
ucomisd 0x10(%r14), %xmm1
jbe 0x1a68b
movsd %xmm1, 0x10(%r14)
ucomisd 0x18(%r14), %xmm0
jbe 0x1a699
movsd %xmm0, 0x18(%r14)
addq $0x10, %r15
jmp 0x1a636
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x1a6ad
movq %rax, %r14
movq %rbx, %rdi
callq 0x9c64
movq %r14, %rdi
callq 0x7660
// File: /workspace/github_cpp_makefile_star2_O2/harry830622[P]floorplanner/src/net.cpp
// Function: Net::ComputeWirelength(std::vector<std::pair<Point, Point>, std::allocator<std::pair<Point, Point>>>) const
double Net::ComputeWirelength(
    vector<pair<Point, Point>> macro_bounding_box_by_id) const {
  double min_x = min_x_;
  double min_y = min_y_;
  double max_x = max_x_;
  double max_y = max_y_;
  for (int macro_id : macro_ids_) {
    auto bounding_box = macro_bounding_box_by_id.at(macro_id);
    Point center = Point::Center(bounding_box.first, bounding_box.second);
    double x = center.x();
    double y = center.y();
    if (x < min_x) {
      min_x = x;
    }
    if (x > max_x) {
      max_x = x;
    }
    if (y < min_y) {
      min_y = y;
    }
    if (y > max_y) {
      max_y = y;
    }
  }
  return Point::HPWL(Point(min_x, min_y), Point(max_x, max_y));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movupd (%rdi), %xmm2
movupd 0x10(%rdi), %xmm0
movapd %xmm0, (%rsp)
movq 0x20(%rdi), %r13
movq 0x28(%rdi), %rbp
leaq 0x30(%rsp), %r14
leaq 0x20(%rsp), %r15
leaq 0x10(%rsp), %r12
cmpq %rbp, %r13
je 0x1a9f3
movslq (%r13), %rsi
movq %rbx, %rdi
movapd %xmm2, 0x50(%rsp)
callq 0xd5c6
movupd (%rax), %xmm0
movups 0x10(%rax), %xmm1
movapd %xmm0, 0x20(%rsp)
movaps %xmm1, 0x30(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x1aa8a
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x18(%rsp)
movq %r12, %rdi
callq 0x1aa7e
movapd %xmm0, 0x40(%rsp)
movq %r12, %rdi
callq 0x1aa84
movapd 0x40(%rsp), %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
movapd %xmm1, %xmm2
minpd 0x50(%rsp), %xmm2
maxpd (%rsp), %xmm1
addq $0x4, %r13
movapd %xmm1, (%rsp)
jmp 0x1a978
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movapd %xmm2, %xmm0
callq 0x1aaa8
movaps (%rsp), %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x1aaa8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1aa60
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/harry830622[P]floorplanner/src/point.cpp
// Function: Point::Print(std::ostream&, int) const
void Point::Print(ostream& os, int indent_level) const {
  const int indent_size = 2;
  os << string(indent_level * indent_size, ' ') << "Point:" << endl;
  ++indent_level;
  os << string(indent_level * indent_size, ' ') << "x_: " << x_ << endl;
  os << string(indent_level * indent_size, ' ') << "y_: " << y_ << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
addl %edx, %ebp
movslq %ebp, %rsi
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x8(%rsp), %rdi
pushq $0x20
popq %rdx
callq 0x7400
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x7330
leaq 0x2189(%rip), %rsi      # 0x1cc80
movq %rax, %rdi
callq 0x7380
movq %rax, %rdi
callq 0x71c0
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7758
addl $0x2, %ebp
movslq %ebp, %r15
movq %r13, (%r12)
leaq 0x8(%rsp), %rdi
pushq $0x20
popq %rdx
movq %r15, %rsi
callq 0x7400
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x7330
leaq 0x2145(%rip), %rsi      # 0x1cc87
movq %rax, %rdi
callq 0x7380
movsd (%rbx), %xmm0
movq %rax, %rdi
callq 0x75a0
movq %rax, %rdi
callq 0x71c0
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x7758
movq %r13, (%r12)
leaq 0x8(%rsp), %rdi
pushq $0x20
popq %rdx
movq %r15, %rsi
callq 0x7400
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x7330
leaq 0x54d(%rip), %rsi       # 0x1b0e0
movq %rax, %rdi
callq 0x7380
movsd 0x8(%rbx), %xmm0
movq %rax, %rdi
callq 0x75a0
movq %rax, %rdi
callq 0x71c0
leaq 0x8(%rsp), %rdi
callq 0x7758
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1abcd
jmp 0x1abcd
movq %rax, %rbx
jmp 0x1abe3
jmp 0x1abd6
jmp 0x1abd6
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7758
movq %rbx, %rdi
callq 0x7660
nop
// File: /workspace/github_cpp_makefile_star2_O2/harry830622[P]floorplanner/src/terminal.cpp
// Function: Terminal::Print(std::ostream&, int) const
void Terminal::Print(ostream& os, int indent_level) const {
  const int indent_size = 2;
  os << string(indent_level * indent_size, ' ') << "Terminal:" << endl;
  ++indent_level;
  os << string(indent_level * indent_size, ' ') << "name_: " << name_ << endl;
  os << string(indent_level * indent_size, ' ') << "coordinates_:" << endl;
  coordinates_.Print(os, indent_level + 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leal (%rbx,%rbx), %r12d
movslq %r12d, %rsi
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x8(%rsp), %rdi
pushq $0x20
popq %rdx
callq 0x7400
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x7330
leaq 0x200d(%rip), %rsi      # 0x1cc8c
movq %rax, %rdi
callq 0x7380
movq %rax, %rdi
callq 0x71c0
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x7758
addl $0x2, %r12d
movslq %r12d, %r12
movq %rbp, (%r13)
leaq 0x8(%rsp), %rdi
pushq $0x20
popq %rdx
movq %r12, %rsi
callq 0x7400
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x7330
leaq 0x1131(%rip), %rsi      # 0x1bdfc
movq %rax, %rdi
callq 0x7380
movq %rax, %rdi
movq %r15, %rsi
callq 0x7330
movq %rax, %rdi
callq 0x71c0
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x7758
movq %rbp, (%r13)
leaq 0x8(%rsp), %rdi
pushq $0x20
popq %rdx
movq %r12, %rsi
callq 0x7400
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x7330
leaq 0x3ca(%rip), %rsi       # 0x1b0e5
movq %rax, %rdi
callq 0x7380
movq %rax, %rdi
callq 0x71c0
leaq 0x8(%rsp), %rdi
callq 0x7758
addq $0x20, %r15
addl $0x2, %ebx
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x1aab2
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1ad5c
jmp 0x1ad5c
movq %rax, %rbx
jmp 0x1ad72
jmp 0x1ad65
jmp 0x1ad65
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x7758
movq %rbx, %rdi
callq 0x7660
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: SeqNum::saveXml(std::ostream&) const
void SeqNum::saveXml(ostream &s) const

{
  s << "<seqnum";
  pc.getSpace()->saveXmlAttributes(s,pc.getOffset());
  a_v_u(s,"uniq",uniq);
  s << "/>";
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x33ca4(%rip), %rsi     # 0x86000
movq %rbx, %rdi
callq 0x4f5b0
movq (%r14), %rdi
movq 0x8(%r14), %rdx
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x38(%rax)
leaq 0x33c8d(%rip), %rsi     # 0x86008
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %rdx
movq %r15, %rdi
callq 0x515e0
movl 0x10(%r14), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4f410
leaq 0x10(%rsp), %rdi
callq 0x4e020
leaq 0x34e9a(%rip), %rsi     # 0x87247
movq %rbx, %rdi
callq 0x4f5b0
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4e020
movq %rbx, %rdi
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: SeqNum::restoreXml(Element const*, AddrSpaceManager const*)
SeqNum SeqNum::restoreXml(const Element *el,const AddrSpaceManager *manage)

{
  uintm uniq = ~((uintm)0);
  Address pc = Address::restoreXml(el,manage); // Recover address
  for(int4 i=0;i<el->getNumAttributes();++i)
    if (el->getAttributeName(i) == "uniq") {
      istringstream s2(el->getAttributeValue(i)); // Recover unique (if present)
      s2.unsetf(ios::dec | ios::hex | ios::oct);
      s2 >> uniq;
      break;
    }
  return SeqNum(pc,uniq);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %r14
movq %rdi, %rbx
orl $-0x1, 0x4(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x51bd0
pushq $-0x20
popq %r15
pushq $-0x1
popq %r13
pushq $-0x1
popq %rbp
leaq 0x33bfc(%rip), %r12     # 0x86008
movq 0x40(%r14), %rax
movq 0x48(%r14), %rcx
subq %rax, %rcx
shrq $0x5, %rcx
movslq %ecx, %rcx
incq %r13
cmpq %rcx, %r13
jge 0x5247c
leaq (%rax,%r15), %rdi
addq $0x20, %rdi
addq $0x20, %r15
movq %r12, %rsi
callq 0x520f0
testb %al, %al
je 0x5240c
addq 0x58(%r14), %r15
leaq 0x18(%rsp), %r14
pushq $0x8
popq %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x51500
movq (%r14), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x30(%rsp,%rax)
leaq 0x4(%rsp), %rsi
movq %r14, %rdi
callq 0x51830
leaq 0x18(%rsp), %rdi
callq 0x4e070
movl 0x4(%rsp), %ebp
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rbx)
movl %ebp, 0x10(%rbx)
movq %rbx, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x4e070
movq %rbx, %rdi
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: Address::containedBy(int, Address const&, int) const
bool Address::containedBy(int4 sz,const Address &op2,int4 sz2) const

{
  if (base != op2.base) return false;
  if (op2.offset > offset) return false;
  uintb off1 = offset + (sz-1);
  uintb off2 = op2.offset + (sz2-1);
  return (off2 >= off1);
}

// Assembly:
movq (%rdi), %rax
cmpq (%rdx), %rax
jne 0x52527
movq 0x8(%rdx), %rax
movq 0x8(%rdi), %rdx
cmpq %rdx, %rax
jbe 0x5252a
xorl %eax, %eax
retq
movslq %esi, %rsi
addq %rsi, %rdx
decq %rdx
movslq %ecx, %rcx
addq %rcx, %rax
decq %rax
cmpq %rdx, %rax
setae %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: Address::justifiedContain(int, Address const&, int, bool) const
int4 Address::justifiedContain(int4 sz,const Address &op2,int4 sz2,bool forceleft) const

{ if (base != op2.base) return -1;
  if (op2.offset < offset) return -1;
  uintb off1 = offset + (sz-1);
  uintb off2 = op2.offset + (sz2-1);
  if (off2 > off1) return -1;
  if (base->isBigEndian()&&(!forceleft)) {
    return (int4)(off1 - off2);
  }
  return (int4)(op2.offset - offset);
}

// Assembly:
movq (%rdi), %r9
pushq $-0x1
popq %rax
cmpq (%rdx), %r9
je 0x52550
retq
movq 0x8(%rdx), %rdx
movq 0x8(%rdi), %rdi
cmpq %rdi, %rdx
jb 0x5254f
movslq %esi, %rsi
addq %rdi, %rsi
decq %rsi
movslq %ecx, %rcx
addq %rdx, %rcx
decq %rcx
cmpq %rcx, %rsi
jb 0x5254f
testb $0x1, 0x24(%r9)
sete %al
orb %r8b, %al
je 0x52586
subl %edi, %edx
movl %edx, %eax
retq
subl %ecx, %esi
movl %esi, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: Address::overlap(int, Address const&, int) const
int4 Address::overlap(int4 skip,const Address &op,int4 size) const

{
  uintb dist;

  if (base != op.base) return -1; // Must be in same address space to overlap
  if (base->getType()==IPTR_CONSTANT) return -1; // Must not be constants

  dist = base->wrapOffset(offset+skip-op.offset);

  if (dist >= size) return -1; // but must fall before op+size
  return (int4) dist;
}

// Assembly:
movq (%rdi), %r9
pushq $-0x1
popq %r8
cmpq (%rdx), %r9
jne 0x525d2
cmpl $0x0, 0x8(%r9)
je 0x525d2
movslq %esi, %rax
addq 0x8(%rdi), %rax
subq 0x8(%rdx), %rax
movq 0x28(%r9), %rsi
cmpq %rax, %rsi
jae 0x525c8
incq %rsi
cqto
idivq %rsi
movq %rdx, %rax
sarq $0x3f, %rax
andq %rsi, %rax
addq %rdx, %rax
movslq %ecx, %rcx
cmpq %rcx, %rax
cmovbl %eax, %r8d
movl %r8d, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: Address::isContiguous(int, Address const&, int) const
bool Address::isContiguous(int4 sz,const Address &loaddr,int4 losz) const

{
  if (base != loaddr.base) return false;
  if (base->isBigEndian()) {
    uintb nextoff = base->wrapOffset(offset+sz);
    if (nextoff == loaddr.offset) return true;
  }
  else {
    uintb nextoff = base->wrapOffset(loaddr.offset+losz);
    if (nextoff == offset) return true;
  }
  return false;
}

// Assembly:
movq (%rdi), %rax
cmpq (%rdx), %rax
je 0x525e3
xorl %edx, %edx
movl %edx, %eax
retq
movq %rdx, %r8
testb $0x1, 0x24(%rax)
movq 0x28(%rax), %r9
jne 0x5261b
movslq %ecx, %rax
addq 0x8(%r8), %rax
cmpq %rax, %r9
jae 0x52611
incq %r9
cqto
idivq %r9
movq %rdx, %rax
sarq $0x3f, %rax
andq %r9, %rax
addq %rdx, %rax
movb $0x1, %dl
cmpq 0x8(%rdi), %rax
jne 0x525de
jmp 0x525e0
movslq %esi, %rax
addq 0x8(%rdi), %rax
cmpq %rax, %r9
jae 0x5263c
incq %r9
cqto
idivq %r9
movq %rdx, %rax
sarq $0x3f, %rax
andq %r9, %rax
addq %rdx, %rax
movb $0x1, %dl
cmpq 0x8(%r8), %rax
jne 0x525de
jmp 0x525e0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: Range::getLastAddrOpen(AddrSpaceManager const*) const
Address Range::getLastAddrOpen(const AddrSpaceManager *manage) const

{
  AddrSpace *curspc = spc;
  uintb curlast = last;
  if (curlast == curspc->getHighest()) {
    curspc = manage->getNextSpaceInOrder(curspc);
    curlast = 0;
  }
  else
    curlast += 1;
  if (curspc == (AddrSpace *)0)
    return Address(Address::m_maximal);
  return Address(curspc,curlast);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x10(%rsi), %rcx
cmpq 0x28(%rax), %rcx
jne 0x526a3
movq %rdx, %rdi
movq %rax, %rsi
callq 0x4eb10
testq %rax, %rax
je 0x526b2
xorl %ecx, %ecx
jmp 0x526a6
incq %rcx
movq %rax, (%rbx)
movq %rcx, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
retq
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x4d470
jmp 0x526ad
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: RangeList::longestFit(Address const&, unsigned long) const
void Range::saveXml(ostream &s) const

{
  s << "<range";
  a_v(s,"space",spc->getName());
  a_v_u(s,"first",first);
  a_v_u(s,"last",last);
  s << "/>\n";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq (%rsi), %rax
xorl %r15d, %r15d
testq %rax, %rax
je 0x52e76
movq %rdi, %r14
cmpq $0x0, 0x28(%rdi)
je 0x52e76
movq %rdx, %rbx
movq %rsi, %r12
movq 0x8(%rsi), %r13
movq %rsp, %rsi
movq %rax, (%rsi)
movq %r13, 0x8(%rsi)
movq %r13, 0x10(%rsi)
movq %r14, %rdi
callq 0x50800
cmpq 0x18(%r14), %rax
je 0x52e73
movq %rax, %rdi
callq 0x4e740
cmpq %r13, 0x30(%rax)
jae 0x52e88
xorl %r15d, %r15d
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %r12
addq $0x8, %r14
xorl %r15d, %r15d
cmpq %r12, 0x20(%rax)
jne 0x52e76
cmpq %r13, 0x28(%rax)
ja 0x52e76
movq 0x30(%rax), %rbp
incq %rbp
movq %rbp, %rcx
subq %r13, %rcx
addq %rcx, %r15
cmpq %rbx, %r15
jae 0x52e76
movq %rax, %rdi
callq 0x4fb80
movq %rbp, %r13
cmpq %r14, %rax
jne 0x52e93
jmp 0x52e76
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: RangeList::insertRange(AddrSpace*, unsigned long, unsigned long)
void RangeList::insertRange(AddrSpace *spc,uintb first,uintb last)

{
  set<Range>::iterator iter1,iter2;

  // we must have iter1.first > first
  iter1 = tree.upper_bound(Range(spc,first,first));

  // Set iter1 to first range with range.last >=first
  // It is either current iter1 or the one before
  if (iter1 != tree.begin()) {
    --iter1;
    if (((*iter1).spc!=spc)||((*iter1).last < first))
      ++iter1;
  }

  // Set iter2 to first range with range.first > last
  iter2 = tree.upper_bound(Range(spc,last,last));
  
  while(iter1!=iter2) {
    if ((*iter1).first < first)
      first = (*iter1).first;
    if ((*iter1).last > last)
      last = (*iter1).last;
    tree.erase(iter1++);
  }
  tree.insert(Range(spc,first,last));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
leaq 0x10(%rsp), %rsi
movq %r12, (%rsi)
movq %rdx, 0x8(%rsi)
movq %rdx, 0x10(%rsi)
callq 0x52070
movq %rax, %r13
cmpq 0x18(%r14), %rax
je 0x52b22
movq %r13, %rdi
callq 0x4e740
movq %rax, %r13
cmpq %r12, 0x20(%rax)
jne 0x52b17
cmpq %r15, 0x30(%r13)
jae 0x52b22
movq %r13, %rdi
callq 0x4fb80
movq %rax, %r13
leaq 0x10(%rsp), %rsi
movq %r12, 0x8(%rsp)
movq %r12, (%rsi)
movq %rbx, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movq %r14, %rdi
callq 0x52070
movq %rax, %rbp
cmpq %rbp, %r13
je 0x52b78
movq 0x28(%r13), %rax
movq 0x30(%r13), %rcx
cmpq %r15, %rax
cmovbq %rax, %r15
cmpq %rbx, %rcx
cmovaq %rcx, %rbx
movq %r13, %rdi
callq 0x4fb80
movq %rax, %r12
movq %r14, %rdi
movq %r13, %rsi
callq 0x4ee60
movq %r12, %r13
jmp 0x52b42
leaq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
movq %r15, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movq %r14, %rdi
callq 0x51040
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: RangeList::removeRange(AddrSpace*, unsigned long, unsigned long)
void RangeList::removeRange(AddrSpace *spc,uintb first,uintb last)

{				// remove a range
  set<Range>::iterator iter1,iter2;

  if (tree.empty()) return;	// Nothing to do

  // we must have iter1.first > first
  iter1 = tree.upper_bound(Range(spc,first,first));

  // Set iter1 to first range with range.last >=first
  // It is either current iter1 or the one before
  if (iter1 != tree.begin()) {
    --iter1;
    if (((*iter1).spc!=spc)||((*iter1).last < first))
      ++iter1;
  }

  // Set iter2 to first range with range.first > last
  iter2 = tree.upper_bound(Range(spc,last,last));
  
  while(iter1!=iter2) {
    uintb a,b;

    a = (*iter1).first;
    b = (*iter1).last;
    tree.erase(iter1++);
    if (a <first)
      tree.insert(Range(spc,a,first-1));
    if (b > last)
      tree.insert(Range(spc,last+1,b));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, 0x30(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
cmpq $0x0, 0x28(%rdi)
je 0x52ce1
movq %rdi, %r12
leaq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rbx
movq %rbx, (%rsi)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rsi)
movq %rax, 0x10(%rsi)
callq 0x52070
movq %rax, %rbp
cmpq 0x18(%r12), %rax
je 0x52c1f
movq %rbp, %rdi
callq 0x4e740
movq %rax, %rbp
cmpq %rbx, 0x20(%rax)
jne 0x52c14
movq 0x8(%rsp), %rax
cmpq %rax, 0x30(%rbp)
jae 0x52c1f
movq %rbp, %rdi
callq 0x4fb80
movq %rax, %rbp
leaq 0x18(%rsp), %rsi
movq %rbx, (%rsi)
movq 0x30(%rsp), %rbx
movq %rbx, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movq %r12, %rdi
callq 0x52070
movq %rax, %r13
movq 0x8(%rsp), %rax
decq %rax
movq %rax, 0x40(%rsp)
leaq 0x1(%rbx), %rax
movq %rax, 0x38(%rsp)
cmpq %r13, %rbp
je 0x52ce1
movq 0x28(%rbp), %r14
movq 0x30(%rbp), %r15
movq %rbp, %rdi
callq 0x4fb80
movq %rax, %rbx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x4ee60
cmpq 0x8(%rsp), %r14
jae 0x52ca9
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %r14, 0x20(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r12, %rdi
leaq 0x18(%rsp), %rsi
callq 0x51040
movq %rbx, %rbp
cmpq 0x30(%rsp), %r15
jbe 0x52c55
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %r15, 0x28(%rsp)
movq %r12, %rdi
leaq 0x18(%rsp), %rsi
callq 0x51040
movq %rbx, %rbp
jmp 0x52c55
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: RangeList::merge(RangeList const&)
void RangeList::merge(const RangeList &op2)

{ // Merge -op2- into this rangelist
  set<Range>::const_iterator iter1,iter2;
  iter1 = op2.tree.begin();
  iter2 = op2.tree.end();
  while(iter1 != iter2) {
    const Range &range( *iter1 );
    ++iter1;
    insertRange(range.spc, range.first, range.last);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rsi), %r15
addq $0x8, %rbx
cmpq %rbx, %r15
je 0x52d2f
movq %r15, %rdi
callq 0x4fb80
movq %rax, %r12
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
movq 0x30(%r15), %rcx
movq %r14, %rdi
callq 0x4e560
movq %r12, %r15
jmp 0x52d06
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: RangeList::getLastSignedRange(AddrSpace*) const
const Range *RangeList::getLastSignedRange(AddrSpace *spaceid) const

{
  uintb midway = spaceid->getHighest() / 2;		// Maximal signed value
  Range range(spaceid,midway,midway);
  set<Range>::const_iterator iter = tree.upper_bound(range);	// First element greater than -range- (should be MOST negative)

  if (iter!=tree.begin()) {
    --iter;
    if ((*iter).getSpace() == spaceid)
      return &(*iter);
  }

  // If there were no "positive" ranges, search for biggest negative range
  range = Range(spaceid,spaceid->getHighest(),spaceid->getHighest());
  iter = tree.upper_bound(range);
  if (iter != tree.begin()) {
    --iter;
    if ((*iter).getSpace() == spaceid)
      return &(*iter);
  }
  return (const Range *)0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x28(%rsi), %rax
shrq %rax
movq %rsp, %rsi
movq %rbx, (%rsi)
movq %rax, 0x8(%rsi)
movq %rax, 0x10(%rsi)
callq 0x50800
cmpq 0x18(%r14), %rax
je 0x52f33
movq %rax, %rdi
callq 0x4e740
cmpq %rbx, 0x20(%rax)
je 0x52f72
movq 0x28(%rbx), %rax
movq %rsp, %rsi
movq %rbx, (%rsi)
movq %rax, 0x8(%rsi)
movq %rax, 0x10(%rsi)
movq %r14, %rdi
callq 0x50800
cmpq 0x18(%r14), %rax
je 0x52f6e
movq %rax, %rdi
callq 0x4e740
movq %rax, %rcx
leaq 0x20(%rax), %rdx
xorl %eax, %eax
cmpq %rbx, 0x20(%rcx)
cmoveq %rdx, %rax
jmp 0x52f76
xorl %eax, %eax
jmp 0x52f76
addq $0x20, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: RangeList::printBounds(std::ostream&) const
void RangeList::printBounds(ostream &s) const

{
  if (tree.empty())
    s << "all" << endl;
  else {
    set<Range>::const_iterator iter;
    for(iter=tree.begin();iter!=tree.end();++iter) {
      (*iter).printBounds(s);
      s << endl;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpq $0x0, 0x28(%rdi)
je 0x52fc4
movq %rdi, %r14
movq 0x18(%rdi), %r15
addq $0x8, %r14
cmpq %r14, %r15
je 0x52fbe
leaq 0x20(%r15), %rdi
movq %rbx, %rsi
callq 0x51760
movq %rbx, %rdi
callq 0x4e140
movq %r15, %rdi
callq 0x4fb80
movq %rax, %r15
jmp 0x52f98
popq %rbx
popq %r14
popq %r15
retq
leaq 0x396c1(%rip), %rsi     # 0x8c68c
movq %rbx, %rdi
callq 0x4f5b0
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4e140
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: RangeList::saveXml(std::ostream&) const
void RangeList::saveXml(ostream &s) const

{
  set<Range>::const_iterator iter;

  s << "<rangelist>\n";
  for(iter=tree.begin();iter!=tree.end();++iter) {
    (*iter).saveXml(s);
  }
  s << "</rangelist>\n";
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x3306c(%rip), %rsi     # 0x8605e
movq %rbx, %rdi
callq 0x4f5b0
movq 0x18(%r14), %r15
addq $0x8, %r14
cmpq %r14, %r15
je 0x53020
leaq 0x20(%r15), %rdi
movq %rbx, %rsi
callq 0x50cd0
movq %r15, %rdi
callq 0x4fb80
movq %rax, %r15
jmp 0x53002
leaq 0x33044(%rip), %rsi     # 0x8606b
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4f5b0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: RangeList::restoreXml(Element const*, AddrSpaceManager const*)
void RangeList::restoreXml(const Element *el,const AddrSpaceManager *manage)

{
  const List &list(el->getChildren());
  List::const_iterator iter;

  for(iter=list.begin();iter!=list.end();++iter) {
    const Element *subel = *iter;
    Range range;
    range.restoreXml(subel,manage);
    tree.insert(range);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq 0x78(%rsi), %r13
leaq 0x8(%rsp), %r12
cmpq 0x80(%r14), %r13
je 0x5307c
movq (%r13), %rsi
movq %r12, %rdi
movq %rbx, %rdx
callq 0x51c90
movq %r15, %rdi
movq %r12, %rsi
callq 0x508a0
addq $0x8, %r13
jmp 0x53053
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: sign_extend(unsigned long, int, int)
uintb sign_extend(uintb in,int4 sizein,int4 sizeout)

{
  int4 signbit;
  uintb mask;

  signbit = sizein*8 - 1;
  in &= calc_mask(sizein);
  if (sizein >= sizeout) return in;
  if ((in>>signbit) != 0) {
    mask = calc_mask(sizeout);
    uintb tmp = mask << signbit; // Split shift into two pieces
    tmp = (tmp<<1) & mask;	// In case, everything is shifted out
    in |= tmp;
  }
  return in;
}

// Assembly:
movq %rdi, %rax
cmpl $0x8, %esi
pushq $0x8
popq %rdi
movl %edi, %ecx
cmovll %esi, %ecx
movslq %ecx, %rcx
movq 0x5bafc(%rip), %r8      # 0xaebd0
andq (%r8,%rcx,8), %rax
cmpl %edx, %esi
jge 0x5310a
leal -0x1(,%rsi,8), %ecx
movq %rax, %rsi
shrq %cl, %rsi
testq %rsi, %rsi
je 0x5310a
cmpl $0x8, %edx
cmovll %edx, %edi
movslq %edi, %rdx
movq (%r8,%rdx,8), %rdx
movq %rdx, %rsi
shlq %cl, %rsi
addq %rsi, %rsi
andq %rdx, %rsi
orq %rsi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: byte_swap(long&, int)
void byte_swap(intb &val,int4 size)

{
  intb res = 0;
  while(size>0) {
    res <<= 8;
    res |= (val&0xff);
    val >>= 8;
    size -= 1;
  }
  val = res;
}

// Assembly:
movq (%rdi), %rcx
xorl %eax, %eax
testl %esi, %esi
jle 0x5315b
shlq $0x8, %rax
movzbl %cl, %edx
orq %rdx, %rax
sarq $0x8, %rcx
movq %rcx, (%rdi)
decl %esi
jmp 0x53142
movq %rax, (%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: leastsigbit_set(unsigned long)
int4 leastsigbit_set(uintb val)

{
  if (val==0) return -1;
  int4 res = 0;
  int4 sz = 4*sizeof(uintb);
  uintb mask = ~((uintb)0);
  do {
    mask >>= sz;
    if ((mask&val)==0) {
      res += sz;
      val >>= sz;
    }
    sz >>= 1;
  } while(sz!=0);
  return res;
}

// Assembly:
testq %rdi, %rdi
je 0x531a5
pushq $-0x1
popq %rsi
pushq $0x20
popq %rdx
xorl %eax, %eax
movl %edx, %ecx
shrq %cl, %rsi
movl %edx, %ecx
testq %rdi, %rsi
je 0x53194
xorl %ecx, %ecx
shrq %cl, %rdi
addl %ecx, %eax
movl %edx, %ecx
shrl %ecx
cmpl $0x1, %edx
movl %ecx, %edx
ja 0x53186
retq
pushq $-0x1
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: mostsigbit_set(unsigned long)
int4 mostsigbit_set(uintb val)

{
  if (val==0) return -1;
  int4 res = 8*sizeof(uintb)-1;
  int4 sz = 4*sizeof(uintb);
  uintb mask = ~((uintb)0);
  do {
    mask <<= sz;
    if ((mask&val)==0) {
      res -= sz;
      val <<= sz;
    }
    sz >>= 1;
  } while(sz != 0);
  return res;
}

// Assembly:
testq %rdi, %rdi
je 0x531d6
pushq $-0x1
popq %rsi
pushq $0x20
popq %rdx
pushq $0x3f
popq %rax
movl %edx, %ecx
shlq %cl, %rsi
movl %edx, %ecx
testq %rdi, %rsi
je 0x531c5
xorl %ecx, %ecx
shlq %cl, %rdi
subl %ecx, %eax
movl %edx, %ecx
shrl %ecx
cmpl $0x1, %edx
movl %ecx, %edx
ja 0x531b7
retq
pushq $-0x1
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: count_leading_zeros(unsigned long)
int4 count_leading_zeros(uintb val)

{
  if (val == 0)
    return 8*sizeof(uintb);
  uintb mask = ~((uintb)0);
  int4 maskSize = 4*sizeof(uintb);
  mask &= (mask << maskSize);
  int4 bit = 0;

  do {
    if ((mask & val)==0) {
      bit += maskSize;
      maskSize >>= 1;
      mask |= (mask >> maskSize);
    }
    else {
      maskSize >>= 1;
      mask &= (mask << maskSize);
    }
  } while(maskSize != 0);
  return bit;
}

// Assembly:
testq %rdi, %rdi
je 0x53212
xorl %eax, %eax
pushq $0x20
popq %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
testq %rdi, %rdx
je 0x53200
sarl %ecx
movq %rdx, %rsi
shlq %cl, %rsi
andq %rsi, %rdx
jmp 0x5320d
addl %ecx, %eax
sarl %ecx
movq %rdx, %rsi
shrq %cl, %rsi
orq %rsi, %rdx
testl %ecx, %ecx
jne 0x531ee
retq
pushq $0x40
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: coveringmask(unsigned long)
uintb coveringmask(uintb val)

{
  uintb res = val;
  int4 sz = 1;
  while(sz < 8*sizeof(uintb)) {
    res = res | (res>>sz);
    sz <<= 1;
  }
  return res;
}

// Assembly:
movq %rdi, %rax
pushq $0x1
popq %rcx
cmpl $0x3f, %ecx
ja 0x5322e
movq %rax, %rdx
shrq %cl, %rdx
orq %rdx, %rax
addl %ecx, %ecx
jmp 0x5321c
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/address.cc
// Function: bit_transitions(unsigned long, int)
int4 bit_transitions(uintb val,int4 sz)

{
  int4 res = 0;
  int4 last = val & 1;
  int4 cur;
  for(int4 i=1;i<8*sz;++i) {
    val >>= 1;
    cur = val & 1;
    if (cur != last) {
      res += 1;
      last = cur;
    }
    if (val==0) break;
  }
  return res;
}

// Assembly:
movl %edi, %edx
andl $0x1, %edx
shll $0x3, %esi
xorl %ecx, %ecx
xorl %eax, %eax
incl %ecx
cmpl %esi, %ecx
jge 0x53267
movq %rdi, %r8
shrq %r8
movl %r8d, %r9d
andl $0x1, %r9d
xorl %r10d, %r10d
cmpl %edx, %r9d
setne %r10b
addl %r10d, %eax
movl %r9d, %edx
cmpq $0x1, %rdi
movq %r8, %rdi
ja 0x5323b
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/include/address.hh
// Function: Address::printRaw(std::ostream&) const
inline void Address::printRaw(ostream &s) const {
  if (base == (AddrSpace *)0) {
    s << "invalid_addr";
    return;
  }
  base->printRaw(s,offset);
}

// Assembly:
movq %rdi, %rax
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x534b0
movq 0x8(%rax), %rdx
movq (%rdi), %rax
movq 0x50(%rax), %rax
jmpq *%rax
leaq 0x32bc2(%rip), %rax     # 0x86079
movq %rsi, %rdi
movq %rax, %rsi
jmp 0x4f5b0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/float.cc
// Function: FloatFormat::FloatFormat(int)
FloatFormat::FloatFormat(int4 sz)

{
  size = sz;

  if (size == 4) {
    signbit_pos = 31;
    exp_pos = 23;
    exp_size = 8;
    frac_pos = 0;
    frac_size = 23;
    bias = 127;
    jbitimplied = true;
  }
  else if (size == 8) {
    signbit_pos = 63;
    exp_pos = 52;
    exp_size = 11;
    frac_pos = 0;
    frac_size = 52;
    bias = 1023;
    jbitimplied = true;
  }
  maxexponent = (1<<exp_size)-1;
}

// Assembly:
movl %esi, (%rdi)
cmpl $0x4, %esi
je 0x53a95
cmpl $0x8, %esi
jne 0x53ab7
movabsq $0x3ff0000000b, %rax    # imm = 0x3FF0000000B
movq %rax, 0x14(%rdi)
movaps 0x32637(%rip), %xmm0    # 0x860c0
movups %xmm0, 0x4(%rdi)
movb $0x1, 0x20(%rdi)
pushq $0xb
jmp 0x53ab4
movabsq $0x7f00000008, %rax     # imm = 0x7F00000008
movq %rax, 0x14(%rdi)
movaps 0x32626(%rip), %xmm0    # 0x860d0
movups %xmm0, 0x4(%rdi)
movb $0x1, 0x20(%rdi)
pushq $0x8
popq %rcx
jmp 0x53aba
movl 0x14(%rdi), %ecx
pushq $-0x1
popq %rax
shll %cl, %eax
notl %eax
movl %eax, 0x1c(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/float.cc
// Function: FloatFormat::extractExponentCode(unsigned long) const
int4 FloatFormat::extractExponentCode(uintb x) const

{
  x >>= exp_pos;
  uintb mask = 1;
  mask = (mask<<exp_size) - 1;
  return (int4)(x & mask);
}

// Assembly:
movb 0x10(%rdi), %cl
movb 0x14(%rdi), %dl
shrq %cl, %rsi
pushq $-0x1
popq %rax
movl %edx, %ecx
shlq %cl, %rax
notl %eax
andl %esi, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/float.cc
// Function: FloatFormat::getInfinityEncoding(bool) const
uintb FloatFormat::getInfinityEncoding(bool sgn) const

{
  uintb res = 0;
  // Use IEEE 754 standard for infinity encoding
  res = setFractionalCode(res,0);
  res = setExponentCode(res,(uintb)maxexponent);
  return setSign(res,sgn);
}

// Assembly:
movslq 0x1c(%rdi), %rdx
movb 0x10(%rdi), %cl
shlq %cl, %rdx
movb 0x4(%rdi), %cl
pushq $0x1
popq %rdi
shlq %cl, %rdi
xorl %eax, %eax
testl %esi, %esi
cmovneq %rdi, %rax
orq %rdx, %rax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/float.cc
// Function: FloatFormat::getEncoding(double) const
uintb FloatFormat::getEncoding(double host) const

{
  floatclass type;
  bool sgn;
  uintb signif;
  int4 exp;

  type = extractExpSig(host,&sgn,&signif,&exp);
  if (type == zero)
    return getZeroEncoding(sgn);
  else if (type == infinity)
    return getInfinityEncoding(sgn);
  else if (type == nan)
    return getNaNEncoding(sgn);

  // convert exponent and fractional to their encodings
  exp += bias;
  if (exp < 0)			// Exponent is too small to represent
    return getZeroEncoding(sgn);
  if (exp > maxexponent)	// Exponent is too big to represent
    return getInfinityEncoding(sgn);
  if (jbitimplied && (exp !=0))
    signif <<= 1;		// Cut off top bit (which should be 1)

  uintb res = 0;
  res = setFractionalCode(res,signif);
  res = setExponentCode(res,(uintb)exp);
  return setSign(res,sgn);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x3(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x4(%rsp), %rdx
callq 0x50c40
movl %eax, %eax
leaq 0x323df(%rip), %rcx     # 0x86138
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x4(%rsp), %esi
addl 0x18(%rbx), %esi
js 0x53db6
movslq 0x1c(%rbx), %rdx
cmpl %edx, %esi
jg 0x53dd0
testl %esi, %esi
setne %cl
andb 0x20(%rbx), %cl
movq 0x8(%rsp), %rdx
shlq %cl, %rdx
movb 0xc(%rbx), %al
xorl %ecx, %ecx
subb %al, %cl
shrq %cl, %rdx
movb 0x8(%rbx), %cl
shlq %cl, %rdx
movb 0x4(%rbx), %al
movl %esi, %esi
movb 0x10(%rbx), %cl
shlq %cl, %rsi
pushq $0x1
popq %rdi
movl %eax, %ecx
shlq %cl, %rdi
xorl %eax, %eax
cmpb $0x0, 0x3(%rsp)
cmovneq %rdi, %rax
orq %rsi, %rax
jmp 0x53dec
movb 0x4(%rbx), %cl
pushq $0x1
popq %rdx
shlq %cl, %rdx
xorl %eax, %eax
cmpb $0x0, 0x3(%rsp)
cmovneq %rdx, %rax
jmp 0x53def
movslq 0x1c(%rbx), %rdx
movb 0x4(%rbx), %al
movb 0x10(%rbx), %cl
shlq %cl, %rdx
pushq $0x1
popq %rsi
movl %eax, %ecx
shlq %cl, %rsi
xorl %eax, %eax
cmpb $0x0, 0x3(%rsp)
cmovneq %rsi, %rax
orq %rdx, %rax
addq $0x10, %rsp
popq %rbx
retq
movzbl 0x3(%rsp), %esi
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
jmp 0x4e210
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/float.cc
// Function: FloatFormat::opEqual(unsigned long, unsigned long) const
uintb FloatFormat::opEqual(uintb a,uintb b) const

{
  floatclass type;
  double val1 = getHostFloat(a,&type);
  double val2 = getHostFloat(b,&type);
  uintb res = (val1 == val2) ? 1 : 0;
  return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0xc(%rsp), %r15
movq %r15, %rdx
callq 0x4f930
movsd %xmm0, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x4f930
cmpeqsd (%rsp), %xmm0
movq %xmm0, %rax
andl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/float.cc
// Function: FloatFormat::opNotEqual(unsigned long, unsigned long) const
uintb FloatFormat::opNotEqual(uintb a,uintb b) const

{
  floatclass type;
  double val1 = getHostFloat(a,&type);
  double val2 = getHostFloat(b,&type);
  uintb res = (val1 != val2) ? 1 : 0;
  return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0xc(%rsp), %r15
movq %r15, %rdx
callq 0x4f930
movsd %xmm0, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x4f930
cmpneqsd (%rsp), %xmm0
movq %xmm0, %rax
andl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/float.cc
// Function: FloatFormat::opLess(unsigned long, unsigned long) const
uintb FloatFormat::opLess(uintb a,uintb b) const

{
  floatclass type;
  double val1 = getHostFloat(a,&type);
  double val2 = getHostFloat(b,&type);
  uintb res = (val1 < val2) ? 1 : 0;
  return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0xc(%rsp), %r15
movq %r15, %rdx
callq 0x4f930
movsd %xmm0, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x4f930
xorl %eax, %eax
ucomisd (%rsp), %xmm0
seta %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/float.cc
// Function: FloatFormat::opInt2Float(unsigned long, int) const
uintb FloatFormat::opInt2Float(uintb a,int4 sizein) const

{
  intb ival = (intb)a;
  sign_extend(ival,8*sizein-1);
  double val = (double) ival;	// Convert integer to float
  return getEncoding(val);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
movq %rsi, (%r14)
leal -0x1(,%rdx,8), %esi
movq %r14, %rdi
callq 0x4f200
cvtsi2sdq (%r14), %xmm0
movq %rbx, %rdi
callq 0x4df10
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/float.cc
// Function: FloatFormat::opTrunc(unsigned long, int) const
uintb FloatFormat::opTrunc(uintb a,int4 sizeout) const

{
  floatclass type;
  double val = getHostFloat(a,&type);
  intb ival = (intb) val;	// Convert to integer
  uintb res = (uintb) ival;	// Convert to unsigned
  res &= calc_mask(sizeout);	// Truncate to proper size
  return res;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
leaq 0xc(%rsp), %rdx
callq 0x4f930
cvttsd2si %xmm0, %rax
cmpl $0x8, %ebx
pushq $0x8
popq %rcx
cmovll %ebx, %ecx
movslq %ecx, %rcx
movq 0x5a997(%rip), %rdx     # 0xaebd0
andq (%rdx,%rcx,8), %rax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/float.cc
// Function: FloatFormat::saveXml(std::ostream&) const
void FloatFormat::saveXml(ostream &s) const

{
  s << "<floatformat";
  a_v_i(s,"size",size);
  a_v_i(s,"signpos",signbit_pos);
  a_v_i(s,"fracpos",frac_pos);
  a_v_i(s,"fracsize",frac_size);
  a_v_i(s,"exppos",exp_pos);
  a_v_i(s,"expsize",exp_size);
  a_v_i(s,"bias",bias);
  a_v_b(s,"jbitimplied",jbitimplied);
  s << "/>\n";
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x31e7c(%rip), %rsi     # 0x86148
movq %rbx, %rdi
callq 0x4f5b0
leaq 0x38492(%rip), %rsi     # 0x8c76d
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
movslq (%r14), %rdx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x50e20
leaq 0x8(%rsp), %rdi
callq 0x4e020
leaq 0x31e4a(%rip), %rsi     # 0x86155
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
movslq 0x4(%r14), %rdx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x50e20
leaq 0x8(%rsp), %rdi
callq 0x4e020
leaq 0x31e21(%rip), %rsi     # 0x8615d
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
movslq 0x8(%r14), %rdx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x50e20
leaq 0x8(%rsp), %rdi
callq 0x4e020
leaq 0x31df8(%rip), %rsi     # 0x86165
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
movslq 0xc(%r14), %rdx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x50e20
leaq 0x8(%rsp), %rdi
callq 0x4e020
leaq 0x31dd0(%rip), %rsi     # 0x8616e
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
movslq 0x10(%r14), %rdx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x50e20
leaq 0x8(%rsp), %rdi
callq 0x4e020
leaq 0x31da6(%rip), %rsi     # 0x86175
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
movslq 0x14(%r14), %rdx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x50e20
leaq 0x8(%rsp), %rdi
callq 0x4e020
leaq 0x31d7d(%rip), %rsi     # 0x8617d
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
movslq 0x18(%r14), %rdx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x50e20
leaq 0x8(%rsp), %rdi
callq 0x4e020
leaq 0x31d51(%rip), %rsi     # 0x86182
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x515e0
movzbl 0x20(%r14), %edx
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4da10
leaq 0x8(%rsp), %rdi
callq 0x4e020
leaq 0x33392(%rip), %rsi     # 0x877f5
movq %rbx, %rdi
callq 0x4f5b0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0x5448f
jmp 0x5449e
jmp 0x5448f
jmp 0x5449e
jmp 0x5448f
jmp 0x5449e
jmp 0x5448f
jmp 0x5449e
jmp 0x5448f
jmp 0x5449e
jmp 0x5448f
jmp 0x5449e
jmp 0x5448f
jmp 0x5449e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4e020
jmp 0x544a1
movq %rax, %rbx
movq %rbx, %rdi
callq 0x518c0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/include/xml.hh
// Function: xml_readbool(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
inline bool xml_readbool(const string &attr)

{
  if (attr.size()==0) return false;
  char firstc = attr[0];
  if (firstc=='t') return true;
  if (firstc=='1') return true;
  if (firstc=='y') return true;         // For backward compatibility
  return false;
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x548e6
movq (%rdi), %rax
movzbl (%rax), %ecx
movb $0x1, %al
cmpl $0x31, %ecx
je 0x548e8
cmpl $0x74, %ecx
je 0x548e8
cmpl $0x79, %ecx
je 0x548e8
xorl %eax, %eax
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/globalcontext.cc
// Function: ContextBitRange::ContextBitRange(int, int)
ContextBitRange::ContextBitRange(int4 sbit,int4 ebit)

{
  word = sbit/(8*sizeof(uintm));
  startbit = sbit - word*8*sizeof(uintm);
  endbit = ebit - word*8*sizeof(uintm);
  shift = 8*sizeof(uintm)-endbit-1;
  mask = (~((uintm)0))>>(startbit+shift);
}

// Assembly:
movl %esi, %eax
sarl $0x5, %eax
movl %eax, (%rdi)
movl %esi, %eax
andl $0x1f, %eax
movl %eax, 0x4(%rdi)
andl $-0x20, %esi
subl %esi, %edx
movl %edx, 0x8(%rdi)
pushq $0x1f
popq %rcx
subl %edx, %ecx
movl %ecx, 0xc(%rdi)
addl %eax, %ecx
pushq $-0x1
popq %rax
shrl %cl, %eax
movl %eax, 0x10(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/globalcontext.cc
// Function: TrackedContext::saveXml(std::ostream&) const
void TrackedContext::saveXml(ostream &s) const

{
  s << "<set";
  loc.space->saveXmlAttributes(s,loc.offset,loc.size);
  a_v_u(s,"val",val);
  s << "/>\n";
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x318c3(%rip), %rsi     # 0x861ef
movq %rbx, %rdi
callq 0x4f5b0
movq (%r14), %rdi
movq 0x8(%r14), %rdx
movl 0x10(%r14), %ecx
movq (%rdi), %rax
movq %rbx, %rsi
callq *0x40(%rax)
leaq 0x31861(%rip), %rsi     # 0x861b0
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %rdx
movq %r15, %rdi
callq 0x515e0
movq 0x18(%r14), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4f410
leaq 0x10(%rsp), %rdi
callq 0x4e020
leaq 0x32e74(%rip), %rsi     # 0x877f5
movq %rbx, %rdi
callq 0x4f5b0
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4e020
movq %rbx, %rdi
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/globalcontext.cc
// Function: TrackedContext::restoreXml(Element const*, AddrSpaceManager const*)
void TrackedContext::restoreXml(const Element *el,const AddrSpaceManager *manage)

{
  int4 size;
  Address addr = Address::restoreXml(el,manage,size);
  
  istringstream s(el->getAttributeValue("val"));
  s.unsetf(ios::dec | ios::hex | ios::oct);
  s >> val;

  loc.space = addr.getSpace();
  loc.offset = addr.getOffset();
  loc.size = size;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rcx
callq 0x4f740
leaq 0x317e2(%rip), %rsi     # 0x861b0
leaq 0x18(%rsp), %rdi
leaq 0x3(%rsp), %rdx
callq 0x515e0
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x50230
leaq 0x38(%rsp), %rdi
pushq $0x8
popq %rdx
movq %rax, %rsi
callq 0x51500
leaq 0x18(%rsp), %rdi
callq 0x4e020
leaq 0x38(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0x50(%rsp,%rax)
leaq 0x18(%rbx), %rsi
callq 0x4e460
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rbx)
movl 0x4(%rsp), %eax
movl %eax, 0x10(%rbx)
leaq 0x38(%rsp), %rdi
callq 0x4e070
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x4e070
jmp 0x54a6c
movq %rax, %rbx
jmp 0x54a6c
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x4e020
movq %rbx, %rdi
callq 0x518c0
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/globalcontext.cc
// Function: ContextDatabase::restoreTracked(Element const*, AddrSpaceManager const*, std::vector<TrackedContext, std::allocator<TrackedContext>>&)
void ContextDatabase::restoreTracked(const Element *el,const AddrSpaceManager *manage,
				     TrackedSet &vec)

{
  vec.clear();			// Clear out any old stuff
  const List &list(el->getChildren());
  List::const_iterator iter = list.begin();

  while(iter != list.end()) {
    const Element *subel = *iter;
    vec.push_back(TrackedContext());
    vec.back().restoreXml(subel,manage);
    ++iter;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rdx), %rax
cmpq %rax, 0x8(%rdx)
je 0x54b3a
movq %rax, 0x8(%rbx)
movq 0x78(%r15), %rbp
movq %rsp, %r12
cmpq 0x80(%r15), %rbp
je 0x54b7e
movq (%rbp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x4dcc0
movq 0x8(%rbx), %rdi
addq $-0x20, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x4ddd0
addq $0x8, %rbp
jmp 0x54b41
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/globalcontext.cc
// Function: ContextDatabase::setVariable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Address const&, unsigned int)
void ContextDatabase::setVariable(const string &nm,const Address &addr,
			       uintm value)
{
  const ContextBitRange &bitrange( getVariable(nm) );
  int4 num = bitrange.getWord();
  uintm mask = bitrange.getMask()<<bitrange.getShift();

  vector<uintm *> contvec;
  getRegionToChangePoint(contvec,addr,num,mask);
  for(uint4 i=0;i<contvec.size();++i)
    bitrange.setValue(contvec[i],value);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movq %rdx, %r15
movq %rdi, %r12
movq (%rdi), %rax
callq *(%rax)
movq %rax, %r14
movl 0x10(%rax), %r8d
movb 0xc(%rax), %cl
shll %cl, %r8d
movl (%rax), %ecx
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
movq (%r12), %rax
movq %r12, %rdi
movq %r15, %rdx
callq *0x18(%rax)
xorl %eax, %eax
movl %eax, %r15d
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r15, %rcx
jbe 0x54c5e
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
movl %ebx, %edx
callq 0x51ba0
leal 0x1(%r15), %eax
jmp 0x54c32
movq %rsp, %rdi
callq 0x50a60
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x50a60
movq %rbx, %rdi
callq 0x518c0
nop