name string | code string | asm string | file string |
|---|---|---|---|
ObjTable<QPDFWriter::Object>::element(unsigned long) const | inline T const&
element(size_t idx) const
{
static const size_t max_size = std::vector<T>::max_size();
if (idx < std::vector<T>::size()) {
return std::vector<T>::operator[](idx);
}
if (idx < max_size) {
return sparse_elements.at(idx);
}
thr... | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rsp)
movb 0xcf2ad(%rip), %al # 0x1f1408
testb %al, %al
je 0x1221ae
movq (%rsp), %rax
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %rsi
cmpq %rsi, %rax
ja... | /jberkenbilt[P]qpdf/libqpdf/qpdf/ObjTable.hh |
void QPDF::pushOutlinesToPart<QPDFWriter::ObjTable>(std::vector<QPDFObjectHandle, std::allocator<QPDFObjectHandle>>&, std::set<QPDFObjGen, std::less<QPDFObjGen>, std::allocator<QPDFObjGen>>&, QPDFWriter::ObjTable const&) | void
QPDF::pushOutlinesToPart(
std::vector<QPDFObjectHandle>& part,
std::set<QPDFObjGen>& lc_outlines,
T const& object_stream_data)
{
QPDFObjectHandle root = getRoot();
QPDFObjectHandle outlines = root.getKey("/Outlines");
if (outlines.isNull()) {
return;
}
outlines = getUncompre... | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x3cf38
leaq 0x20(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x56edd(%rip), %rsi # 0x179257
leaq 0x56edf(%rip), %rdx # 0x179260
leaq 0x... | /jberkenbilt[P]qpdf/libqpdf/QPDF_linearization.cc |
ObjTable<QPDFWriter::NewObject>::element(unsigned long) const | inline T const&
element(size_t idx) const
{
static const size_t max_size = std::vector<T>::max_size();
if (idx < std::vector<T>::size()) {
return std::vector<T>::operator[](idx);
}
if (idx < max_size) {
return sparse_elements.at(idx);
}
thr... | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rsp)
movb 0xceedb(%rip), %al # 0x1f1418
testb %al, %al
je 0x122581
movq (%rsp), %rcx
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq %rdx, %rcx
jae 0x122561
shlq $0x5, %rcx
addq %rcx, %rax
jmp 0x122579
cmpq 0xceea8(%rip), %rc... | /jberkenbilt[P]qpdf/libqpdf/qpdf/ObjTable.hh |
QPDF::findStartxref() | bool
QPDF::findStartxref()
{
if (readToken(*m->file).isWord("startxref") && readToken(*m->file).isInteger()) {
// Position in front of offset token
m->file->seek(m->file->getLastOffset(), SEEK_SET);
return true;
}
return false;
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0xf0, %rsp
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0xb0(%rcx), %rdx
leaq 0x18(%rcx), %rsi
addq $0xc0, %rcx
leaq 0x20(%rsp), %rdi
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0xe2c1a
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5bce3(%rip), %rsi # 0x17e449
leaq 0x5bce5(%rip), %r... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::read_xref(long long) | void
QPDF::read_xref(qpdf_offset_t xref_offset)
{
std::map<int, int> free_table;
std::set<qpdf_offset_t> visited;
while (xref_offset) {
visited.insert(xref_offset);
char buf[7];
memset(buf, 0, sizeof(buf));
m->file->seek(xref_offset, SEEK_SET);
// Some files miss the ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp # imm = 0x1C8
movq %rdi, %rbx
movq %rsi, 0x20(%rsp)
leaq 0x1a0(%rsp), %rax
xorl %ebp, %ebp
movl %ebp, (%rax)
movq %rbp, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rbp, 0x20(%rax)
leaq 0x170(%rsp), %r14
movl %... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::insertXrefEntry(int, int, long long, int) | void
QPDF::insertXrefEntry(int obj, int f0, qpdf_offset_t f1, int f2)
{
// Populate the xref table in such a way that the first reference to an object that we see,
// which is the one in the latest xref table in which it appears, is the one that gets stored.
// This works because we are reading more recent ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
xorl %eax, %eax
cmpl $0x2, %edx
cmovnel %r8d, %eax
testl %esi, %esi
jle 0x126163
cmpl $0xfffe, %eax # imm = 0xFFFE
jg 0x126163
movl %r8d, %r12d
testl %r8d, %r8d
js 0x126163
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rdi
cmpl... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::readTrailer() | QPDFObjectHandle
QPDF::readTrailer()
{
qpdf_offset_t offset = m->file->tell();
auto [object, empty] = QPDFParser::parse(*m->file, "trailer", m->tokenizer, nullptr, *this);
if (empty) {
// Nothing in the PDF spec appears to allow empty objects, but they have been encountered in
// actual PDF ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, %r15
movq (%r14), %rax
movq 0xb0(%rax), %r12
leaq 0x68(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x589ba(%rip), %rsi ... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::getObject(QPDFObjGen) | QPDFObjectHandle
QPDF::getObject(QPDFObjGen og)
{
if (auto it = m->obj_cache.find(og); it != m->obj_cache.end()) {
return {it->second.object};
} else if (m->parsed && !m->xref_table.count(og)) {
return QPDFObject::create<QPDF_Null>();
} else {
auto result =
m->obj_cache.t... | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rsi
movq %rdx, (%rsi)
movl $0x1a8, %edi # imm = 0x1A8
addq (%r14), %rdi
callq 0x13447e
movq (%r14), %r15
leaq 0x1b0(%r15), %rcx
cmpq %rcx, %rax
je 0x126751
movq 0x28(%rax), %rcx
movq %rcx, (%rb... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::read_xrefTable(long long) | qpdf_offset_t
QPDF::read_xrefTable(qpdf_offset_t xref_offset)
{
m->file->seek(xref_offset, SEEK_SET);
std::string line;
while (true) {
line.assign(50, '\0');
m->file->read(line.data(), line.size());
int obj = 0;
int num = 0;
int bytes = 0;
if (!parse_xrefFirst... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rdi, %rbx
movq (%rdi), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
movq %rsi, 0xf0(%rsp)
xorl %edx, %edx
callq *0x28(%rax)
leaq 0xe0(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%r... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::removeObject(QPDFObjGen) | void
QPDF::removeObject(QPDFObjGen og)
{
m->xref_table.erase(og);
if (auto cached = m->obj_cache.find(og); cached != m->obj_cache.end()) {
// Take care of any object handles that may be floating around.
cached->second.object->assign_null();
cached->second.object->setObjGen(nullptr, QPDFO... | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %rsi, (%r15)
movl $0x138, %r14d # imm = 0x138
addq (%rdi), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x133a94
movq %r14, %rdi
movq %rax, %rsi
callq 0x133b62
movl $0x1a8, %r14d # imm = 0x1A8
movq (%rbx), %rdi... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::parse_xrefFirst(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int&, int&, int&) | bool
QPDF::parse_xrefFirst(std::string const& line, int& obj, int& num, int& bytes)
{
// is_space and is_digit both return false on '\0', so this will not overrun the null-terminated
// buffer.
char const* p = line.c_str();
char const* start = line.c_str();
// Skip zero or more spaces
while (ut... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r15
movq %rdx, %r14
movq (%rsi), %rbx
leaq 0x1(%rbx), %rbp
xorl %r12d, %r12d
movb (%rbx,%r12), %al
movzbl %al, %esi
leal -0x9(%rsi), %edx
cmpl $0x5, %edx
jae 0x1279f0
incq %r12
jmp 0x1279dc
cmpl $0x20, %esi
je 0x1279eb
addb $-... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::read_bad_xrefEntry(long long&, int&, char&) | bool
QPDF::read_bad_xrefEntry(qpdf_offset_t& f1, int& f2, char& type)
{
// Reposition after initial read attempt and reread.
m->file->seek(m->file->getLastOffset(), SEEK_SET);
auto line = m->file->readLine(30);
// is_space and is_digit both return false on '\0', so this will not overrun the null-termin... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rcx, %r12
movq %rdx, 0x40(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rax
movq 0xb0(%rax), %r13
movq %r13, %rdi
callq 0x201e2
movq (%r13), %rcx
xorl %ebp, %ebp
movq %r13, %rdi
movq %rax, %rsi
xorl ... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::insertFreeXrefEntry(QPDFObjGen) | void
QPDF::insertFreeXrefEntry(QPDFObjGen og)
{
if (!m->xref_table.count(og)) {
m->deleted_objects.insert(og.getObj());
}
} | pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
movq (%rdi), %r14
leaq 0x138(%r14), %rdi
movq %rax, %rsi
callq 0x122244
addq $0x140, %r14 # imm = 0x140
cmpq %r14, %rax
jne 0x128180
movl $0x178, %edi # imm = 0x178
addq (%rbx), %rdi
movl 0x8(%rsp), %eax
... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::processXRefW(QPDFObjectHandle&, std::function<QPDFExc (std::basic_string_view<char, std::char_traits<char>>)>) | std::pair<int, std::array<int, 3>>
QPDF::processXRefW(QPDFObjectHandle& dict, std::function<QPDFExc(std::string_view)> damaged)
{
auto W_obj = dict.getKey("/W");
if (!(W_obj.isArray() && (W_obj.getArrayNItems() >= 3) && W_obj.getArrayItem(0).isInteger() &&
W_obj.getArrayItem(1).isInteger() && W_obj.ge... | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x4fca7(%rip), %rsi # 0x17989f
leaq 0x4fca2(%rip), %rdx # 0x1798a1
leaq 0x18(%rsp), %rdi
callq 0x1ee2c
leaq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rdx
movq %r14, %rsi
callq ... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::processXRefSize(QPDFObjectHandle&, int, std::function<QPDFExc (std::basic_string_view<char, std::char_traits<char>>)>) | int
QPDF::processXRefSize(
QPDFObjectHandle& dict, int entry_size, std::function<QPDFExc(std::string_view)> damaged)
{
// Number of entries is limited by the highest possible object id and stream size.
auto max_num_entries = std::numeric_limits<int>::max();
if (max_num_entries > (std::numeric_limits<qpd... | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movq %rsi, %r14
movslq %edx, %rcx
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
idivq %rcx
movl $0x7fffffff, %ebp # imm = 0x7FFFFFFF
cmpq $0x7ffffffe, %rax # imm = 0x7FFFFFFE
jg 0x129fad
movq %rax, %r... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::processXRefIndex(QPDFObjectHandle&, int, std::function<QPDFExc (std::basic_string_view<char, std::char_traits<char>>)>) | std::pair<int, std::vector<std::pair<int, int>>>
QPDF::processXRefIndex(
QPDFObjectHandle& dict, int max_num_entries, std::function<QPDFExc(std::string_view)> damaged)
{
auto size = dict.getKey("/Size").getIntValueAsInt();
auto Index_obj = dict.getKey("/Index");
if (Index_obj.isArray()) {
std::... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp # imm = 0x178
movq %r8, %r13
movl %ecx, 0x34(%rsp)
movq %rdx, %rbx
movq %rdi, 0x78(%rsp)
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x37da3(%rip), %rsi # 0x161f99
leaq 0x37da1(%rip), %rdx # 0x161f9e
movq %rsp, ... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::showXRefTable() | void
QPDF::showXRefTable()
{
auto& cout = *m->log->getInfo();
for (auto const& iter: m->xref_table) {
QPDFObjGen const& og = iter.first;
QPDFXRefEntry const& entry = iter.second;
cout << og.unparse('/') << ": ";
switch (entry.getType()) {
case 1:
cout << "unco... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq (%rax), %rsi
movq %rsp, %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0xb9494
movq (%r15), %r14
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x12ad31
callq 0x1d0e8
movq (%rbx), %rax
movq 0x150(%rax), %r15
... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::resolve(QPDFObjGen) | std::shared_ptr<QPDFObject> const&
QPDF::resolve(QPDFObjGen og)
{
if (!isUnresolved(og)) {
return m->obj_cache[og].object;
}
if (m->resolving.count(og)) {
// This can happen if an object references itself directly or indirectly in some key that
// has to be resolved during object pa... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp # imm = 0x148
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
callq 0x12af68
movq (%rbx), %r14
testb %al, %al
je 0x12b083
leaq 0x1d8(%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2fe8e
addq $0x1e0, %r14 # imm = 0x1E0
cmpq %r14, %r... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::newIndirect(QPDFObjGen, std::shared_ptr<QPDFObject> const&) | QPDFObjectHandle
QPDF::newIndirect(QPDFObjGen og, std::shared_ptr<QPDFObject> const& obj)
{
obj->setDefaultDescription(this, og);
return {obj};
} | movq %rdi, %rax
movq (%rcx), %rdi
movq %rsi, 0x48(%rdi)
movq %rdx, 0x50(%rdi)
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
testq %rcx, %rcx
je 0x12baa5
movq 0xc44e8(%rip), %rdx # 0x1eff80
cmpb $0x0, (%rdx)
je 0x12baa1
incl 0x8(%rcx)
retq
lock
incl 0x8(%rcx)
retq
| /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::readObject(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, QPDFObjGen) | QPDFObjectHandle
QPDF::readObject(std::string const& description, QPDFObjGen og)
{
setLastObjectDescription(description, og);
qpdf_offset_t offset = m->file->tell();
StringDecrypter decrypter{this, og};
StringDecrypter* decrypter_ptr = m->encp->encrypted ? &decrypter : nullptr;
auto [object, empty]... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rcx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x12baa6
movq (%r14), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, %r12
leaq 0x1... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::readStream(QPDFObjectHandle&, QPDFObjGen, long long) | void
QPDF::readStream(QPDFObjectHandle& object, QPDFObjGen og, qpdf_offset_t offset)
{
validateStreamLineEnd(object, og, offset);
// Must get offset before accessing any additional objects since resolving a previously
// unresolved indirect object will change file position.
qpdf_offset_t stream_offset ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rcx, %r13
movq %rdx, 0x18(%rsp)
movq %rsi, %rbx
movq %rdi, %r15
callq 0x12c6ce
movq (%r15), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq %rax, %r12
leaq 0x40(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x396fb(%r... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::validateStreamLineEnd(QPDFObjectHandle&, QPDFObjGen, long long) | void
QPDF::validateStreamLineEnd(QPDFObjectHandle& object, QPDFObjGen og, qpdf_offset_t offset)
{
// The PDF specification states that the word "stream" should be followed by either a carriage
// return and a newline or by a newline alone. It specifically disallowed following it by a
// carriage return alo... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq 0xb0(%rax), %rdi
movq (%rdi), %rax
leaq 0x7(%rsp), %rsi
movl $0x1, %edx
callq *0x38(%rax)
testq %rax, %rax
je 0x12c7d0
leaq 0x8(%rsp), %r12
leaq 0x28(%rsp), %r13
leaq 0x7(%rsp), %rbp
leaq 0x51cb5(%r... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::recoverStreamLength(std::shared_ptr<InputSource>, QPDFObjGen, long long) | size_t
QPDF::recoverStreamLength(
std::shared_ptr<InputSource> input, QPDFObjGen og, qpdf_offset_t stream_offset)
{
// Try to reconstruct stream length by looking for endstream or endobj
warn(damagedPDF(*input, stream_offset, "attempting to recover stream length"));
PatternFinder ef(*this, &QPDF::findE... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movq %rcx, %r12
movq %rdx, 0x30(%rsp)
movq %rsi, %r13
movq %rdi, %rbx
movq (%rsi), %r15
leaq 0x68(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x52485(%rip), %rsi # 0x17ee13
leaq 0x524a1(%rip), %rdx # 0x17ee3... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::readObjectInStream(qpdf::is::OffsetBuffer&, int, int) | QPDFObjectHandle
QPDF::readObjectInStream(is::OffsetBuffer& input, int stream_id, int obj_id)
{
auto [object, empty] = QPDFParser::parse(input, stream_id, obj_id, m->tokenizer, *this);
if (empty) {
// Nothing in the PDF spec appears to allow empty objects, but they have been encountered in
// ac... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp # imm = 0x1C8
movl %r8d, %r12d
movl %ecx, %r13d
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbp
movq (%rsi), %r8
addq $0x18, %r8
leaq 0x130(%rsp), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
movl %ecx, %edx
movl %r12d, %ecx
movq %r1... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::findEndstream() | bool
QPDF::findEndstream()
{
// Find endstream or endobj. Position the input at that token.
auto t = readToken(*m->file, 20);
if (t.isWord("endobj") || t.isWord("endstream")) {
m->file->seek(m->file->getLastOffset(), SEEK_SET);
return true;
}
return false;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %rbx
movq (%rdi), %rcx
movq 0xb0(%rcx), %rdx
leaq 0x18(%rcx), %rsi
addq $0xc0, %rcx
leaq 0x40(%rsp), %rdi
movl $0x14, %r9d
movl $0x1, %r8d
callq 0xe2c1a
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x51624(%rip), %rsi # 0x17ecff
leaq 0x516... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::updateCache(QPDFObjGen, std::shared_ptr<QPDFObject> const&, long long, long long, bool) | void
QPDF::updateCache(
QPDFObjGen og,
std::shared_ptr<QPDFObject> const& object,
qpdf_offset_t end_before_space,
qpdf_offset_t end_after_space,
bool destroy)
{
object->setObjGen(this, og);
if (isCached(og)) {
auto& cache = m->obj_cache[og];
object->move_to(cache.object, dest... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rdi, %r15
movq %rsi, 0x8(%rsp)
movq (%rdx), %rax
movq %rdi, 0x48(%rax)
movq %rsi, 0x50(%rax)
leaq 0x10(%rsp), %rax
movq %rsi, (%rax)
movq (%rdi), %r13
leaq 0x1a8(%r13),... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::nextObjGen() | QPDFObjGen
QPDF::nextObjGen()
{
int max_objid = toI(getObjectCount());
if (max_objid == std::numeric_limits<int>::max()) {
throw std::range_error("max object id is too high to create new objects");
}
return QPDFObjGen(max_objid + 1, 0);
} | pushq %r14
pushq %rbx
pushq %rax
callq 0x12b94a
movq %rax, %rbx
testq $-0x80000000, %rax # imm = 0x80000000
je 0x130070
movq %rbx, %rdi
callq 0x62582
cmpl $0x7fffffff, %ebx # imm = 0x7FFFFFFF
je 0x130083
leal 0x1(%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x193f0
movq %rax, %... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::makeIndirectFromQPDFObject(std::shared_ptr<QPDFObject> const&) | QPDFObjectHandle
QPDF::makeIndirectFromQPDFObject(std::shared_ptr<QPDFObject> const& obj)
{
QPDFObjGen next{nextObjGen()};
m->obj_cache[next] = ObjCache(obj, -1, -1);
return newIndirect(next, m->obj_cache[next].object);
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x130054
movq %rax, 0x8(%rsp)
movq (%r15), %r13
movq 0x8(%r15), %r15
testq %r15, %r15
je 0x13010e
movq 0xbfe82(%rip), %rax # 0x1eff80
cmpb $0x0, (%rax)
je 0x130109
incl 0x8(%... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::getObjectForJSON(int, int) | std::shared_ptr<QPDFObject>
QPDF::getObjectForJSON(int id, int gen)
{
auto og = QPDFObjGen(id, gen);
auto [it, inserted] = m->obj_cache.try_emplace(og);
auto& obj = it->second.object;
if (inserted) {
obj = (m->parsed && !m->xref_table.count(og))
? QPDFObject::create<QPDF_Null>(this, ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
movl %edx, (%rsi)
movl %ecx, 0x4(%rsi)
movl $0x1a8, %edi # imm = 0x1A8
addq (%r15), %rdi
callq 0x130dac
movq %rax, %r14
testb $0x1, %dl
je 0x13055e
movq (%r15), %r12
cmpb $0x1, 0x2d4(%... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QPDF::swapObjects(QPDFObjGen, QPDFObjGen) | void
QPDF::swapObjects(QPDFObjGen og1, QPDFObjGen og2)
{
// Force objects to be read from the input source if needed, then swap them in the cache.
resolve(og1);
resolve(og2);
m->obj_cache[og1].object->swapWith(m->obj_cache[og2].object);
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x18(%rsp), %r15
movq %rsi, (%r15)
leaq 0x10(%rsp), %r12
movq %rdx, (%r12)
callq 0x12afc6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x12afc6
movl $0x1a8, %r13d # imm = 0x1A8
movq (%r14), %rdi
addq %r13, %r... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
qpdf::is::OffsetBuffer::OffsetBuffer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, Buffer*, long long) | OffsetBuffer(std::string const& description, Buffer* buf, qpdf_offset_t global_offset) :
proxied(description, buf),
global_offset(global_offset)
{
if (global_offset < 0) {
throw std::logic_error("is::OffsetBuffer constructed with negative offset");
... | pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdi, %r15
xorl %eax, %eax
movq %rax, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%rdi)
movq %rax, 0xa0(%rdi)
leaq 0xbdf3f(%rip), %rax # 0x1eeba8
movq %rax, (%rdi)
leaq 0xa8(%rdi), %rbx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x1df7c
movq %r14, 0x190(%r15)
tes... | /jberkenbilt[P]qpdf/libqpdf/qpdf/InputSource_private.hh |
QPDFObject::move_to(std::shared_ptr<QPDFObject>&, bool) | void
move_to(std::shared_ptr<QPDFObject>& o, bool destroy)
{
o->value = std::move(value);
o->qpdf = qpdf;
o->og = og;
o->object_description = object_description;
o->parsed_offset = parsed_offset;
if (!destroy) {
value = QPDF_Reference(o);
}
... | pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsp, %rdi
movq %rax, (%rdi)
movsbq 0x30(%rbx), %rax
leaq 0xbdef1(%rip), %rcx # 0x1eec08
movq %rbx, %rsi
callq *0x8(%rcx,%rax,8)
movq 0x48(%rbx), %rax
movq (%r14), %rcx
movq %rax, 0x48(%rcx)
movq... | /jberkenbilt[P]qpdf/libqpdf/qpdf/QPDFObject_private.hh |
QPDFObject::assign_null() | void
assign_null()
{
value = QPDF_Null();
qpdf = nullptr;
og = QPDFObjGen();
object_description = nullptr;
parsed_offset = -1;
} | pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xf(%rsp), %rsi
callq 0x132a92
xorps %xmm0, %xmm0
movq 0x40(%rbx), %rdi
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x48(%rbx)
testq %rdi, %rdi
je 0x130eff
callq 0x1d0e8
movq $-0x1, 0x58(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
| /jberkenbilt[P]qpdf/libqpdf/qpdf/QPDFObject_private.hh |
QPDFObject::swapWith(std::shared_ptr<QPDFObject>) | void
swapWith(std::shared_ptr<QPDFObject> o)
{
std::swap(value, o->value);
std::swap(qpdf, o->qpdf);
std::swap(object_description, o->object_description);
std::swap(parsed_offset, o->parsed_offset);
} | pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rsi
callq 0x132ade
movq (%rbx), %rax
movq 0x48(%r14), %rcx
movq 0x48(%rax), %rdx
movq %rdx, 0x48(%r14)
movq %rcx, 0x48(%rax)
movq (%rbx), %rax
movq 0x38(%r14), %rcx
movq 0x38(%rax), %rdx
movq %rdx, 0x38(%r14)
movq %rcx, 0x38(%rax)
movq 0x40(... | /jberkenbilt[P]qpdf/libqpdf/qpdf/QPDFObject_private.hh |
std::vector<bool, std::allocator<bool>> QPDF::getCompressibleObjGens<bool>() | std::vector<T>
QPDF::getCompressibleObjGens()
{
// Return a list of objects that are allowed to be in object streams. Walk through the objects
// by traversing the document from the root, including a traversal of the pages tree. This
// makes that objects that are on the same page are more likely to be in... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rdi, %r15
movq %rsi, 0x28(%rsp)
movq (%rsi), %rbx
leaq 0xc0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x48b7d(%rip), %rsi # 0x17a4b2
leaq 0x48b7e(%rip), %rdx # 0x17a4ba
leaq 0xb0(%rsp), %rdi
callq 0x... | /jberkenbilt[P]qpdf/libqpdf/QPDF_objects.cc |
QIntC::IntConverter<long, int, true, true>::error(long) | static void
error(From i)
{
std::ostringstream msg;
msg.imbue(std::locale::classic());
msg << "integer out of range converting " << i << " from a " << sizeof(From)
<< "-byte signed type to a " << sizeof(To) << "-byte signed type";
throw std... | pushq %rbp
pushq %r14
pushq %rbx
subq $0x1a0, %rsp # imm = 0x1A0
movq %rdi, %rbx
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x19b00
movq (%r14), %rax
movq -0x18(%rax), %r14
callq 0x19130
leaq (%rsp,%r14), %rsi
addq $0x28, %rsi
movq %rsp, %rdi
movq %rax, %rdx
callq 0x195d0
movq %rsp, %rdi
callq 0x19b50
leaq ... | /jberkenbilt[P]qpdf/include/qpdf/QIntC.hh |
QPDF::ObjUser::ObjUser(QPDF::ObjUser::user_e) | QPDF::ObjUser::ObjUser(user_e type) :
ou_type(type)
{
qpdf_assert_debug(type == ou_root);
} | movl %esi, (%rdi)
movl $0x0, 0x4(%rdi)
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
movq $0x0, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
cmpl $0x5, %esi
jne 0x1351c7
retq
pushq %rax
leaq 0x4a09b(%rip), %rdi # 0x17f26a
leaq 0x4a0a4(%rip), %rsi # 0x17f27a
leaq 0x4a106(%rip), %rcx # 0x17f2e3
movl $0xf, %edx
callq 0x191d0... | /jberkenbilt[P]qpdf/libqpdf/QPDF_optimization.cc |
QPDF::ObjUser::ObjUser(QPDF::ObjUser::user_e, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | QPDF::ObjUser::ObjUser(user_e type, std::string const& key) :
ou_type(type),
key(key)
{
qpdf_assert_debug((type == ou_trailer_key) || (type == ou_root_key));
} | pushq %rbx
movl %esi, %ebx
movl %esi, (%rdi)
movl $0x0, 0x4(%rdi)
leaq 0x8(%rdi), %rax
leaq 0x18(%rdi), %rcx
movq %rcx, 0x8(%rdi)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
movq %rax, %rdi
callq 0x1e55e
addl $-0x3, %ebx
cmpl $0x2, %ebx
jae 0x13525e
popq %rbx
retq
leaq 0x4a0e9(%rip), %rdi # 0x17f34e
leaq... | /jberkenbilt[P]qpdf/libqpdf/QPDF_optimization.cc |
QPDF::ObjUser::operator<(QPDF::ObjUser const&) const | bool
QPDF::ObjUser::operator<(ObjUser const& rhs) const
{
if (ou_type < rhs.ou_type) {
return true;
}
if (ou_type == rhs.ou_type) {
if (pageno < rhs.pageno) {
return true;
}
if (pageno == rhs.pageno) {
return key < rhs.key;
}
}
return f... | pushq %rax
movl (%rdi), %ecx
movl (%rsi), %edx
movb $0x1, %al
cmpl %edx, %ecx
jl 0x1352ab
jne 0x1352a9
movl 0x4(%rdi), %ecx
movl 0x4(%rsi), %edx
cmpl %edx, %ecx
jl 0x1352ab
jne 0x1352a9
addq $0x8, %rdi
addq $0x8, %rsi
callq 0x190c0
shrl $0x1f, %eax
jmp 0x1352ab
xorl %eax, %eax
popq %rcx
retq
movq %rax, %rdi
callq 0x1d0... | /jberkenbilt[P]qpdf/libqpdf/QPDF_optimization.cc |
QPDF::optimize(std::map<int, int, std::less<int>, std::allocator<std::pair<int const, int>>> const&, bool, std::function<int (QPDFObjectHandle&)>) | void
QPDF::optimize(
std::map<int, int> const& object_stream_data,
bool allow_changes,
std::function<int(QPDFObjectHandle&)> skip_stream_parameters)
{
optimize_internal(object_stream_data, allow_changes, skip_stream_parameters);
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %rcx, %rsi
callq 0xf5d66
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
movq %r12, %rcx
callq 0x136c84
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x135332
leaq 0x8(%rsp)... | /jberkenbilt[P]qpdf/libqpdf/QPDF_optimization.cc |
QPDF::pushInheritedAttributesToPage(bool, bool) | void
QPDF::pushInheritedAttributesToPage(bool allow_changes, bool warn_skipped_keys)
{
// Traverse pages tree pushing all inherited resources down to the page level.
// The record of whether we've done this is cleared by updateAllPagesCache(). If we're warning
// for skipped keys, re-traverse unconditiona... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movl %edx, %ebp
movq (%rdi), %rax
movb 0x268(%rax), %al
xorb $0x1, %al
orb %bpl, %al
cmpb $0x1, %al
jne 0x13553b
movl %esi, %r14d
movq %rdi, %rbx
callq 0x139704
leaq 0x68(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax,... | /jberkenbilt[P]qpdf/libqpdf/QPDF_optimization.cc |
QPDF::pushInheritedAttributesToPageInternal(QPDFObjectHandle, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<QPDFObjectHandle, std::allocator<QPDFObjectHandle>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocato... | void
QPDF::pushInheritedAttributesToPageInternal(
QPDFObjectHandle cur_pages,
std::map<std::string, std::vector<QPDFObjectHandle>>& key_ancestors,
bool allow_changes,
bool warn_skipped_keys)
{
// Make a list of inheritable keys. Only the keys /MediaBox, /CropBox, /Resources, and /Rotate
// are i... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movl %r8d, %r15d
movl %ecx, 0xc(%rsp)
movq %rdx, (%rsp)
movq %rsi, %r12
movq %rdi, 0x40(%rsp)
leaq 0x100(%rsp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%... | /jberkenbilt[P]qpdf/libqpdf/QPDF_optimization.cc |
QPDF::updateObjectMaps(QPDF::ObjUser const&, QPDFObjectHandle, std::function<int (QPDFObjectHandle&)>) | void
QPDF::updateObjectMaps(
ObjUser const& first_ou,
QPDFObjectHandle first_oh,
std::function<int(QPDFObjectHandle&)> skip_stream_parameters)
{
QPDFObjGen::set visited;
std::vector<UpdateObjectMapsFrame> pending;
pending.emplace_back(first_ou, first_oh, true);
// Traverse the object tree fr... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, 0xa8(%rsp)
movq %rdi, %r12
leaq 0xc0(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0x80(%rsp), %rdi
movq %rcx, 0x10(%rdi)
xorps %xmm0,... | /jberkenbilt[P]qpdf/libqpdf/QPDF_optimization.cc |
QPDF::updateAllPagesCache() | void
QPDF::updateAllPagesCache()
{
// Force regeneration of the pages cache. We force immediate recalculation of all_pages since
// users may have references to it that they got from calls to getAllPages(). We can defer
// recalculation of pageobj_to_pages_pos until needed.
QTC::TC("qpdf", "QPDF updat... | pushq %rbx
movq %rdi, %rbx
movl $0x218, %edi # imm = 0x218
addq (%rbx), %rdi
callq 0x3e73c
movl $0x238, %edi # imm = 0x238
addq (%rbx), %rdi
callq 0x13c3fa
movq (%rbx), %rax
movb $0x0, 0x268(%rax)
movq %rbx, %rdi
popq %rbx
jmp 0x139704
nop
| /jberkenbilt[P]qpdf/libqpdf/QPDF_pages.cc |
QPDF::insertPageobjToPage(QPDFObjectHandle const&, int, bool) | void
QPDF::insertPageobjToPage(QPDFObjectHandle const& obj, int pos, bool check_duplicate)
{
QPDFObjGen og(obj.getObjGen());
if (check_duplicate) {
if (!m->pageobj_to_pages_pos.insert(std::make_pair(og, pos)).second) {
// The library never calls insertPageobjToPage in a way that causes this ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movl %ecx, %r15d
movl %edx, %ebp
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xc45d4
movq %rax, 0x28(%rsp)
movl $0x238, %edi # imm = 0x238
addq (%rbx), %rdi
testl %r15d, %r15d
je 0x13b41b
movq %rax, %r14
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
... | /jberkenbilt[P]qpdf/libqpdf/QPDF_pages.cc |
QPDF::insertPage(QPDFObjectHandle, int) | void
QPDF::insertPage(QPDFObjectHandle newpage, int pos)
{
// pos is numbered from 0, so pos = 0 inserts at the beginning and pos = npages adds to the end.
flattenPagesTree();
if (!newpage.isIndirect()) {
QTC::TC("qpdf", "QPDF insert non-indirect page");
newpage = makeIndirectObject(newpag... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
callq 0x13aea0
movq %rbx, %rdi
callq 0xc364e
testb %al, %al
movq %rbx, 0x20(%rsp)
je 0x13b683
movq %rbx, %rdi
callq 0xc5284
cmpq %r15, %rax
je 0x13b743
movq %r14, %rbx
leaq 0x10(%rsp), %r1... | /jberkenbilt[P]qpdf/libqpdf/QPDF_pages.cc |
QPDF::addPageAt(QPDFObjectHandle, bool, QPDFObjectHandle) | void
QPDF::addPageAt(QPDFObjectHandle newpage, bool before, QPDFObjectHandle refpage)
{
int refpos = findPage(refpage);
if (!before) {
++refpos;
}
insertPage(newpage, refpos);
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq %rcx, %rdi
callq 0xc45d4
movq %rbx, %rdi
movq %rax, %rsi
callq 0x13c1b6
xorb $0x1, %bpl
movzbl %bpl, %edx
addl %eax, %edx
movq (%r14), %rax
movq %rax, (%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
... | /jberkenbilt[P]qpdf/libqpdf/QPDF_pages.cc |
QPDF::addPage(QPDFObjectHandle, bool) | void
QPDF::addPage(QPDFObjectHandle newpage, bool first)
{
if (first) {
insertPage(newpage, 0);
} else {
insertPage(newpage, getRoot().getKey("/Pages").getKey("/Count").getIntValueAsInt());
}
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
testl %edx, %edx
je 0x13bfcc
movq %rax, 0x10(%rsp)
movq 0x8(%rsi), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x13bff3
movq 0xb3fbe(%rip), %rcx # 0x1eff80
cmpb $0x0, (%rcx)
je 0x13bfef
incl 0x8(%rax)
jmp 0x13bff3
movq %rax, (%rs... | /jberkenbilt[P]qpdf/libqpdf/QPDF_pages.cc |
QUtil::double_to_string[abi:cxx11](double, int, bool) | std::string
QUtil::double_to_string(double num, int decimal_places, bool trim_trailing_zeroes)
{
// Backward compatibility -- this code used to use sprintf and treated decimal_places <= 0 to
// mean to use the default, which was six decimal places. Starting in 10.2, we trim trailing
// zeroes by default.
... | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x188, %rsp # imm = 0x188
movl %edx, %ebp
movsd %xmm0, (%rsp)
movq %rdi, %rbx
testl %esi, %esi
movl $0x6, %r15d
cmovgl %esi, %r15d
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x19b00
movq (%r14), %rax
movq -0x18(%rax), %r14
callq 0x19130
leaq (%rsp,%r14), %rs... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::string_to_ll(char const*) | long long
QUtil::string_to_ll(char const* str)
{
errno = 0;
#ifdef _MSC_VER
long long result = _strtoi64(str, 0, 10);
#else
long long result = strtoll(str, nullptr, 10);
#endif
if (errno == ERANGE) {
throw std::range_error(
std::string("overflow/underflow converting ") + str + " to 6... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
callq 0x19ba0
movq %rax, %rbx
movl $0x0, (%rax)
movq %r14, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x19870
cmpl $0x22, (%rbx)
je 0x13d993
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
ret... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::string_to_ull(char const*) | unsigned long long
QUtil::string_to_ull(char const* str)
{
char const* p = str;
while (*p && util::is_space(*p)) {
++p;
}
if (*p == '-') {
throw std::runtime_error(
std::string("underflow converting ") + str + " to 64-bit unsigned integer");
}
errno = 0;
#ifdef _MSC_... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
movq %rdi, %rax
movzbl (%rax), %ecx
leal -0x9(%rcx), %edx
cmpl $0x5, %edx
jae 0x13db5b
incq %rax
jmp 0x13db4b
cmpl $0x20, %ecx
je 0x13db56
cmpl $0x2d, %ecx
je 0x13db9a
callq 0x19ba0
movq %rax, %rbx
movl $0x0, (%rax)
movq ... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::is_long_long(char const*) | bool
QUtil::is_long_long(char const* str)
{
try {
auto i1 = string_to_ll(str);
std::string s1 = int_to_string(i1);
return str == s1;
} catch (std::exception&) {
// overflow or other error
}
return false;
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
callq 0x13d951
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0x13d121
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x19a80
testl %eax, %eax
sete %bl
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x13de9c
movq ... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::safe_fopen(char const*, char const*) | FILE*
QUtil::safe_fopen(char const* filename, char const* mode)
{
FILE* f = nullptr;
#ifdef _WIN32
std::shared_ptr<wchar_t> wfilenamep = win_convert_filename(filename);
wchar_t* wfilename = wfilenamep.get();
auto wmodep = QUtil::make_shared_array<wchar_t>(strlen(mode) + 1);
wchar_t* wmode = wmodep.g... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x427d1(%rip), %rsi # 0x18071b
leaq 0x427cf(%rip), %rdx # 0x180720
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x1ee2c
movq %r15, %rdi
movq %r14, %rsi
callq 0x19730
leaq... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::seek(_IO_FILE*, long long, int) | int
QUtil::seek(FILE* stream, qpdf_offset_t offset, int whence)
{
#if HAVE_FSEEKO
return fseeko(stream, QIntC::IntConverter<qpdf_offset_t, off_t>::convert(offset), whence);
#elif HAVE_FSEEKO64
return fseeko64(stream, offset, whence);
#else
# if defined _MSC_VER || defined __BORLANDC__
return _fseeki64(strea... | jmp 0x196a0
| /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::remove_file(char const*) | void
QUtil::remove_file(char const* path)
{
#ifdef _WIN32
std::shared_ptr<wchar_t> wpath = win_convert_filename(path);
os_wrapper(std::string("remove ") + path, _wunlink(wpath.get()));
#else
os_wrapper(std::string("remove ") + path, unlink(path));
#endif
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x4260d(%rip), %rsi # 0x180721
leaq 0x4260d(%rip), %rdx # 0x180728
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x1ee2c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x19730
leaq 0x10(%rsp), %r14
movq %r14... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::rename_file(char const*, char const*) | void
QUtil::rename_file(char const* oldname, char const* newname)
{
#ifdef _WIN32
try {
remove_file(newname);
} catch (QPDFSystemError&) {
// ignore
}
std::shared_ptr<wchar_t> wold = win_convert_filename(oldname);
std::shared_ptr<wchar_t> wnew = win_convert_filename(newname);
os_... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x42500(%rip), %rsi # 0x180729
leaq 0x42500(%rip), %rdx # 0x180730
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0x1ee2c
movq %r15, %rdi
movq %r14, %... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::pipe_file(char const*, Pipeline*) | void
QUtil::pipe_file(char const* filename, Pipeline* p)
{
// Exercised in test suite by testing file_provider.
FILE* f = safe_fopen(filename, "rb");
FileCloser fc(f);
size_t len = 0;
int constexpr size = 8192;
unsigned char buf[size];
while ((len = fread(buf, 1, size, f)) > 0) {
p->... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2048, %rsp # imm = 0x2048
movq %rsi, %r14
movq %rdi, %r15
leaq 0x1f051(%rip), %rsi # 0x15d4a4
callq 0x13df28
movq %rax, %rbx
leaq 0x40(%rsp), %r12
movl $0x1, %esi
movl $0x2000, %edx # imm = 0x2000
movq %r12, %rdi
movq %rbx... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::file_provider(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | std::function<void(Pipeline*)>
QUtil::file_provider(std::string const& filename)
{
return [filename](Pipeline* p) { pipe_file(filename.c_str(), p); };
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rsp, %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x1e55e
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq ... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::make_shared_cstr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | std::shared_ptr<char>
QUtil::make_shared_cstr(std::string const& str)
{
auto result = QUtil::make_shared_array<char>(str.length() + 1);
// Use memcpy in case string contains nulls
result.get()[str.length()] = '\0';
memcpy(result.get(), str.c_str(), str.length());
return result;
} | pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rdi
incq %rdi
callq 0x194e0
movq %rax, (%r14)
leaq 0x8(%r14), %rdi
movq %rax, %rsi
callq 0x1462e4
movq (%r14), %rax
movq 0x8(%rbx), %rcx
movb $0x0, (%rax,%rcx)
movq (%r14), %rdi
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x19080
movq %r... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::make_unique_cstr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | std::unique_ptr<char[]>
QUtil::make_unique_cstr(std::string const& str)
{
auto result = std::make_unique<char[]>(str.length() + 1);
// Use memcpy in case string contains nulls
result.get()[str.length()] = '\0';
memcpy(result.get(), str.c_str(), str.length());
return result;
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %r15
leaq 0x1(%r15), %r12
movq %r12, %rdi
callq 0x194e0
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x19330
movq %r13, (%r14)
movb $0x0, (%r13,%r15)
movq (%rbx), %rsi
movq %r13, %rdi
movq %r1... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::hex_encode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | std::string
QUtil::hex_encode(std::string const& input)
{
static auto constexpr hexchars = "0123456789abcdef";
std::string result;
result.reserve(2 * input.length());
for (const char c: input) {
result += hexchars[static_cast<unsigned char>(c) >> 4];
result += hexchars[c & 0x0f];
}
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rsi
addq %rsi, %rsi
callq 0x19950
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x13e8e6
movq (%r1... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::hex_decode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | std::string
QUtil::hex_decode(std::string const& input)
{
std::string result;
// We know result.size() <= 0.5 * input.size() + 1. However, reserving string space for this
// upper bound has a negative impact.
bool first = true;
char decoded;
for (auto ch: input) {
ch = util::hex_decode_c... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %r14
testq %r14, %r14
je 0x13e9b3
movq (%rsi), %r12
movb $0x1, %r15b
xorl %r13d, %r13d
movb (%r12,%r13), %cl
l... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::getWhoami(char*) | char*
QUtil::getWhoami(char* argv0)
{
char* whoami = nullptr;
if (((whoami = strrchr(argv0, '/')) == nullptr) &&
((whoami = strrchr(argv0, '\\')) == nullptr)) {
whoami = argv0;
} else {
++whoami;
}
if ((strlen(whoami) > 4) && (strcmp(whoami + strlen(whoami) - 4, ".exe") == 0... | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2f, %esi
callq 0x19ae0
testq %rax, %rax
jne 0x13ea22
movq %rbx, %rdi
movl $0x5c, %esi
callq 0x19ae0
testq %rax, %rax
je 0x13ea28
movq %rax, %rbx
incq %rbx
movq %rbx, %rdi
callq 0x19420
cmpq $0x5, %rax
jb 0x13ea57
movq %rax, %r14
leaq (%rbx,%rax), %rdi
addq $-0x4,... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::get_env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*) | bool
QUtil::get_env(std::string const& var, std::string* value)
{
// This was basically ripped out of wxWindows.
#ifdef _WIN32
# ifdef NO_GET_ENVIRONMENT
return false;
# else
// first get the size of the buffer
DWORD len = ::GetEnvironmentVariable(var.c_str(), NULL, 0);
if (len == 0) {
// th... | pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq (%rdi), %rdi
callq 0x19830
movq %rax, %rbx
testq %rax, %rax
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x13eaa4
movq 0x8(%r14), %r15
movq %rbx, %rdi
callq 0x19420
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x19580
t... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::get_current_time() | time_t
QUtil::get_current_time()
{
#ifdef _WIN32
// The procedure to get local time at this resolution comes from
// the Microsoft documentation. It says to convert a SYSTEMTIME
// to a FILETIME, and to copy the FILETIME to a ULARGE_INTEGER.
// The resulting number is the number of 100-nanosecond inter... | xorl %edi, %edi
jmp 0x197f0
| /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::qpdf_time_to_pdf_time[abi:cxx11](QUtil::QPDFTime const&) | std::string
QUtil::qpdf_time_to_pdf_time(QPDFTime const& qtm)
{
std::string tz_offset;
int t = qtm.tz_delta;
if (t == 0) {
tz_offset = "Z";
} else {
if (t < 0) {
t = -t;
tz_offset += "+";
} else {
tz_offset += "-";
}
tz_offset +... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp # imm = 0x1A8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl 0x18(%rsi), %ebp
testl %ebp, %ebp
je 0x13eb90
js 0x13ebb3
leaq 0x22c21(%rip), %rsi # ... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::qpdf_time_to_iso8601[abi:cxx11](QUtil::QPDFTime const&) | std::string
QUtil::qpdf_time_to_iso8601(QPDFTime const& qtm)
{
std::string tz_offset;
int t = qtm.tz_delta;
if (t == 0) {
tz_offset = "Z";
} else {
if (t < 0) {
t = -t;
tz_offset += "+";
} else {
tz_offset += "-";
}
tz_offset +=... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x158(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movl 0x18(%rsi), %ebp
testl %ebp, %ebp
je 0x13f78f
js 0x13f7b2
leaq 0x22022(%rip), %rsi #... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::pdf_time_to_qpdf_time(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, QUtil::QPDFTime*) | bool
QUtil::pdf_time_to_qpdf_time(std::string const& str, QPDFTime* qtm)
{
static std::regex pdf_date(
"^D:([0-9]{4})([0-9]{2})([0-9]{2})"
"([0-9]{2})([0-9]{2})([0-9]{2})"
"(?:(Z?)|([\\+\\-])([0-9]{2})'([0-9]{2})')$");
std::smatch m;
if (!std::regex_match(str, m, pdf_date)) {
... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb 0xb0fd5(%rip), %al # 0x1f1550
testb %al, %al
je 0x140b69
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
addq %rdi, %rsi
le... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::pdf_time_to_iso8601(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | bool
QUtil::pdf_time_to_iso8601(std::string const& pdf_time, std::string& iso8601)
{
QPDFTime qtm;
if (pdf_time_to_qpdf_time(pdf_time, &qtm)) {
iso8601 = qpdf_time_to_iso8601(qtm);
return true;
}
return false;
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
leaq 0x24(%rsp), %rsi
callq 0x14055e
movl %eax, %ebx
testb %al, %al
je 0x140d44
movq %rsp, %r15
leaq 0x24(%rsp), %rsi
movq %r15, %rdi
callq 0x13f740
movq %r14, %rdi
movq %r15, %rsi
callq 0x195c0
movq (%r15), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je ... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::toUTF8[abi:cxx11](unsigned long) | std::string
QUtil::toUTF8(unsigned long uval)
{
std::string result;
// A UTF-8 encoding of a Unicode value is a single byte for Unicode values <= 127. For larger
// values, the first byte of the UTF-8 encoding has '1' as each of its n highest bits and '0'
// for its (n+1)th highest bit where n is the ... | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rax
shrq $0x1f, %rax
jne 0x140e24
cmpq $0x7f, %rsi
ja 0x140d8f
movsbl %sil, %esi
movq %rbx, %rdi
callq 0x19d90
jmp 0x140de1
leaq 0x6(%rsp), %rax
movb $0x0... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::toUTF16[abi:cxx11](unsigned long) | std::string
QUtil::toUTF16(unsigned long uval)
{
std::string result;
if ((uval >= 0xd800) && (uval <= 0xdfff)) {
result = "\xff\xfd";
} else if (uval <= 0xffff) {
char out[2];
out[0] = static_cast<char>((uval & 0xff00) >> 8);
out[1] = static_cast<char>(uval & 0xff);
r... | pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rax
andq $-0x800, %rax # imm = 0xF800
cmpq $0xd800, %rax # imm = 0xD800
jne 0x140ed4
leaq 0x3f936(%rip), %rcx # 0x1807f3
movl $0x2, %r8... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::read_file_into_string[abi:cxx11](char const*) | std::string
QUtil::read_file_into_string(char const* filename)
{
FILE* f = safe_fopen(filename, "rb");
FileCloser fc(f);
return read_file_into_string(f, filename);
} | pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x1be07(%rip), %rsi # 0x15d4a4
movq %r15, %rdi
callq 0x13df28
movq %rax, %r14
movq %r15, %rdi
callq 0x19420
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq %r15, %rcx
callq 0x1416ef
testq %r14, %r14
je 0x1416ce
movq %r14, %rdi
callq 0x19460
... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::read_file_into_string[abi:cxx11](_IO_FILE*, std::basic_string_view<char, std::char_traits<char>>) | std::string
QUtil::read_file_into_string(FILE* f, std::string_view filename)
{
fseek(f, 0, SEEK_END);
auto o_size = QUtil::tell(f);
if (o_size >= 0) {
// Seekable file
auto size = QIntC::to_size(o_size);
fseek(f, 0, SEEK_SET);
std::string result(size, '\0');
if (auto ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp # imm = 0x138
movq %rcx, 0x68(%rsp)
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x19da0
movq %r14, %rdi
callq 0x198d0
testq %rax, %rax
js 0x14183d
movq %rax, %r15
movq... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::read_lines_from_file[abi:cxx11](std::istream&, bool) | std::list<std::string>
QUtil::read_lines_from_file(std::istream& in, bool preserve_eol)
{
std::list<std::string> lines;
auto next_char = [&in](char& ch) { return (in.get(ch)) ? true : false; };
read_lines_from_file(next_char, lines, preserve_eol);
return lines;
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
leaq 0x8(%rsp), %rdi
movq %rax, 0x8(%rdi)
movq %rsi, (%rdi)
leaq 0x3491(%rip), %rax # 0x145632
movq %rax, 0x18(%rdi)
leaq 0x34a0(%rip), %rax # 0x14564c
movq %rax, 0x10(%rdi)
movq... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::read_lines_from_file[abi:cxx11](_IO_FILE*, bool) | std::list<std::string>
QUtil::read_lines_from_file(FILE* f, bool preserve_eol)
{
std::list<std::string> lines;
auto next_char = [&f](char& ch) { return read_char_from_FILE(ch, f); };
read_lines_from_file(next_char, lines, preserve_eol);
return lines;
} | pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rax
movq %rsi, (%rax)
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rsp, %rdi
movq %rcx, 0x8(%rdi)
movq %rax, (%rdi)
leaq 0x3430(%rip), %rax # 0x145672
movq %rax, 0x18(%rdi)
leaq 0x3437(%rip), %rax # ... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::str_compare_nocase(char const*, char const*) | int
QUtil::str_compare_nocase(char const* s1, char const* s2)
{
#if defined(_WIN32) && defined(__BORLANDC__)
return stricmp(s1, s2);
#elif defined(_WIN32)
return _stricmp(s1, s2);
#else
return strcasecmp(s1, s2);
#endif
} | jmp 0x19910
| /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::parse_numrange(char const*, int) | std::vector<int>
QUtil::parse_numrange(char const* range, int max)
{
// Performance note: this implementation aims to be straightforward, not efficient. Numeric
// range parsing is used only during argument processing. It is not used during processing of
// PDF files.
static std::regex group_re(R"((x)?... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp # imm = 0x148
movq %rsi, %rbx
movq %rdi, 0xf0(%rsp)
movl %edx, 0xec(%rsp)
movb 0xaf29b(%rip), %al # 0x1f1578
testb %al, %al
je 0x142b02
leaq 0xec(%rsp), %rax
movq %rax, 0x100(%rsp)
movq %rbx, %rdi
callq 0x19420
movq %rax... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
transcode_utf8(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, encoding_e, char) | static bool
transcode_utf8(std::string const& utf8_val, std::string& result, encoding_e encoding, char unknown)
{
bool okay = true;
result.clear();
size_t len = utf8_val.length();
switch (encoding) {
case e_utf16:
result += "\xfe\xff";
break;
case e_pdfdoc:
// We need to ... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, 0x8(%rsp)
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq $0x0, 0x8(%rsi)
movq (%rsi), %rax
movb $0x0, (%rax)
movq 0x8(%rdi), %r13
cmpl $0x4, %edx
je 0x14371c
testl %ebp, %ebp
jne 0x1437d1
leaq 0x3d22a(%rip), %rsi # 0... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::utf16_to_utf8(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | std::string
QUtil::utf16_to_utf8(std::string const& val)
{
std::string result;
// This code uses unsigned long and unsigned short to hold codepoint values. It requires
// unsigned long to be at least 32 bits and unsigned short to be at least 16 bits, but it will
// work fine if they are larger.
unsi... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %r13
cmpq $0x2, %r13
jb 0x143c8e
movq (%r14), %rcx
movzbl (%rcx), %eax
cmpl $0xfe, %eax
... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::mac_roman_to_utf8(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | std::string
QUtil::mac_roman_to_utf8(std::string const& val)
{
std::string result;
size_t len = val.length();
for (unsigned int i = 0; i < len; ++i) {
unsigned char ch = static_cast<unsigned char>(val.at(i));
unsigned short ch_short = ch;
if (ch >= 128) {
ch_short = mac_r... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %r13
testq %r13, %r13
je 0x143f96
movq %rsi, %r14
movl $0x1, %r12d
leaq 0x18(%rsp), %rbp
xorl %esi, %esi... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::analyze_encoding(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool&, bool&, bool&) | void
QUtil::analyze_encoding(
std::string const& val, bool& has_8bit_chars, bool& is_valid_utf8, bool& is_utf16)
{
has_8bit_chars = is_utf16 = is_valid_utf8 = false;
if (QUtil::is_utf16(val)) {
has_8bit_chars = true;
is_utf16 = true;
return;
}
size_t len = val.length();
s... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r15
xorl %eax, %eax
movb %al, (%rdx)
movb %al, (%rcx)
movq %rsi, 0x10(%rsp)
movb %al, (%rsi)
movq 0x8(%rdi), %rbp
cmpq $0x2, %rbp
jb 0x144174
movq (%r15), %rax
movzbl (%rax), %esi
cmpl $0xfe, %esi
je 0x14418c
cmpl $0xff, %esi... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::possible_repaired_encodings(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | std::vector<std::string>
QUtil::possible_repaired_encodings(std::string supplied)
{
std::vector<std::string> result;
// Always include the original string
result.push_back(supplied);
bool has_8bit_chars = false;
bool is_valid_utf8 = false;
bool is_utf16 = false;
analyze_encoding(supplied, ha... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0x49d9a
xorl %eax, %eax
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
leaq 0xe(%rsp), %rdx
movb %al, (%rdx)
leaq 0xd(%rsp),... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::call_main_from_wmain(int, wchar_t**, std::function<int (int, char**)>) | int
QUtil::call_main_from_wmain(int argc, wchar_t* argv[], std::function<int(int, char*[])> realmain)
{
return ::call_main_from_wmain(true, argc, argv, realmain);
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movq %rsp, %r14
movq %r14, %rdi
movq %rdx, %rsi
callq 0x14580a
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x14474f
movl %eax, %ebx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x144718
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %e... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
call_main_from_wmain(bool, int, wchar_t const* const*, std::function<int (int, char**)>) | static int
call_main_from_wmain(
bool, int argc, wchar_t const* const argv[], std::function<int(int, char*[])> realmain)
{
// argv contains UTF-16-encoded strings with a 16-bit wchar_t. Convert this to UTF-8-encoded
// strings for compatibility with other systems. That way the rest of qpdf.cc can just act l... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, 0x68(%rsp)
movq %rsi, %r14
movl %edi, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
testl %edi, %edi
jns 0x144783
movl %ebp, %edi
callq 0x32796
movslq %ebp, %rsi
leaq 0x20(%rsp), %rdi
callq 0x145d22
te... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::call_main_from_wmain(int, wchar_t const* const*, std::function<int (int, char const* const*)>) | int
QUtil::call_main_from_wmain(
int argc, wchar_t const* const argv[], std::function<int(int, char const* const[])> realmain)
{
return ::call_main_from_wmain(true, argc, argv, [realmain](int new_argc, char* new_argv[]) {
return realmain(new_argc, new_argv);
});
} | pushq %rbp
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x145868
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movl $0x20, %edi
callq 0x19180
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x18(%r... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::hex_encode_char[abi:cxx11](char) | std::string
QUtil::hex_encode_char(char c)
{
return util::hex_encode_char(c);
} | movq %rdi, %rax
movzbl %sil, %ecx
shrl $0x4, %ecx
leaq 0x184bc(%rip), %rdx # 0x15d8b5
movb (%rcx,%rdx), %cl
andl $0xf, %esi
movb (%rsi,%rdx), %dl
leaq 0x10(%rdi), %rsi
movq %rsi, (%rdi)
movb $0x23, 0x10(%rdi)
movb %cl, 0x11(%rdi)
movb %dl, 0x12(%rdi)
movq $0x3, 0x8(%rdi)
movb $0x0, 0x13(%rdi)
retq
| /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
QUtil::is_number(char const*) | bool
QUtil::is_number(char const* p)
{
// No longer used by qpdf.
// ^[\+\-]?(\.\d*|\d+(\.\d*)?)$
if (!*p) {
return false;
}
if ((*p == '-') || (*p == '+')) {
++p;
}
bool found_dot = false;
bool found_digit = false;
for (; *p; ++p) {
if (*p == '.') {
... | movzbl (%rdi), %eax
testl %eax, %eax
je 0x14545c
cmpl $0x2d, %eax
je 0x145431
cmpl $0x2b, %eax
jne 0x145434
incq %rdi
xorl %ecx, %ecx
xorl %eax, %eax
movzbl (%rdi), %edx
cmpl $0x2e, %edx
je 0x145450
testl %edx, %edx
je 0x14545e
addb $-0x30, %dl
movb $0x1, %al
cmpb $0x9, %dl
jbe 0x145457
jmp 0x14545c
testb $0x1, %cl
mov... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
read_char_from_FILE(char&, _IO_FILE*) | static bool
read_char_from_FILE(char& ch, FILE* f)
{
auto len = fread(&ch, 1, 1, f);
if (len == 0) {
if (ferror(f)) {
throw std::runtime_error("failure reading character from file");
}
return false;
}
return true;
} | pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x19620
movq %rax, %r14
testq %rax, %rax
jne 0x1455de
movq %rbx, %rdi
callq 0x19850
testl %eax, %eax
jne 0x1455ec
testq %r14, %r14
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x193f0
movq... | /jberkenbilt[P]qpdf/libqpdf/QUtil.cc |
SecureRandomDataProvider::provideRandomData(unsigned char*, unsigned long) | void
SecureRandomDataProvider::provideRandomData(unsigned char* data, size_t len)
{
# if defined(_WIN32)
// Optimization: make the WindowsCryptProvider static as long as
// it can be done in a thread-safe fashion.
WindowsCryptProvider c;
if (!CryptGenRandom(c.crypt_prov, static_cast<DWORD>(len), reinte... | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movb 0xa7d5e(%rip), %al # 0x1f16a8
testb %al, %al
je 0x149978
movq 0xa7d4b(%rip), %rax # 0x1f16a0
movq (%rax), %rcx
movl $0x1, %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x19620
cmpq %r14, %rax
jne 0x1499b5
addq $0x68,... | /jberkenbilt[P]qpdf/libqpdf/SecureRandomDataProvider.cc |
SF_FlateLzwDecode::setDecodeParms(QPDFObjectHandle) | bool
SF_FlateLzwDecode::setDecodeParms(QPDFObjectHandle decode_parms)
{
if (decode_parms.isNull()) {
return true;
}
auto memory_limit = Pl_Flate::memory_limit();
std::set<std::string> keys = decode_parms.getKeys();
for (auto const& key: keys) {
QPDFObjectHandle value = decode_parms... | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xc1998
movb $0x1, %bpl
testb %al, %al
jne 0x149e55
callq 0x34206
movq %rax, (%rsp)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xfbd40
movq 0x18(%r15), %r12
leaq 0x30... | /jberkenbilt[P]qpdf/libqpdf/SF_FlateLzwDecode.cc |
SF_FlateLzwDecode::getDecodePipeline(Pipeline*) | Pipeline*
SF_FlateLzwDecode::getDecodePipeline(Pipeline* next)
{
std::shared_ptr<Pipeline> pipeline;
if (predictor >= 10 && predictor <= 15) {
QTC::TC("qpdf", "SF_FlateLzwDecode PNG filter");
pipeline = std::make_shared<Pl_PNGFilter>(
"png decode",
next,
Pl_PN... | pushq %rbx
subq $0x60, %rsp
movq %rdi, %rbx
movq %rsi, 0x50(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movl 0xc(%rdi), %eax
leal -0xa(%rax), %ecx
cmpl $0x5, %ecx
ja 0x149f99
movl $0x1, 0xc(%rsp)
movl 0x10(%rbx), %edi
testl %edi, %edi
jns 0x149ee5
callq 0x33cc6
movl 0x10(%rbx), %edi
movl %edi, 0x2c(%rsp)
movl 0x1... | /jberkenbilt[P]qpdf/libqpdf/SF_FlateLzwDecode.cc |
SF_FlateLzwDecode::flate_factory() | std::shared_ptr<QPDFStreamFilter>
SF_FlateLzwDecode::flate_factory()
{
return std::make_shared<SF_FlateLzwDecode>(false);
} | pushq %rbx
movq %rdi, %rbx
movl $0x48, %edi
callq 0x19180
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0xa4e07(%rip), %rcx # 0x1eefb8
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
leaq 0xa4cb1(%rip), %rdx # 0x1eee70
movq %rdx, 0x10(%rax)
movb $0x0, 0x18(%rax)
movaps 0x36992(%rip), %xm... | /jberkenbilt[P]qpdf/libqpdf/SF_FlateLzwDecode.cc |
SF_FlateLzwDecode::lzw_factory() | std::shared_ptr<QPDFStreamFilter>
SF_FlateLzwDecode::lzw_factory()
{
return std::make_shared<SF_FlateLzwDecode>(true);
} | pushq %rbx
movq %rdi, %rbx
movl $0x48, %edi
callq 0x19180
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0xa4da3(%rip), %rcx # 0x1eefb8
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
leaq 0xa4c4d(%rip), %rdx # 0x1eee70
movq %rdx, 0x10(%rax)
movb $0x1, %dl
movb %dl, 0x18(%rax)
movaps 0x36... | /jberkenbilt[P]qpdf/libqpdf/SF_FlateLzwDecode.cc |
qpdf_more_warnings | QPDF_BOOL
qpdf_more_warnings(qpdf_data qpdf)
{
QTC::TC("qpdf", "qpdf-c called qpdf_more_warnings");
if (qpdf->warnings.empty()) {
std::vector<QPDFExc> w = qpdf->qpdf->getWarnings();
if (!w.empty()) {
qpdf->warnings.assign(w.begin(), w.end());
}
}
if (qpdf->warnings.e... | pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x40(%rdi), %rbx
movq 0x40(%rdi), %rcx
cmpq %rbx, %rcx
jne 0x14a82e
movq (%rdi), %rsi
movq %rsp, %r14
movq %r14, %rdi
callq 0x39ffa
movq (%r14), %rsi
movq 0x8(%r14), %rdx
cmpq %rdx, %rsi
je 0x14a823
movq %rbx, %rdi
callq 0x159a30
movq %rsp, %rdi
callq 0x3e662
movq (%rbx), %rc... | /jberkenbilt[P]qpdf/libqpdf/qpdf-c.cc |
qpdf_get_error | qpdf_error
qpdf_get_error(qpdf_data qpdf)
{
if (qpdf->error.get()) {
qpdf->tmp_error.exc = qpdf->error;
qpdf->error = nullptr;
QTC::TC("qpdf", "qpdf-c qpdf_get_error returned error");
return &qpdf->tmp_error;
} else {
return nullptr;
}
} | pushq %r14
pushq %rbx
pushq %rax
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x14a899
movq %rdi, %r14
leaq 0x30(%rdi), %rbx
movq %rax, 0x30(%rdi)
addq $0x38, %rdi
leaq 0x28(%r14), %rsi
callq 0x27552
xorps %xmm0, %xmm0
movq 0x28(%r14), %rdi
movups %xmm0, 0x20(%r14)
testq %rdi, %rdi
je 0x14a89b
callq 0x1d0e8
jmp 0x14a89b
x... | /jberkenbilt[P]qpdf/libqpdf/qpdf-c.cc |
qpdf_next_warning | qpdf_error
qpdf_next_warning(qpdf_data qpdf)
{
if (qpdf_more_warnings(qpdf)) {
qpdf->tmp_error.exc = std::make_shared<QPDFExc>(qpdf->warnings.front());
qpdf->warnings.pop_front();
QTC::TC("qpdf", "qpdf-c qpdf_next_warning returned warning");
return &qpdf->tmp_error;
} else {
... | pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0x14a7ed
testl %eax, %eax
je 0x14a920
leaq 0x40(%rbx), %r14
movq 0x40(%rbx), %rcx
addq $0x10, %rcx
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %rdx
movq %r15, %rsi
callq 0x1599be
movaps (%r15), %xmm0
xorps %xmm... | /jberkenbilt[P]qpdf/libqpdf/qpdf-c.cc |
qpdf_check_pdf | QPDF_ERROR_CODE
qpdf_check_pdf(qpdf_data qpdf)
{
QPDF_ERROR_CODE status = trap_errors(qpdf, &call_check);
QTC::TC("qpdf", "qpdf-c called qpdf_check_pdf");
return status;
} | pushq %rbx
subq $0x20, %rsp
movq %rsp, %rsi
movq $0x0, 0x8(%rsi)
leaq 0x282(%rip), %rax # 0x14ac51
movq %rax, (%rsi)
leaq 0xf283(%rip), %rax # 0x159c5c
movq %rax, 0x18(%rsi)
leaq 0xf280(%rip), %rax # 0x159c64
movq %rax, 0x10(%rsi)
callq 0x14aa3a
movl %eax, %ebx
movq 0x10(%rsp), %rax
testq %rax, %rax
je ... | /jberkenbilt[P]qpdf/libqpdf/qpdf-c.cc |
qpdf_set_logger | void
qpdf_set_logger(qpdf_data qpdf, qpdflogger_handle logger)
{
qpdf->qpdf->setLogger(logger->l);
} | pushq %rbx
subq $0x10, %rsp
movq (%rdi), %rdi
movq (%rsi), %rax
movq %rax, (%rsp)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x14ad07
movq 0xa5287(%rip), %rcx # 0x1eff80
cmpb $0x0, (%rcx)
je 0x14ad03
incl 0x8(%rax)
jmp 0x14ad07
lock
incl 0x8(%rax)
movq %rsp, %rsi
callq 0x39f4c
movq 0x8(%rsp), %rd... | /jberkenbilt[P]qpdf/libqpdf/qpdf-c.cc |
qpdf_get_logger | qpdflogger_handle
qpdf_get_logger(qpdf_data qpdf)
{
return new _qpdflogger_handle(qpdf->qpdf->getLogger());
} | pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movl $0x10, %edi
callq 0x19180
movq %rax, %rbx
movq (%r14), %rsi
leaq 0x8(%rsp), %rdi
callq 0x39f1e
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x15b924
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x14ad7e
callq 0x1d0e8
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq ... | /jberkenbilt[P]qpdf/libqpdf/qpdf-c.cc |
qpdf_read | QPDF_ERROR_CODE
qpdf_read(qpdf_data qpdf, char const* filename, char const* password)
{
QPDF_ERROR_CODE status = QPDF_SUCCESS;
qpdf->filename = filename;
qpdf->password = password;
status = trap_errors(qpdf, &call_read);
// We no longer have a good way to exercise a file with both warnings and error... | pushq %rbx
subq $0x20, %rsp
movq %rsi, 0x78(%rdi)
movq %rdx, 0x90(%rdi)
movq %rsp, %rsi
movq $0x0, 0x8(%rsi)
leaq 0x6b(%rip), %rax # 0x14ae75
movq %rax, (%rsi)
leaq 0xee48(%rip), %rax # 0x159c5c
movq %rax, 0x18(%rsi)
leaq 0xee45(%rip), %rax # 0x159c64
movq %rax, 0x10(%rsi)
callq 0x14aa3a
movl %eax, %eb... | /jberkenbilt[P]qpdf/libqpdf/qpdf-c.cc |
Subsets and Splits
SQL Console for LLM4Binary/decompile-bench
Filters out entries with file names ending in .cpp, providing a basic subset of the dataset that excludes C++ files.