LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: harry830622[P]floorplanner/src/././json.hpp
// Function: void nlohmann::detail::external_constructor<(nlohmann::detail::value_t)7>::construct<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>&, nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::number_float_t)
static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept
    {
        // replace infinity and NAN by null
        if (not std::isfinite(val))
        {
            j = BasicJsonType{};
        }
        else
        {
            j.m_type = value_t::number_float;
            j.m_value = val;
        }
        j.assert_invariant();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x26da0
movb %al, -0x29(%rbp)
jmp 0x26d30
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x26d5e
jmp 0x26d39
leaq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x21540
movq -0x8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1c590
leaq -0x20(%rbp), %rdi
callq 0x1c060
jmp 0x26d7f
movq -0x8(%rbp), %rax
movb $0x7, (%rax)
movsd -0x10(%rbp), %xmm0
leaq -0x28(%rbp), %rdi
callq 0x23030
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
callq 0x1d260
addq $0x30, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0xb170
nopw %cs:(%rax,%rax)
// File: harry830622[P]floorplanner/src/./././json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::push_back(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> const&)
void push_back(const basic_json& val)
    {
        // push_back only works for null objects or arrays
        if (not(is_null() or is_array()))
        {
            JSON_THROW(std::domain_error("cannot use push_back() with " + type_name()));
        }

        // transform null object into an array
        if (is_null())
        {
            m_type = value_t::array;
            m_value = value_t::array;
            assert_invariant();
        }

        // add element to array
        m_value.array->push_back(val);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x1ef90
testb $0x1, %al
jne 0x2c8cc
movq -0x70(%rbp), %rdi
callq 0x22790
testb $0x1, %al
jne 0x2c8cc
movb $0x1, -0x5d(%rbp)
movl $0x10, %edi
callq 0x9240
movq -0x70(%rbp), %rsi
movq %rax, -0x78(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x1f220
jmp 0x2c83a
leaq 0x1e9a9(%rip), %rsi     # 0x4b1ea
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rdx
callq 0x1f1d0
jmp 0x2c850
movq -0x78(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x95e0
jmp 0x2c85f
movq -0x78(%rbp), %rdi
movb $0x0, -0x5d(%rbp)
movq 0x3f6d2(%rip), %rsi     # 0x6bf40
movq 0x3f70b(%rip), %rdx     # 0x6bf80
callq 0x9890
jmp 0x2c924
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x2c8b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x2c8b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x9a48
leaq -0x50(%rbp), %rdi
callq 0x9a48
testb $0x1, -0x5d(%rbp)
jne 0x2c8c1
jmp 0x2c8ca
movq -0x78(%rbp), %rdi
callq 0x93a0
jmp 0x2c91b
movq -0x70(%rbp), %rdi
callq 0x1ef90
testb $0x1, %al
jne 0x2c8db
jmp 0x2c901
movq -0x70(%rbp), %rax
movb $0x2, (%rax)
leaq -0x68(%rbp), %rdi
movl $0x2, %esi
callq 0x1efb0
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rax
movq %rax, 0x8(%rdi)
callq 0x1d260
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x2fd90
addq $0x80, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x98f0
nopw %cs:(%rax,%rax)
nop
// File: harry830622[P]floorplanner/src/./././json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::operator--()
iter_impl& operator--()
        {
            assert(m_object != nullptr);

            switch (m_object->m_type)
            {
                case basic_json::value_t::object:
                {
                    std::advance(m_it.object_iterator, -1);
                    break;
                }

                case basic_json::value_t::array:
                {
                    std::advance(m_it.array_iterator, -1);
                    break;
                }

                default:
                {
                    --m_it.primitive_iterator;
                    break;
                }
            }

            return *this;
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, (%rax)
je 0x3020c
jmp 0x3022b
leaq 0x1b228(%rip), %rdi     # 0x4b43b
leaq 0x1b20e(%rip), %rsi     # 0x4b428
movl $0x23bc, %edx           # imm = 0x23BC
leaq 0x1b515(%rip), %rcx     # 0x4b73b
callq 0x9330
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb (%rax), %al
movb %al, -0x11(%rbp)
subb $0x1, %al
je 0x30246
jmp 0x3023d
movb -0x11(%rbp), %al
subb $0x2, %al
je 0x3025a
jmp 0x30272
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x30730
jmp 0x30283
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x30780
jmp 0x30283
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
addq $0x10, %rdi
callq 0x307d0
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: harry830622[P]floorplanner/src/./././json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::iter_impl(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>*)
explicit iter_impl(pointer object) noexcept
            : m_object(object)
        {
            assert(m_object != nullptr);

            switch (m_object->m_type)
            {
                case basic_json::value_t::object:
                {
                    m_it.object_iterator = typename object_t::iterator();
                    break;
                }

                case basic_json::value_t::array:
                {
                    m_it.array_iterator = typename array_t::iterator();
                    break;
                }

                default:
                {
                    m_it.primitive_iterator = primitive_iterator_t();
                    break;
                }
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, (%rdi)
addq $0x8, %rdi
callq 0x30640
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x304e4
jmp 0x30503
leaq 0x1af50(%rip), %rdi     # 0x4b43b
leaq 0x1af36(%rip), %rsi     # 0x4b428
movl $0x22ab, %edx           # imm = 0x22AB
leaq 0x1af51(%rip), %rcx     # 0x4b44f
callq 0x9330
movq -0x30(%rbp), %rax
movq (%rax), %rax
movb (%rax), %al
movb %al, -0x31(%rbp)
subb $0x1, %al
je 0x3051e
jmp 0x30515
movb -0x31(%rbp), %al
subb $0x2, %al
je 0x30535
jmp 0x3054c
leaq -0x18(%rbp), %rdi
callq 0x30690
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x30571
leaq -0x20(%rbp), %rdi
callq 0x306b0
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x30571
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x9290
leaq -0x28(%rbp), %rdi
callq 0x306d0
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x18(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: harry830622[P]floorplanner/src/./././json.hpp
// Function: nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>::iter_impl<nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>>::set_end()
void set_end() noexcept
        {
            assert(m_object != nullptr);

            switch (m_object->m_type)
            {
                case basic_json::value_t::object:
                {
                    m_it.object_iterator = m_object->m_value.object->end();
                    break;
                }

                case basic_json::value_t::array:
                {
                    m_it.array_iterator = m_object->m_value.array->end();
                    break;
                }

                default:
                {
                    m_it.primitive_iterator.set_end();
                    break;
                }
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, (%rax)
je 0x3059c
jmp 0x305bb
leaq 0x1ae98(%rip), %rdi     # 0x4b43b
leaq 0x1ae7e(%rip), %rsi     # 0x4b428
movl $0x231e, %edx           # imm = 0x231E
leaq 0x1b011(%rip), %rcx     # 0x4b5c7
callq 0x9330
movq -0x20(%rbp), %rax
movq (%rax), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
subb $0x1, %al
je 0x305d6
jmp 0x305cd
movb -0x21(%rbp), %al
subb $0x2, %al
je 0x305fb
jmp 0x30620
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x20a30
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0x30631
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x264f0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x30631
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
addq $0x10, %rdi
callq 0x30710
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: harry830622[P]floorplanner/src/./././json.hpp
// Function: nlohmann::operator<<(std::ostream&, nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer> const&)
friend std::ostream& operator<<(std::ostream& o, const basic_json& j)
    {
        // read width member and use it as indentation parameter if nonzero
        const bool pretty_print = (o.width() > 0);
        const auto indentation = (pretty_print ? o.width() : 0);

        // reset width to 0 for subsequent calls to this stream
        o.width(0);

        // do the actual serialization
        j.dump(o, pretty_print, static_cast<unsigned int>(indentation));

        return o;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq 0x45bf0
cmpq $0x0, %rax
setg %al
andb $0x1, %al
movb %al, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
je 0x36d38
movq -0x8(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq 0x45bf0
movq %rax, -0x28(%rbp)
jmp 0x36d40
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0x36d40
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq (%rdi), %rax
addq -0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x45c10
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movb -0x11(%rbp), %al
movq -0x20(%rbp), %rcx
xorl %r8d, %r8d
andb $0x1, %al
movzbl %al, %edx
callq 0x45c40
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
callq 0x2c3e0
movq -0x68(%rbp), %rax
movsd %xmm0, (%rax)
callq 0x2c3e0
movq -0x68(%rbp), %rax
movsd %xmm0, 0x8(%rax)
callq 0x487a0
movq -0x68(%rbp), %rax
movsd %xmm0, 0x10(%rax)
callq 0x487a0
movq -0x68(%rbp), %rdi
movsd %xmm0, 0x18(%rdi)
addq $0x20, %rdi
movq %rdi, -0x60(%rbp)
movq -0x10(%rbp), %rsi
callq 0x2ca70
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x487b0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x487e0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x48810
testb $0x1, %al
jne 0x47ddf
jmp 0x47ec7
leaq -0x28(%rbp), %rdi
callq 0x48850
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x48a20
movsd %xmm0, -0x70(%rbp)
jmp 0x47dfc
movsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x48a40
movsd %xmm0, -0x78(%rbp)
jmp 0x47e16
movq -0x68(%rbp), %rax
movsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x40(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x47e59
movq -0x68(%rbp), %rax
movsd -0x40(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x47e59
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
callq 0x11cd0
jmp 0x47ed0
movq -0x68(%rbp), %rax
movsd -0x58(%rbp), %xmm1
movsd 0x8(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x47e7b
movq -0x68(%rbp), %rax
movsd -0x58(%rbp), %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x68(%rbp), %rax
movsd -0x40(%rbp), %xmm0
ucomisd 0x10(%rax), %xmm0
jbe 0x47e99
movq -0x68(%rbp), %rax
movsd -0x40(%rbp), %xmm0
movsd %xmm0, 0x10(%rax)
movq -0x68(%rbp), %rax
movsd -0x58(%rbp), %xmm0
ucomisd 0x18(%rax), %xmm0
jbe 0x47eb7
movq -0x68(%rbp), %rax
movsd -0x58(%rbp), %xmm0
movsd %xmm0, 0x18(%rax)
jmp 0x47eb9
leaq -0x28(%rbp), %rdi
callq 0x48870
jmp 0x47dc9
addq $0x80, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x98f0
nopl (%rax)
// File: 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
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rsi, -0xb8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
addq $0x20, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x2d120
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x2d150
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x48890
testb $0x1, %al
jne 0x4864d
jmp 0x4874f
leaq -0x40(%rbp), %rdi
callq 0x488d0
movq -0xb8(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
movslq -0x4c(%rbp), %rsi
callq 0x1c7e0
movq (%rax), %rcx
movq %rcx, -0x70(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x68(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x60(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x70(%rbp), %rsi
addq $0x10, %rsi
callq 0x48a60
movsd %xmm0, -0x80(%rbp)
movsd %xmm1, -0x78(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x48a20
movsd %xmm0, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x48a40
movsd %xmm0, -0x90(%rbp)
movsd -0x88(%rbp), %xmm1
movsd -0x18(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x486e7
movsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x88(%rbp), %xmm0
ucomisd -0x28(%rbp), %xmm0
jbe 0x48703
movsd -0x88(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x90(%rbp), %xmm1
movsd -0x20(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x48723
movsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x90(%rbp), %xmm0
ucomisd -0x30(%rbp), %xmm0
jbe 0x4873f
movsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0x48741
leaq -0x40(%rbp), %rdi
callq 0x488f0
jmp 0x48637
movsd -0x18(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
leaq -0xa0(%rbp), %rdi
callq 0x48b00
movsd -0x28(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
leaq -0xb0(%rbp), %rdi
callq 0x48b00
leaq -0xa0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x489a0
addq $0xc0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rsp), %rdi
leaq 0xa3b0c(%rip), %rsi     # 0x187000
callq 0xd8300
movq 0x8(%rsp), %rdi
callq 0xd9cf0
movq 0x8(%rsp), %rdi
movq %rax, 0x10(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
callq 0xe03b0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rax, %rdx
movq (%rdi), %rax
movq 0x38(%rax), %rax
callq *%rax
movq 0x68(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x47(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xe0c80
movq 0x28(%rsp), %rdx
leaq 0xa3ab1(%rip), %rsi     # 0x187008
leaq 0x48(%rsp), %rdi
callq 0xe00a0
jmp 0xe3563
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rax
movl 0x10(%rax), %eax
movl %eax, %edx
leaq 0x48(%rsp), %rsi
callq 0xd7c30
jmp 0xe357e
leaq 0x48(%rsp), %rdi
callq 0xd4550
leaq 0x47(%rsp), %rdi
callq 0xd8ec0
movq 0x68(%rsp), %rdi
leaq 0xa4cc5(%rip), %rsi     # 0x188263
callq 0xd8300
addq $0x78, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
jmp 0xe35d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x48(%rsp), %rdi
callq 0xd4550
leaq 0x47(%rsp), %rdi
callq 0xd8ec0
movq 0x38(%rsp), %rdi
callq 0xe0be0
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdi, 0x20(%rsp)
movq %rdi, %rax
movq %rax, 0x28(%rsp)
movq %rdi, 0x1f0(%rsp)
movq %rsi, 0x1e8(%rsp)
movq %rdx, 0x1e0(%rsp)
movl $0xffffffff, 0x1dc(%rsp) # imm = 0xFFFFFFFF
movq 0x1e8(%rsp), %rsi
movq 0x1e0(%rsp), %rdx
leaq 0x1c8(%rsp), %rdi
callq 0xe1830
movl $0x0, 0x1c4(%rsp)
movl 0x1c4(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x1e8(%rsp), %rdi
callq 0xd2b80
movl %eax, %ecx
movl 0x1c(%rsp), %eax
cmpl %ecx, %eax
jge 0xe3768
movq 0x1e8(%rsp), %rdi
movl 0x1c4(%rsp), %esi
callq 0xd5520
movq %rax, %rdi
leaq 0xa3975(%rip), %rsi     # 0x187008
callq 0xe30f0
testb $0x1, %al
jne 0xe36a1
jmp 0xe3750
movq 0x1e8(%rsp), %rdi
movl 0x1c4(%rsp), %esi
callq 0xd9670
movq %rax, %rsi
leaq 0x40(%rsp), %rdi
movl $0x8, %edx
movl %edx, 0xc(%rsp)
callq 0xdfcc0
movl 0xc(%rsp), %esi
movq 0x40(%rsp), %rax
movq -0x18(%rax), %rax
leaq 0x40(%rsp,%rax), %rax
movq %rax, 0x10(%rsp)
movl $0x2, %edi
callq 0xe0e70
movl %eax, 0x18(%rsp)
jmp 0xe36f2
movl 0x18(%rsp), %edi
movl $0x40, %esi
callq 0xe0e70
movl %eax, 0x8(%rsp)
jmp 0xe3706
movl 0x8(%rsp), %esi
movq 0x10(%rsp), %rdi
callq 0xda6e0
jmp 0xe3716
leaq 0x40(%rsp), %rdi
leaq 0x1dc(%rsp), %rsi
callq 0xceae0
jmp 0xe372a
leaq 0x40(%rsp), %rdi
callq 0xd25a0
jmp 0xe3768
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x40(%rsp), %rdi
callq 0xd25a0
jmp 0xe378e
jmp 0xe3752
movl 0x1c4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c4(%rsp)
jmp 0xe364f
movq 0x20(%rsp), %rdi
movl 0x1dc(%rsp), %edx
leaq 0x1c8(%rsp), %rsi
callq 0xcf400
movq 0x28(%rsp), %rax
addq $0x1f8, %rsp            # imm = 0x1F8
retq
movq 0x38(%rsp), %rdi
callq 0xe0be0
nopl (%rax,%rax)
// File: jstaursky[P]hutch/src/Sleigh/address.cc
// Function: Address::Address(Address::mach_extreme)
Address::Address(mach_extreme ex)

{
  if (ex == m_minimal) {
    base = (AddrSpace *)0;
    offset = 0;
  }
  else {
    base = (AddrSpace *) ~((uintp)0);
    offset = ~((uintb)0);
  }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpl $0x0, -0xc(%rsp)
jne 0xe3830
movq -0x18(%rsp), %rax
movq $0x0, (%rax)
movq $0x0, 0x8(%rax)
jmp 0xe3847
movq -0x18(%rsp), %rax
movq $-0x1, %rcx
movq %rcx, (%rax)
movq $-0x1, 0x8(%rax)
retq
nopl (%rax,%rax)
// File: 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, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movq %rdx, -0x20(%rsp)
movl %ecx, -0x24(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x40(%rsp)
movq (%rax), %rax
movq -0x20(%rsp), %rcx
cmpq (%rcx), %rax
je 0xe38d0
movb $0x0, -0x1(%rsp)
jmp 0xe3934
movq -0x40(%rsp), %rcx
movq -0x20(%rsp), %rax
movq 0x8(%rax), %rax
cmpq 0x8(%rcx), %rax
jbe 0xe38eb
movb $0x0, -0x1(%rsp)
jmp 0xe3934
movq -0x40(%rsp), %rax
movq 0x8(%rax), %rax
movl -0x14(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rsp)
movq -0x20(%rsp), %rax
movq 0x8(%rax), %rax
movl -0x24(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rsp)
movq -0x38(%rsp), %rax
cmpq -0x30(%rsp), %rax
setae %al
andb $0x1, %al
movb %al, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nopl (%rax,%rax)
// File: 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:
subq $0x48, %rsp
movb %r8b, %al
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq %rdx, 0x28(%rsp)
movl %ecx, 0x24(%rsp)
andb $0x1, %al
movb %al, 0x23(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq (%rax), %rax
movq 0x28(%rsp), %rcx
cmpq (%rcx), %rax
je 0xe3983
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0xe3a30
movq 0x8(%rsp), %rcx
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
cmpq 0x8(%rcx), %rax
jae 0xe39a4
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0xe3a30
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x34(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movl 0x24(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jbe 0xe39f0
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0xe3a30
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0xddec0
testb $0x1, %al
jne 0xe3a03
jmp 0xe3a1a
testb $0x1, 0x23(%rsp)
jne 0xe3a1a
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
movl %eax, 0x44(%rsp)
jmp 0xe3a30
movq 0x8(%rsp), %rcx
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
subq 0x8(%rcx), %rax
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
movl %ecx, 0x14(%rsp)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq (%rax), %rax
movq 0x18(%rsp), %rcx
cmpq (%rcx), %rax
je 0xe3a76
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0xe3ad9
movq (%rsp), %rax
movq (%rax), %rdi
callq 0xcfb80
cmpl $0x0, %eax
jne 0xe3a91
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0xe3ad9
movq (%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movslq 0x24(%rsp), %rax
addq %rax, %rsi
movq 0x18(%rsp), %rax
subq 0x8(%rax), %rsi
callq 0xcfa10
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movslq 0x14(%rsp), %rcx
cmpq %rcx, %rax
jb 0xe3ad0
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0xe3ad9
movq 0x8(%rsp), %rax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq %rdx, 0x28(%rsp)
movl %ecx, 0x24(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq (%rax), %rax
movq 0x28(%rsp), %rcx
cmpq (%rcx), %rax
je 0xe3b27
movb $0x0, 0x47(%rsp)
jmp 0xe3bb2
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0xddec0
testb $0x1, %al
jne 0xe3b3a
jmp 0xe3b71
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movslq 0x34(%rsp), %rax
addq %rax, %rsi
callq 0xcfa10
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x28(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jne 0xe3b6f
movb $0x1, 0x47(%rsp)
jmp 0xe3bb2
jmp 0xe3bad
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rsi
movslq 0x24(%rsp), %rax
addq %rax, %rsi
callq 0xcfa10
movq 0x8(%rsp), %rcx
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x8(%rcx), %rax
jne 0xe3bab
movb $0x1, 0x47(%rsp)
jmp 0xe3bb2
jmp 0xe3bad
movb $0x0, 0x47(%rsp)
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopl (%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x28(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rdi
callq 0xdd9c0
movq %rax, %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
jne 0xe3c96
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xd5700
movq %rax, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
jmp 0xe3ca4
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0xe3cbd
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0xcf370
jmp 0xe3cd1
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0xd81b0
movq 0x10(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: jstaursky[P]hutch/src/Sleigh/address.cc
// Function: Range::saveXml(std::ostream&) 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:
subq $0xd8, %rsp
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xc8(%rsp), %rdi
leaq 0xa326a(%rip), %rsi     # 0x18700d
callq 0xd8300
movq 0xc8(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0xa7(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xe0c80
movq 0x38(%rsp), %rdx
leaq 0xa3d46(%rip), %rsi     # 0x187b19
leaq 0xa8(%rsp), %rdi
callq 0xe00a0
jmp 0xe3de2
movq 0x28(%rsp), %rax
movq (%rax), %rdi
callq 0xd06f0
movq %rax, 0x20(%rsp)
jmp 0xe3df6
movq 0x20(%rsp), %rdx
movq 0x30(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xd18c0
jmp 0xe3e0f
leaq 0xa8(%rsp), %rdi
callq 0xd4550
leaq 0xa7(%rsp), %rdi
callq 0xd8ec0
movq 0xc8(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x6f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xe0c80
movq 0x18(%rsp), %rdx
leaq 0xa31c3(%rip), %rsi     # 0x187014
leaq 0x70(%rsp), %rdi
callq 0xe00a0
jmp 0xe3e5d
movq 0x10(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdx
leaq 0x70(%rsp), %rsi
callq 0xd7c30
jmp 0xe3e77
leaq 0x70(%rsp), %rdi
callq 0xd4550
leaq 0x6f(%rsp), %rdi
callq 0xd8ec0
movq 0xc8(%rsp), %rax
movq %rax, (%rsp)
leaq 0x47(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xe0c80
movq 0x8(%rsp), %rdx
leaq 0xa3168(%rip), %rsi     # 0x18701a
leaq 0x48(%rsp), %rdi
callq 0xe00a0
jmp 0xe3ebe
movq (%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdx
leaq 0x48(%rsp), %rsi
callq 0xd7c30
jmp 0xe3ed7
leaq 0x48(%rsp), %rdi
callq 0xd4550
leaq 0x47(%rsp), %rdi
callq 0xd8ec0
movq 0xc8(%rsp), %rdi
leaq 0xa4923(%rip), %rsi     # 0x18881d
callq 0xd8300
addq $0xd8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0xe3f3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0xd4550
leaq 0xa7(%rsp), %rdi
callq 0xd8ec0
jmp 0xe3fcb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0xe3f81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x70(%rsp), %rdi
callq 0xd4550
leaq 0x6f(%rsp), %rdi
callq 0xd8ec0
jmp 0xe3fcb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0xe3fc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x48(%rsp), %rdi
callq 0xd4550
leaq 0x47(%rsp), %rdi
callq 0xd8ec0
movq 0x98(%rsp), %rdi
callq 0xe0be0
nopl (%rax,%rax)
// File: 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:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x98(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, (%rsp)
leaq 0x90(%rsp), %rdi
callq 0xd3ea0
leaq 0x88(%rsp), %rdi
callq 0xd3ea0
movq 0xa8(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0xa0(%rsp), %rcx
leaq 0x68(%rsp), %rdi
callq 0xdac60
movq (%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xd06d0
movq (%rsp), %rdi
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x90(%rsp)
callq 0xdc5d0
movq %rax, 0x60(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0xcf5f0
testb $0x1, %al
jne 0xe463b
jmp 0xe468c
leaq 0x90(%rsp), %rdi
callq 0xe2ec0
leaq 0x90(%rsp), %rdi
callq 0xd1290
movq (%rax), %rax
cmpq 0xa8(%rsp), %rax
jne 0xe467d
leaq 0x90(%rsp), %rdi
callq 0xd1290
movq 0x10(%rax), %rax
cmpq 0xa0(%rsp), %rax
jae 0xe468a
leaq 0x90(%rsp), %rdi
callq 0xdca10
jmp 0xe468c
movq 0xa8(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq 0x98(%rsp), %rcx
leaq 0x40(%rsp), %rdi
callq 0xdac60
movq (%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xd06d0
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xcf5f0
testb $0x1, %al
jne 0xe46ec
jmp 0xe4780
leaq 0x90(%rsp), %rdi
callq 0xd1290
movq 0x8(%rax), %rax
cmpq 0xa0(%rsp), %rax
jae 0xe4720
leaq 0x90(%rsp), %rdi
callq 0xd1290
movq 0x8(%rax), %rax
movq %rax, 0xa0(%rsp)
leaq 0x90(%rsp), %rdi
callq 0xd1290
movq 0x10(%rax), %rax
cmpq 0x98(%rsp), %rax
jbe 0xe4754
leaq 0x90(%rsp), %rdi
callq 0xd1290
movq 0x10(%rax), %rax
movq %rax, 0x98(%rsp)
leaq 0x90(%rsp), %rdi
xorl %esi, %esi
callq 0xd4c80
movq (%rsp), %rdi
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rsi
callq 0xdb1d0
movq %rax, 0x30(%rsp)
jmp 0xe46ce
movq 0xa8(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x98(%rsp), %rcx
leaq 0x18(%rsp), %rdi
callq 0xdac60
movq (%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xd3650
movq %rax, 0x8(%rsp)
movb %dl, 0x10(%rsp)
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0xf8, %rsp
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xe0(%rsp)
movq %rcx, 0xd8(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0xd3ea0
leaq 0xc8(%rsp), %rdi
callq 0xd3ea0
movq 0x8(%rsp), %rdi
callq 0xe25e0
testb $0x1, %al
jne 0xe482e
jmp 0xe4833
jmp 0xe4a5a
movq 0xe8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
movq 0xe0(%rsp), %rcx
leaq 0xa8(%rsp), %rdi
callq 0xdac60
movq 0x8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xd06d0
movq 0x8(%rsp), %rdi
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0xd0(%rsp)
callq 0xdc5d0
movq %rax, 0xa0(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xcf5f0
testb $0x1, %al
jne 0xe48af
jmp 0xe4900
leaq 0xd0(%rsp), %rdi
callq 0xe2ec0
leaq 0xd0(%rsp), %rdi
callq 0xd1290
movq (%rax), %rax
cmpq 0xe8(%rsp), %rax
jne 0xe48f1
leaq 0xd0(%rsp), %rdi
callq 0xd1290
movq 0x10(%rax), %rax
cmpq 0xe0(%rsp), %rax
jae 0xe48fe
leaq 0xd0(%rsp), %rdi
callq 0xdca10
jmp 0xe4900
movq 0xe8(%rsp), %rsi
movq 0xd8(%rsp), %rdx
movq 0xd8(%rsp), %rcx
leaq 0x80(%rsp), %rdi
callq 0xdac60
movq 0x8(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0xd06d0
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0xc8(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0xcf5f0
testb $0x1, %al
jne 0xe496d
jmp 0xe4a5a
leaq 0xd0(%rsp), %rdi
callq 0xd1290
movq 0x8(%rax), %rax
movq %rax, 0x78(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0xd1290
movq 0x10(%rax), %rax
movq %rax, 0x70(%rsp)
leaq 0xd0(%rsp), %rdi
xorl %esi, %esi
callq 0xd4c80
movq 0x8(%rsp), %rdi
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rsi
callq 0xdb1d0
movq %rax, 0x60(%rsp)
movq 0x78(%rsp), %rax
cmpq 0xe0(%rsp), %rax
jae 0xe4a0b
movq 0xe8(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0xe0(%rsp), %rcx
subq $0x1, %rcx
leaq 0x48(%rsp), %rdi
callq 0xdac60
movq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xd3650
movq %rax, 0x38(%rsp)
movb %dl, 0x40(%rsp)
movq 0x70(%rsp), %rax
cmpq 0xd8(%rsp), %rax
jbe 0xe4a55
movq 0xe8(%rsp), %rsi
movq 0xd8(%rsp), %rdx
addq $0x1, %rdx
movq 0x70(%rsp), %rcx
leaq 0x20(%rsp), %rdi
callq 0xdac60
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xd3650
movq %rax, 0x10(%rsp)
movb %dl, 0x18(%rsp)
jmp 0xe494f
addq $0xf8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xd3ea0
leaq 0x28(%rsp), %rdi
callq 0xd3ea0
movq 0x38(%rsp), %rdi
callq 0xdc5d0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
callq 0xdf030
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xcf5f0
testb $0x1, %al
jne 0xe4ae3
jmp 0xe4b22
leaq 0x30(%rsp), %rdi
callq 0xd1290
movq %rax, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xdca10
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdx
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rcx
callq 0xd3b60
jmp 0xe4ace
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: jstaursky[P]hutch/src/Sleigh/address.cc
// Function: RangeList::inRange(Address const&, int) const
bool RangeList::inRange(const Address &addr,int4 size) const

{
  set<Range>::const_iterator iter;

  if (addr.isInvalid()) return true; // We don't really care
  if (tree.empty()) return false;

  // iter = first range with its first > addr
  iter = tree.upper_bound(Range(addr.getSpace(),addr.getOffset(),addr.getOffset()));
  if (iter == tree.begin()) return false;
  // Set iter to last range with range.first <= addr
  --iter;
  //  if (iter == tree.end())   // iter can't be end if non-empty
  //    return false;
  if ((*iter).spc != addr.getSpace()) return false;
  if ((*iter).last >= addr.getOffset()+size-1)
    return true;
  return false;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movl %edx, 0x5c(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xd3ea0
movq 0x60(%rsp), %rdi
callq 0xce5a0
testb $0x1, %al
jne 0xe4b66
jmp 0xe4b70
movb $0x1, 0x77(%rsp)
jmp 0xe4c8c
movq 0x20(%rsp), %rdi
callq 0xe25e0
testb $0x1, %al
jne 0xe4b80
jmp 0xe4b8a
movb $0x0, 0x77(%rsp)
jmp 0xe4c8c
movq 0x60(%rsp), %rdi
callq 0xd9cf0
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rdi
callq 0xe03b0
movq %rax, 0x18(%rsp)
movq 0x60(%rsp), %rdi
callq 0xe03b0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rax, %rcx
leaq 0x30(%rsp), %rdi
callq 0xdac60
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xd55d0
movq 0x20(%rsp), %rdi
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x50(%rsp)
callq 0xdc5d0
movq %rax, 0x28(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xd4370
testb $0x1, %al
jne 0xe4c0b
jmp 0xe4c12
movb $0x0, 0x77(%rsp)
jmp 0xe4c8c
leaq 0x50(%rsp), %rdi
callq 0xe2ec0
leaq 0x50(%rsp), %rdi
callq 0xd1290
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rdi
callq 0xd9cf0
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
je 0xe4c4c
movb $0x0, 0x77(%rsp)
jmp 0xe4c8c
leaq 0x50(%rsp), %rdi
callq 0xd1290
movq 0x10(%rax), %rax
movq %rax, (%rsp)
movq 0x60(%rsp), %rdi
callq 0xe03b0
movq %rax, %rcx
movq (%rsp), %rax
movslq 0x5c(%rsp), %rdx
addq %rdx, %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jb 0xe4c87
movb $0x1, 0x77(%rsp)
jmp 0xe4c8c
movb $0x0, 0x77(%rsp)
movb 0x77(%rsp), %al
andb $0x1, %al
addq $0x78, %rsp
retq
nopw (%rax,%rax)
// File: jstaursky[P]hutch/src/Sleigh/address.cc
// Function: RangeList::getRange(AddrSpace*, unsigned long) const
const Range *RangeList::getRange(AddrSpace *spaceid,uintb offset) const

{
  if (tree.empty()) return (const Range *)0;

  // iter = first range with its first > offset
  set<Range>::const_iterator iter = tree.upper_bound(Range(spaceid,offset,offset));
  if (iter == tree.begin()) return (const Range *)0;
  // Set iter to last range with range.first <= offset
  --iter;
  if ((*iter).spc != spaceid) return (const Range *)0;
  if ((*iter).last >= offset)
    return &(*iter);
  return (const Range *)0;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xe25e0
testb $0x1, %al
jne 0xe4cc8
jmp 0xe4cd6
movq $0x0, 0x50(%rsp)
jmp 0xe4d8a
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x18(%rsp), %rdi
callq 0xdac60
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xd55d0
movq 0x8(%rsp), %rdi
movq %rax, 0x30(%rsp)
callq 0xdc5d0
movq %rax, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xd4370
testb $0x1, %al
jne 0xe4d27
jmp 0xe4d32
movq $0x0, 0x50(%rsp)
jmp 0xe4d8a
leaq 0x30(%rsp), %rdi
callq 0xe2ec0
leaq 0x30(%rsp), %rdi
callq 0xd1290
movq (%rax), %rax
cmpq 0x40(%rsp), %rax
je 0xe4d5b
movq $0x0, 0x50(%rsp)
jmp 0xe4d8a
leaq 0x30(%rsp), %rdi
callq 0xd1290
movq 0x10(%rax), %rax
cmpq 0x38(%rsp), %rax
jb 0xe4d81
leaq 0x30(%rsp), %rdi
callq 0xd1290
movq %rax, 0x50(%rsp)
jmp 0xe4d8a
movq $0x0, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: jstaursky[P]hutch/src/Sleigh/address.cc
// Function: RangeList::longestFit(Address const&, unsigned long) const
uintb RangeList::longestFit(const Address &addr,uintb maxsize) const

{
  set<Range>::const_iterator iter;

  if (addr.isInvalid()) return 0;
  if (tree.empty()) return 0;

  // iter = first range with its first > addr
  uintb offset = addr.getOffset();
  iter = tree.upper_bound(Range(addr.getSpace(),offset,offset));
  if (iter == tree.begin()) return 0;
  // Set iter to last range with range.first <= addr
  --iter;
  uintb sizeres = 0;
  if ((*iter).last < offset) return sizeres;
  do {
    if ((*iter).spc != addr.getSpace()) break;
    if ((*iter).first > offset) break;
    sizeres += ((*iter).last + 1 - offset); // Size extends to end of range
    offset = (*iter).last + 1;	// Try to chain on the next range
    if (sizeres >= maxsize) break; // Don't bother if past maxsize
    ++iter;			// Next range in the chain
  } while(iter != tree.end());
  return sizeres;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xd3ea0
movq 0x60(%rsp), %rdi
callq 0xce5a0
testb $0x1, %al
jne 0xe4dd7
jmp 0xe4de5
movq $0x0, 0x70(%rsp)
jmp 0xe4f7f
movq 0x8(%rsp), %rdi
callq 0xe25e0
testb $0x1, %al
jne 0xe4df5
jmp 0xe4e03
movq $0x0, 0x70(%rsp)
jmp 0xe4f7f
movq 0x60(%rsp), %rdi
callq 0xe03b0
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rdi
callq 0xd9cf0
movq %rax, %rsi
movq 0x48(%rsp), %rdx
movq 0x48(%rsp), %rcx
leaq 0x28(%rsp), %rdi
callq 0xdac60
movq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xd55d0
movq 0x8(%rsp), %rdi
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x50(%rsp)
callq 0xdc5d0
movq %rax, 0x20(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xd4370
testb $0x1, %al
jne 0xe4e75
jmp 0xe4e83
movq $0x0, 0x70(%rsp)
jmp 0xe4f7f
leaq 0x50(%rsp), %rdi
callq 0xe2ec0
movq $0x0, 0x18(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xd1290
movq 0x10(%rax), %rax
cmpq 0x48(%rsp), %rax
jae 0xe4eba
movq 0x18(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0xe4f7f
jmp 0xe4ebc
leaq 0x50(%rsp), %rdi
callq 0xd1290
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x60(%rsp), %rdi
callq 0xd9cf0
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
je 0xe4ee8
jmp 0xe4f75
leaq 0x50(%rsp), %rdi
callq 0xd1290
movq 0x8(%rax), %rax
cmpq 0x48(%rsp), %rax
jbe 0xe4eff
jmp 0xe4f75
leaq 0x50(%rsp), %rdi
callq 0xd1290
movq 0x10(%rax), %rax
addq $0x1, %rax
subq 0x48(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xd1290
movq 0x10(%rax), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x58(%rsp), %rax
jb 0xe4f45
jmp 0xe4f75
leaq 0x50(%rsp), %rdi
callq 0xdca10
movq 0x8(%rsp), %rdi
callq 0xdf030
movq %rax, 0x10(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xcf5f0
testb $0x1, %al
jne 0xe4ebc
movq 0x18(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
addq $0x78, %rsp
retq
nopl (%rax)
// File: jstaursky[P]hutch/src/Sleigh/address.cc
// Function: RangeList::getLastRange() const
const Range *RangeList::getLastRange(void) const

{
  if (tree.empty()) return (const Range *)0;
  set<Range>::const_iterator iter = tree.end();
  --iter;
  return &(*iter);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xe25e0
testb $0x1, %al
jne 0xe500e
jmp 0xe5019
movq $0x0, 0x20(%rsp)
jmp 0xe5041
movq 0x8(%rsp), %rdi
callq 0xdf030
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
callq 0xe2ec0
leaq 0x10(%rsp), %rdi
callq 0xd1290
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)