name
stringlengths
1
473k
code
stringlengths
7
647k
asm
stringlengths
4
3.39M
file
stringlengths
8
196
bool sptk::ReadStream<double>(bool, int, int, int, std::vector<double, std::allocator<double>>*, std::istream*, int*)
bool ReadStream(bool zero_padding, int stream_skip, int read_point, int read_size, std::vector<T>* sequence_to_read, std::istream* input_stream, int* actual_read_size) { if (stream_skip < 0 || read_point < 0 || read_size <= 0 || NULL == sequence_to_read || NULL == input_stream || input_stream->eof()) { return false; } const int type_byte(sizeof((*sequence_to_read)[0])); if (0 < stream_skip) { input_stream->ignore(type_byte * stream_skip); if (input_stream->eof()) return false; } const int end(read_point + read_size); if (sequence_to_read->size() < static_cast<std::size_t>(end)) { sequence_to_read->resize(end); } const int num_read_bytes(type_byte * read_size); input_stream->read( reinterpret_cast<char*>(&((*sequence_to_read)[0]) + read_point), num_read_bytes); const int gcount(static_cast<int>(input_stream->gcount())); if (NULL != actual_read_size) { *actual_read_size = gcount / type_byte; } if (num_read_bytes == gcount) { return !input_stream->fail(); } else if (zero_padding && 0 < gcount) { // Use std::ceil to zero incomplete data // as gcount may not be a multiple of sizeof(double). const int num_zeros(static_cast<int>( std::ceil(static_cast<double>(num_read_bytes - gcount) / type_byte))); if (num_zeros < 0) { return false; // Something wrong! } std::fill_n(sequence_to_read->begin() + end - num_zeros, num_zeros, static_cast<T>(0)); return !input_stream->bad(); } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %r15d movl %edx, %r13d movl %edx, %eax orl %esi, %eax sets %al testl %ecx, %ecx setle %cl orb %al, %cl testq %r8, %r8 sete %al testq %r9, %r9 sete %dl orb %al, %dl orb %cl, %dl jne 0x8101 movq %r9, %rbx movq (%r9), %rax movq -0x18(%rax), %rax testb $0x2, 0x20(%r9,%rax) jne 0x8101 movq %r8, %r14 movl %edi, %ebp testl %esi, %esi jle 0x8044 shll $0x3, %esi movq %rbx, %rdi callq 0x3050 movq (%rbx), %rax movq -0x18(%rax), %rax testb $0x2, 0x20(%rbx,%rax) jne 0x8101 leal (%r15,%r13), %r12d movq (%r14), %rax movq 0x8(%r14), %rcx subq %rax, %rcx sarq $0x3, %rcx cmpq %r12, %rcx jae 0x8069 movq %r14, %rdi movq %r12, %rsi callq 0x8112 movq (%r14), %rax shll $0x3, %r15d movl %r13d, %ecx leaq (%rax,%rcx,8), %rsi movq %rbx, %rdi movq %r15, %rdx callq 0x32d0 movl 0x8(%rbx), %eax movq 0x40(%rsp), %rdx testq %rdx, %rdx je 0x8099 leal 0x7(%rax), %ecx testl %eax, %eax cmovnsl %eax, %ecx sarl $0x3, %ecx movl %ecx, (%rdx) movl $0x5, %r13d subl %eax, %r15d jne 0x80b5 movq (%rbx), %rax movq -0x18(%rax), %rax testl %r13d, 0x20(%rbx,%rax) sete %al jmp 0x8103 testl %eax, %eax setle %al xorb $0x1, %bpl orb %al, %bpl jne 0x8101 cvtsi2sd %r15d, %xmm0 mulsd 0x42d8(%rip), %xmm0 # 0xc3a8 callq 0x3080 cvttsd2si %xmm0, %eax testl %eax, %eax js 0x8101 movl $0x1, %r13d je 0x80a4 shlq $0x3, %r12 addq (%r14), %r12 movl %eax, %edx shlq $0x3, %rdx subq %rdx, %r12 movq %r12, %rdi xorl %esi, %esi callq 0x3180 jmp 0x80a4 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/sp-nitech[P]SPTK/src/utils/sptk_utils.cc
bool sptk::ReadStream<long double>(bool, int, int, int, std::vector<long double, std::allocator<long double>>*, std::istream*, int*)
bool ReadStream(bool zero_padding, int stream_skip, int read_point, int read_size, std::vector<T>* sequence_to_read, std::istream* input_stream, int* actual_read_size) { if (stream_skip < 0 || read_point < 0 || read_size <= 0 || NULL == sequence_to_read || NULL == input_stream || input_stream->eof()) { return false; } const int type_byte(sizeof((*sequence_to_read)[0])); if (0 < stream_skip) { input_stream->ignore(type_byte * stream_skip); if (input_stream->eof()) return false; } const int end(read_point + read_size); if (sequence_to_read->size() < static_cast<std::size_t>(end)) { sequence_to_read->resize(end); } const int num_read_bytes(type_byte * read_size); input_stream->read( reinterpret_cast<char*>(&((*sequence_to_read)[0]) + read_point), num_read_bytes); const int gcount(static_cast<int>(input_stream->gcount())); if (NULL != actual_read_size) { *actual_read_size = gcount / type_byte; } if (num_read_bytes == gcount) { return !input_stream->fail(); } else if (zero_padding && 0 < gcount) { // Use std::ceil to zero incomplete data // as gcount may not be a multiple of sizeof(double). const int num_zeros(static_cast<int>( std::ceil(static_cast<double>(num_read_bytes - gcount) / type_byte))); if (num_zeros < 0) { return false; // Something wrong! } std::fill_n(sequence_to_read->begin() + end - num_zeros, num_zeros, static_cast<T>(0)); return !input_stream->bad(); } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %r15d movl %edx, %r13d movl %edx, %eax orl %esi, %eax sets %al testl %ecx, %ecx setle %cl orb %al, %cl testq %r8, %r8 sete %al testq %r9, %r9 sete %dl orb %al, %dl orb %cl, %dl jne 0x8277 movq %r9, %rbx movq (%r9), %rax movq -0x18(%rax), %rax testb $0x2, 0x20(%r9,%rax) jne 0x8277 movq %r8, %r14 movl %edi, %ebp testl %esi, %esi jle 0x81b4 shll $0x4, %esi movq %rbx, %rdi callq 0x3050 movq (%rbx), %rax movq -0x18(%rax), %rax testb $0x2, 0x20(%rbx,%rax) jne 0x8277 leal (%r15,%r13), %r12d movq (%r14), %rax movq 0x8(%r14), %rcx subq %rax, %rcx sarq $0x4, %rcx cmpq %r12, %rcx jae 0x81d9 movq %r14, %rdi movq %r12, %rsi callq 0x8288 movq (%r14), %rax shll $0x4, %r15d movl %r13d, %esi shlq $0x4, %rsi addq %rax, %rsi movq %rbx, %rdi movq %r15, %rdx callq 0x32d0 movl 0x8(%rbx), %ecx movq 0x40(%rsp), %rdx testq %rdx, %rdx je 0x820c leal 0xf(%rcx), %eax testl %ecx, %ecx cmovnsl %ecx, %eax sarl $0x4, %eax movl %eax, (%rdx) movl $0x5, %eax subl %ecx, %r15d jne 0x8226 movq (%rbx), %rcx movq -0x18(%rcx), %rcx testl %eax, 0x20(%rbx,%rcx) sete %al jmp 0x8279 testl %ecx, %ecx setle %al xorb $0x1, %bpl orb %al, %bpl jne 0x8277 cvtsi2sd %r15d, %xmm0 mulsd 0x416f(%rip), %xmm0 # 0xc3b0 callq 0x3080 cvttsd2si %xmm0, %ecx testl %ecx, %ecx js 0x8277 movl $0x1, %eax je 0x8216 shlq $0x4, %r12 addq (%r14), %r12 movl %ecx, %ecx shlq $0x4, %rcx negq %rcx fldz fld %st(0) fstpt (%r12,%rcx) addq $0x10, %rcx jne 0x8267 fstp %st(0) jmp 0x8216 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/sp-nitech[P]SPTK/src/utils/sptk_utils.cc
bool sptk::WriteStream<signed char>(int, int, std::vector<signed char, std::allocator<signed char>> const&, std::ostream*, int*)
bool WriteStream(int write_point, int write_size, const std::vector<T>& sequence_to_write, std::ostream* output_stream, int* actual_write_size) { if (write_point < 0 || write_size <= 0 || NULL == output_stream) { return false; } const int end(write_point + write_size); if (sequence_to_write.size() < static_cast<std::size_t>(end)) { return false; } const int before((NULL == actual_write_size) ? 0 : static_cast<int>(output_stream->tellp())); output_stream->write( reinterpret_cast<const char*>(&(sequence_to_write[0]) + write_point), sizeof(sequence_to_write[0]) * write_size); // When output_stream is cout, actual_write_size is always zero. if (NULL != actual_write_size) { const int after(static_cast<int>(output_stream->tellp())); const int type_byte(sizeof(sequence_to_write[0])); *actual_write_size = (after - before) / type_byte; } return !output_stream->fail(); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx testl %edi, %edi sets %al testl %esi, %esi setle %cl orb %al, %cl testq %rbx, %rbx sete %al orb %cl, %al jne 0x862b movq %rdx, %r12 movl %esi, %r15d movl %edi, %r13d leal (%r15,%r13), %eax movq (%rdx), %rsi movq 0x8(%rdx), %rcx subq %rsi, %rcx cmpq %rax, %rcx jae 0x862f xorl %eax, %eax jmp 0x8683 movq %r8, %r14 testq %r8, %r8 je 0x8663 movq %rbx, %rdi callq 0x3240 movq %rax, %rbp movl %r13d, %esi addq (%r12), %rsi movl %r15d, %edx movq %rbx, %rdi callq 0x32f0 movq %rbx, %rdi callq 0x3240 subl %ebp, %eax movl %eax, (%r14) jmp 0x8674 movl %r13d, %eax addq %rax, %rsi movl %r15d, %edx movq %rbx, %rdi callq 0x32f0 movq (%rbx), %rax movq -0x18(%rax), %rax testb $0x5, 0x20(%rbx,%rax) sete %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/sp-nitech[P]SPTK/src/utils/sptk_utils.cc
bool sptk::WriteStream<int>(int, int, std::vector<int, std::allocator<int>> const&, std::ostream*, int*)
bool WriteStream(int write_point, int write_size, const std::vector<T>& sequence_to_write, std::ostream* output_stream, int* actual_write_size) { if (write_point < 0 || write_size <= 0 || NULL == output_stream) { return false; } const int end(write_point + write_size); if (sequence_to_write.size() < static_cast<std::size_t>(end)) { return false; } const int before((NULL == actual_write_size) ? 0 : static_cast<int>(output_stream->tellp())); output_stream->write( reinterpret_cast<const char*>(&(sequence_to_write[0]) + write_point), sizeof(sequence_to_write[0]) * write_size); // When output_stream is cout, actual_write_size is always zero. if (NULL != actual_write_size) { const int after(static_cast<int>(output_stream->tellp())); const int type_byte(sizeof(sequence_to_write[0])); *actual_write_size = (after - before) / type_byte; } return !output_stream->fail(); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx testl %edi, %edi sets %al testl %esi, %esi setle %cl orb %al, %cl testq %rbx, %rbx sete %al orb %cl, %al jne 0x886e movq %rdx, %r12 movl %esi, %r15d movl %edi, %r13d leal (%r15,%r13), %ecx movq (%rdx), %rax movq 0x8(%rdx), %rdx subq %rax, %rdx sarq $0x2, %rdx cmpq %rcx, %rdx jae 0x8872 xorl %eax, %eax jmp 0x88de movq %r8, %r14 testq %r8, %r8 je 0x88b9 movq %rbx, %rdi callq 0x3240 movq %rax, %rbp movl %r13d, %esi shlq $0x2, %rsi addq (%r12), %rsi movl %r15d, %edx shlq $0x2, %rdx movq %rbx, %rdi callq 0x32f0 movq %rbx, %rdi callq 0x3240 subl %ebp, %eax leal 0x3(%rax), %ecx testl %eax, %eax cmovnsl %eax, %ecx sarl $0x2, %ecx movl %ecx, (%r14) jmp 0x88cf movl %r13d, %ecx leaq (%rax,%rcx,4), %rsi movl %r15d, %edx shlq $0x2, %rdx movq %rbx, %rdi callq 0x32f0 movq (%rbx), %rax movq -0x18(%rax), %rax testb $0x5, 0x20(%rbx,%rax) sete %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/sp-nitech[P]SPTK/src/utils/sptk_utils.cc
bool sptk::WriteStream<unsigned int>(int, int, std::vector<unsigned int, std::allocator<unsigned int>> const&, std::ostream*, int*)
bool WriteStream(int write_point, int write_size, const std::vector<T>& sequence_to_write, std::ostream* output_stream, int* actual_write_size) { if (write_point < 0 || write_size <= 0 || NULL == output_stream) { return false; } const int end(write_point + write_size); if (sequence_to_write.size() < static_cast<std::size_t>(end)) { return false; } const int before((NULL == actual_write_size) ? 0 : static_cast<int>(output_stream->tellp())); output_stream->write( reinterpret_cast<const char*>(&(sequence_to_write[0]) + write_point), sizeof(sequence_to_write[0]) * write_size); // When output_stream is cout, actual_write_size is always zero. if (NULL != actual_write_size) { const int after(static_cast<int>(output_stream->tellp())); const int type_byte(sizeof(sequence_to_write[0])); *actual_write_size = (after - before) / type_byte; } return !output_stream->fail(); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx testl %edi, %edi sets %al testl %esi, %esi setle %cl orb %al, %cl testq %rbx, %rbx sete %al orb %cl, %al jne 0x8c33 movq %rdx, %r12 movl %esi, %r15d movl %edi, %r13d leal (%r15,%r13), %ecx movq (%rdx), %rax movq 0x8(%rdx), %rdx subq %rax, %rdx sarq $0x2, %rdx cmpq %rcx, %rdx jae 0x8c37 xorl %eax, %eax jmp 0x8ca3 movq %r8, %r14 testq %r8, %r8 je 0x8c7e movq %rbx, %rdi callq 0x3240 movq %rax, %rbp movl %r13d, %esi shlq $0x2, %rsi addq (%r12), %rsi movl %r15d, %edx shlq $0x2, %rdx movq %rbx, %rdi callq 0x32f0 movq %rbx, %rdi callq 0x3240 subl %ebp, %eax leal 0x3(%rax), %ecx testl %eax, %eax cmovnsl %eax, %ecx sarl $0x2, %ecx movl %ecx, (%r14) jmp 0x8c94 movl %r13d, %ecx leaq (%rax,%rcx,4), %rsi movl %r15d, %edx shlq $0x2, %rdx movq %rbx, %rdi callq 0x32f0 movq (%rbx), %rax movq -0x18(%rax), %rax testb $0x5, 0x20(%rbx,%rax) sete %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/sp-nitech[P]SPTK/src/utils/sptk_utils.cc
sptk::Matrix::Matrix(sptk::Matrix const&)
Matrix::Matrix(const Matrix& matrix) : num_row_(matrix.num_row_), num_column_(matrix.num_column_), data_(matrix.data_), index_(num_row_) { for (int i(0); i < num_row_; ++i) { index_[i] = &data_[i * num_column_]; } }
pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %r15 leaq 0x679b(%rip), %rax # 0x10d28 movq %rax, (%rdi) movq 0x8(%rsi), %rax movq %rax, 0x8(%rdi) leaq 0x10(%rdi), %rbx addq $0x10, %rsi movq %rbx, %rdi callq 0xaf3c leaq 0x28(%r15), %r14 movslq 0x8(%r15), %rsi leaq 0xf(%rsp), %rdx movq %r14, %rdi callq 0xafbc movslq 0x8(%r15), %rax testq %rax, %rax jle 0xa5ea movslq 0xc(%r15), %rcx shlq $0x3, %rcx xorl %edx, %edx xorl %esi, %esi movq (%rbx), %rdi addq %rdx, %rdi movq (%r14), %r8 movq %rdi, (%r8,%rsi,8) incq %rsi addq %rcx, %rdx cmpq %rsi, %rax jne 0xa5d2 addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0xa604 callq 0x3260 movq %r14, %rdi callq 0x3430
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::operator=(sptk::Matrix const&)
Matrix& Matrix::operator=(const Matrix& matrix) { if (this != &matrix) { num_row_ = matrix.num_row_; num_column_ = matrix.num_column_; data_ = matrix.data_; index_.resize(num_row_); for (int i(0); i < num_row_; ++i) { index_[i] = &data_[i * num_column_]; } } return *this; }
pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx cmpq %rsi, %rdi je 0xa66e movq 0x8(%rsi), %rax movq %rax, 0x8(%rbx) addq $0x10, %rsi leaq 0x10(%rbx), %r14 movq %r14, %rdi callq 0xb04a leaq 0x28(%rbx), %r15 movslq 0x8(%rbx), %rsi movq %r15, %rdi callq 0xaf0a movslq 0x8(%rbx), %rax testq %rax, %rax jle 0xa66e movslq 0xc(%rbx), %rcx shlq $0x3, %rcx xorl %edx, %edx xorl %esi, %esi movq (%r14), %rdi addq %rdx, %rdi movq (%r15), %r8 movq %rdi, (%r8,%rsi,8) incq %rsi addq %rcx, %rdx cmpq %rsi, %rax jne 0xa656 movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq nop
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::Resize(int, int)
void Matrix::Resize(int num_row, int num_column) { num_row_ = num_row < 0 ? 0 : num_row; num_column_ = num_column < 0 ? 0 : num_column; data_.resize(num_row_ * num_column_); index_.resize(num_row_); Fill(0.0); for (int i(0); i < num_row_; ++i) { index_[i] = &data_[i * num_column_]; } }
pushq %r15 pushq %r14 pushq %rbx xorl %eax, %eax testl %esi, %esi cmovlel %eax, %esi movq %rdi, %r15 testl %edx, %edx cmovgl %edx, %eax movl %esi, 0x8(%rdi) movl %eax, 0xc(%rdi) leaq 0x10(%rdi), %rbx imull %eax, %esi movq %rbx, %rdi callq 0x8112 leaq 0x28(%r15), %r14 movslq 0x8(%r15), %rsi movq %r14, %rdi callq 0xaf0a movq 0x10(%r15), %rdi movq 0x18(%r15), %rdx cmpq %rdx, %rdi je 0xa6d4 subq %rdi, %rdx addq $-0x8, %rdx andq $-0x8, %rdx addq $0x8, %rdx xorl %esi, %esi callq 0x3180 movslq 0x8(%r15), %rax testq %rax, %rax jle 0xa701 movslq 0xc(%r15), %rcx shlq $0x3, %rcx xorl %edx, %edx xorl %esi, %esi movq (%rbx), %rdi addq %rdx, %rdi movq (%r14), %r8 movq %rdi, (%r8,%rsi,8) incq %rsi addq %rcx, %rdx cmpq %rsi, %rax jne 0xa6e9 popq %rbx popq %r14 popq %r15 retq nop
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::At(int, int)
double& Matrix::At(int row, int column) { if (row < 0 || num_row_ <= row || column < 0 || num_column_ <= column) { throw std::out_of_range(kErrorMessageForOutOfRange); } return index_[row][column]; }
pushq %r14 pushq %rbx pushq %rax testl %esi, %esi js 0xa7e4 testl %edx, %edx js 0xa7e4 cmpl %esi, 0x8(%rdi) jle 0xa7e4 cmpl %edx, 0xc(%rdi) jle 0xa7e4 movl %esi, %ecx movq 0x28(%rdi), %rsi movl %edx, %eax shlq $0x3, %rax addq (%rsi,%rcx,8), %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x3140 movq %rax, %rbx leaq 0x1d9a(%rip), %rsi # 0xc592 movq %rax, %rdi callq 0x3070 movq 0x67b9(%rip), %rsi # 0x10fc0 movq 0x67aa(%rip), %rdx # 0x10fb8 movq %rbx, %rdi callq 0x3400 movq %rax, %r14 movq %rbx, %rdi callq 0x31e0 movq %r14, %rdi callq 0x3430 nop
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::operator+=(sptk::Matrix const&)
Matrix& Matrix::operator+=(const Matrix& matrix) { if (num_row_ != matrix.num_row_ || num_column_ != matrix.num_column_) { throw std::logic_error(kErrorMessageForLogicError); } std::transform(data_.begin(), data_.end(), matrix.data_.begin(), data_.begin(), std::plus<double>()); return *this; }
pushq %r14 pushq %rbx pushq %rax movl 0x8(%rdi), %eax cmpl 0x8(%rsi), %eax jne 0xa8e7 movl 0xc(%rdi), %eax cmpl 0xc(%rsi), %eax jne 0xa8e7 movq 0x10(%rdi), %rax movq 0x18(%rdi), %rcx cmpq %rcx, %rax je 0xa8dc movq 0x10(%rsi), %rdx movsd (%rax), %xmm0 addsd (%rdx), %xmm0 movsd %xmm0, (%rax) addq $0x8, %rax addq $0x8, %rdx cmpq %rcx, %rax jne 0xa8c3 movq %rdi, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x3140 movq %rax, %rbx leaq 0x1c15(%rip), %rsi # 0xc510 movq %rax, %rdi callq 0x3350 movq 0x66c6(%rip), %rsi # 0x10fd0 movq 0x668f(%rip), %rdx # 0x10fa0 movq %rbx, %rdi callq 0x3400 movq %rax, %r14 movq %rbx, %rdi callq 0x31e0 movq %r14, %rdi callq 0x3430
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::operator-=(sptk::Matrix const&)
Matrix& Matrix::operator-=(const Matrix& matrix) { if (num_row_ != matrix.num_row_ || num_column_ != matrix.num_column_) { throw std::logic_error(kErrorMessageForLogicError); } std::transform(data_.begin(), data_.end(), matrix.data_.begin(), data_.begin(), std::minus<double>()); return *this; }
pushq %r14 pushq %rbx pushq %rax movl 0x8(%rdi), %eax cmpl 0x8(%rsi), %eax jne 0xa975 movl 0xc(%rdi), %eax cmpl 0xc(%rsi), %eax jne 0xa975 movq 0x10(%rdi), %rax movq 0x18(%rdi), %rcx cmpq %rcx, %rax je 0xa96a movq 0x10(%rsi), %rdx movsd (%rax), %xmm0 subsd (%rdx), %xmm0 movsd %xmm0, (%rax) addq $0x8, %rax addq $0x8, %rdx cmpq %rcx, %rax jne 0xa951 movq %rdi, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x3140 movq %rax, %rbx leaq 0x1b87(%rip), %rsi # 0xc510 movq %rax, %rdi callq 0x3350 movq 0x6638(%rip), %rsi # 0x10fd0 movq 0x6601(%rip), %rdx # 0x10fa0 movq %rbx, %rdi callq 0x3400 movq %rax, %r14 movq %rbx, %rdi callq 0x31e0 movq %r14, %rdi callq 0x3430
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::operator*(sptk::Matrix const&) const
Matrix Matrix::operator*(const Matrix& matrix) const { if (num_column_ != matrix.num_row_) { throw std::logic_error(kErrorMessageForLogicError); } Matrix result(num_row_, matrix.num_column_); for (int i(0); i < num_row_; ++i) { for (int j(0); j < matrix.num_column_; ++j) { for (int k(0); k < num_column_; ++k) { result.index_[i][j] += index_[i][k] * matrix.index_[k][j]; } } } return result; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl 0xc(%rsi), %eax cmpl 0x8(%rdx), %eax jne 0xaab6 movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 movl 0x8(%rsi), %esi movl 0xc(%rdx), %edx callq 0xa434 movslq 0x8(%r15), %rax testq %rax, %rax jle 0xaaa4 movl 0xc(%rbx), %ecx movl 0xc(%r15), %edx xorl %esi, %esi testl %ecx, %ecx jle 0xaa9c movq 0x28(%r15), %rdi movq 0x28(%rbx), %r8 movq 0x28(%r14), %r9 xorl %r10d, %r10d testl %edx, %edx jle 0xaa94 movq (%rdi,%rsi,8), %r11 movq (%r9,%rsi,8), %r12 movsd (%r12,%r10,8), %xmm0 xorl %r13d, %r13d movsd (%r11,%r13,8), %xmm1 movq (%r8,%r13,8), %rbp mulsd (%rbp,%r10,8), %xmm1 addsd %xmm1, %xmm0 movsd %xmm0, (%r12,%r10,8) incq %r13 cmpq %r13, %rdx jne 0xaa71 incq %r10 cmpq %rcx, %r10 jne 0xaa5c incq %rsi cmpq %rax, %rsi jne 0xaa49 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x3140 movq %rax, %rbx leaq 0x1a46(%rip), %rsi # 0xc510 movq %rax, %rdi callq 0x3350 movq 0x64f7(%rip), %rsi # 0x10fd0 movq 0x64c0(%rip), %rdx # 0x10fa0 movq %rbx, %rdi callq 0x3400 movq %rax, %r14 movq %rbx, %rdi callq 0x31e0 movq %r14, %rdi callq 0x3430 nop
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::operator-() const
Matrix Matrix::operator-() const { Matrix result(*this); result.Negate(); return result; }
pushq %rbx movq %rdi, %rbx callq 0xa57a movq 0x10(%rbx), %rax movq 0x18(%rbx), %rcx cmpq %rcx, %rax je 0xabdc movaps 0x1937(%rip), %xmm0 # 0xc500 movsd (%rax), %xmm1 xorps %xmm0, %xmm1 movlps %xmm1, (%rax) addq $0x8, %rax cmpq %rcx, %rax jne 0xabc9 movq %rbx, %rax popq %rbx retq nop
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::FillDiagonal(double)
void Matrix::FillDiagonal(double value) { Fill(0.0); const int num_ones(std::min(num_row_, num_column_)); for (int i(0); i < num_ones; ++i) { index_[i][i] = value; } }
pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movq 0x10(%rdi), %rdi movq 0x18(%rbx), %rdx cmpq %rdx, %rdi je 0xac41 subq %rdi, %rdx addq $-0x8, %rdx andq $-0x8, %rdx addq $0x8, %rdx xorl %esi, %esi movsd %xmm0, 0x8(%rsp) callq 0x3180 movsd 0x8(%rsp), %xmm0 movl 0x8(%rbx), %ecx movl 0xc(%rbx), %eax cmpl %ecx, %eax cmovll %eax, %ecx testl %ecx, %ecx jle 0xac69 movq 0x28(%rbx), %rax movl %ecx, %ecx xorl %edx, %edx movq (%rax,%rdx,8), %rsi movsd %xmm0, (%rsi,%rdx,8) incq %rdx cmpq %rdx, %rcx jne 0xac58 addq $0x10, %rsp popq %rbx retq nop
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::Transpose(sptk::Matrix*) const
bool Matrix::Transpose(Matrix* transposed_matrix) const { if (NULL == transposed_matrix || this == transposed_matrix) { return false; } if (transposed_matrix->num_row_ != num_column_ || transposed_matrix->num_column_ != num_row_) { transposed_matrix->Resize(num_column_, num_row_); } for (int i(0); i < num_column_; ++i) { for (int j(0); j < num_row_; ++j) { transposed_matrix->index_[i][j] = index_[j][i]; } } return true; }
pushq %rbp pushq %r14 pushq %rbx testq %rsi, %rsi setne %al cmpq %rsi, %rdi setne %bpl andb %al, %bpl cmpb $0x1, %bpl jne 0xacf5 movq %rsi, %rbx movq %rdi, %r14 movl 0x8(%rsi), %edi movl 0xc(%r14), %esi cmpl %esi, %edi jne 0xaca6 movl 0x8(%r14), %edx cmpl %edx, 0xc(%rbx) jne 0xacaa jmp 0xacb6 movl 0x8(%r14), %edx movq %rbx, %rdi callq 0xa678 movl 0xc(%r14), %edi testl %edi, %edi jle 0xacf5 movl 0x8(%r14), %eax movq 0x28(%r14), %rcx movl %edi, %edx xorl %esi, %esi testl %eax, %eax jle 0xaced movq 0x28(%rbx), %rdi movq (%rdi,%rsi,8), %rdi xorl %r8d, %r8d movq (%rcx,%r8,8), %r9 movsd (%r9,%rsi,8), %xmm0 movsd %xmm0, (%rdi,%r8,8) incq %r8 cmpq %r8, %rax jne 0xacd5 incq %rsi cmpq %rdx, %rsi jne 0xacc6 movl %ebp, %eax popq %rbx popq %r14 popq %rbp retq
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::GetSubmatrix(int, int, int, int, sptk::Matrix*) const
bool Matrix::GetSubmatrix(int row_offset, int num_row_of_submatrix, int column_offset, int num_column_of_submatrix, Matrix* submatrix) const { if (row_offset < 0 || num_row_of_submatrix <= 0 || num_row_ < row_offset + num_row_of_submatrix || column_offset < 0 || num_column_of_submatrix <= 0 || num_column_ < column_offset + num_column_of_submatrix || NULL == submatrix || this == submatrix) { return false; } if (submatrix->num_row_ != num_row_of_submatrix || submatrix->num_column_ != num_column_of_submatrix) { submatrix->Resize(num_row_of_submatrix, num_column_of_submatrix); } for (int i(0); i < num_row_of_submatrix; ++i) { for (int j(0); j < num_column_of_submatrix; ++j) { submatrix->index_[i][j] = index_[row_offset + i][column_offset + j]; } } return true; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %ebp testl %esi, %esi sets %al testl %edx, %edx setle %cl orb %al, %cl je 0xad28 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %r8d, %r14d xorl %eax, %eax testl %r8d, %r8d jle 0xad19 testl %ebp, %ebp js 0xad19 movl %edx, %r12d movl %esi, %r13d movq %rdi, %r15 leal (%r12,%r13), %ecx cmpl %ecx, 0x8(%rdi) jl 0xad19 movq %r9, %rbx xorl %eax, %eax cmpq %r9, %r15 je 0xad19 testq %rbx, %rbx je 0xad19 leal (%r14,%rbp), %ecx cmpl %ecx, 0xc(%r15) jl 0xad19 cmpl %r12d, 0x8(%rbx) jne 0xad6d cmpl %r14d, 0xc(%rbx) je 0xad7b movq %rbx, %rdi movl %r12d, %esi movl %r14d, %edx callq 0xa678 movl %ebp, %eax movl %r13d, %ecx movl %r12d, %edx shlq $0x3, %rcx addq 0x28(%r15), %rcx movq 0x28(%rbx), %rsi movl %r14d, %edi xorl %r8d, %r8d shlq $0x3, %rax movq (%rsi,%r8,8), %r9 movq (%rcx,%r8,8), %r10 addq %rax, %r10 xorl %r11d, %r11d movsd (%r10,%r11,8), %xmm0 movsd %xmm0, (%r9,%r11,8) incq %r11 cmpq %r11, %rdi jne 0xada7 incq %r8 cmpq %rdx, %r8 jne 0xad99 movb $0x1, %al jmp 0xad19
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::Matrix::GetDeterminant(double*) const
bool Matrix::GetDeterminant(double* determinant) const { if (num_row_ != num_column_ || num_row_ <= 0 || NULL == determinant) { return false; } const int num_dimension(num_row_); if (1 == num_dimension) { *determinant = index_[0][0]; return true; } const int num_order(num_dimension - 1); Matrix submatrix(num_order, num_order); *determinant = 0.0; for (int i(0); i < num_dimension; ++i) { for (int row(0), offset(0); row < num_order; ++row) { if (i == row) { offset = 1; } for (int column(0); column < num_order; ++column) { submatrix[row][column] = index_[row + offset][column + 1]; } } double determinant_of_submatrix; if (!submatrix.GetDeterminant(&determinant_of_submatrix)) { return false; } *determinant += ((0 == i % 2) ? index_[i][0] : -index_[i][0]) * determinant_of_submatrix; } return true; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl 0x8(%rdi), %edx cmpl 0xc(%rdi), %edx jne 0xadf2 movq %rsi, %rbx testl %edx, %edx setle %al testq %rsi, %rsi sete %cl orb %al, %cl je 0xae09 xorl %ebp, %ebp andb $0x1, %bpl movl %ebp, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rdi, %r14 cmpl $0x1, %edx jne 0xae25 movq 0x28(%r14), %rax movq (%rax), %rax movsd (%rax), %xmm0 movsd %xmm0, (%rbx) movb $0x1, %bpl jmp 0xadf4 movq %rdx, 0x8(%rsp) leal -0x1(%rdx), %r15d leaq 0x18(%rsp), %rdi movl %r15d, %esi movl %r15d, %edx callq 0xa434 movq $0x0, (%rbx) xorl %r13d, %r13d movl $0x1, %r12d xorl %ebp, %ebp movq 0x28(%r14), %rax movq 0x40(%rsp), %rcx xorl %edx, %edx xorl %esi, %esi cmpq %rdx, %r13 cmovel %r12d, %esi leal (%rdx,%rsi), %edi movslq %edi, %rdi movq (%rax,%rdi,8), %rdi movq (%rcx,%rdx,8), %r8 xorl %r9d, %r9d movsd 0x8(%rdi,%r9,8), %xmm0 movsd %xmm0, (%r8,%r9,8) leaq 0x1(%r9), %r10 movq %r10, %r9 cmpq %r10, %r15 jne 0xae75 incq %rdx cmpq %r15, %rdx jne 0xae5d leaq 0x18(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0xadca testb %al, %al je 0xaee6 movq 0x28(%r14), %rax movq (%rax,%r13,8), %rax movsd (%rax), %xmm0 testb $0x1, %r13b je 0xaec3 xorpd 0x163d(%rip), %xmm0 # 0xc500 mulsd 0x10(%rsp), %xmm0 addsd (%rbx), %xmm0 movsd %xmm0, (%rbx) incq %r13 cmpq 0x8(%rsp), %r13 setae %bpl jne 0xae50 movb $0x1, %bpl leaq 0x18(%rsp), %rdi callq 0x9220 jmp 0xadf4 movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x9220 movq %rbx, %rdi callq 0x3430
/sp-nitech[P]SPTK/src/math/matrix.cc
sptk::SymmetricMatrix::SymmetricMatrix(sptk::SymmetricMatrix const&)
SymmetricMatrix::SymmetricMatrix(const SymmetricMatrix& matrix) : num_dimension_(matrix.num_dimension_), data_(matrix.data_), index_(num_dimension_) { for (int i(0), j(0); i < num_dimension_; ++i, j += i) { index_[i] = &data_[j]; } }
pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %r15 leaq 0x59cf(%rip), %rax # 0x10d58 movq %rax, (%rdi) movl 0x8(%rsi), %eax movl %eax, 0x8(%rdi) leaq 0x10(%rdi), %rbx addq $0x10, %rsi movq %rbx, %rdi callq 0xaf3c leaq 0x28(%r15), %r14 movslq 0x8(%r15), %rsi leaq 0xf(%rsp), %rdx movq %r14, %rdi callq 0xafbc movslq 0x8(%r15), %rax testq %rax, %rax jle 0xb3de xorl %ecx, %ecx xorl %edx, %edx movl %edx, %esi shlq $0x3, %rsi addq (%rbx), %rsi movq (%r14), %rdi movq %rsi, (%rdi,%rcx,8) incq %rcx addl %ecx, %edx cmpq %rcx, %rax jne 0xb3c4 addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0xb3f8 callq 0x3260 movq %r14, %rdi callq 0x3430
/sp-nitech[P]SPTK/src/math/symmetric_matrix.cc
sptk::SymmetricMatrix::At(int, int) const
const double& SymmetricMatrix::At(int row, int column) const { if (row < column) { std::swap(row, column); } if (column < 0 || num_dimension_ <= row) { throw std::out_of_range(kErrorMessageForOutOfRange); } return index_[row][column]; }
pushq %r14 pushq %rbx pushq %rax cmpl %edx, %esi movl %edx, %eax cmovgl %esi, %eax cmovll %esi, %edx testl %edx, %edx js 0xb578 cmpl %eax, 0x8(%rdi) jle 0xb578 movslq %eax, %rcx movq 0x28(%rdi), %rsi movl %edx, %eax shlq $0x3, %rax addq (%rsi,%rcx,8), %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x3140 movq %rax, %rbx leaq 0xffd(%rip), %rsi # 0xc589 movq %rax, %rdi callq 0x3070 movq 0x5a25(%rip), %rsi # 0x10fc0 movq 0x5a16(%rip), %rdx # 0x10fb8 movq %rbx, %rdi callq 0x3400 movq %rax, %r14 movq %rbx, %rdi callq 0x31e0 movq %r14, %rdi callq 0x3430 nop
/sp-nitech[P]SPTK/src/math/symmetric_matrix.cc
sptk::SymmetricMatrix::GetDiagonal(std::vector<double, std::allocator<double>>*) const
bool SymmetricMatrix::GetDiagonal( std::vector<double>* diagonal_elements) const { if (NULL == diagonal_elements) { return false; } if (diagonal_elements->size() != static_cast<std::size_t>(num_dimension_)) { diagonal_elements->resize(num_dimension_); } for (int i(0); i < num_dimension_; ++i) { (*diagonal_elements)[i] = index_[i][i]; } return true; }
pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx testq %rsi, %rsi je 0xb6c2 movq %rdi, %r14 movq 0x8(%rbx), %rax subq (%rbx), %rax sarq $0x3, %rax movl 0x8(%rdi), %edx movslq %edx, %rsi cmpq %rsi, %rax je 0xb69d movq %rbx, %rdi callq 0x8112 movl 0x8(%r14), %edx testl %edx, %edx jle 0xb6c2 movq 0x28(%r14), %rax movq (%rbx), %rcx movl %edx, %edx xorl %esi, %esi movq (%rax,%rsi,8), %rdi movsd (%rdi,%rsi,8), %xmm0 movsd %xmm0, (%rcx,%rsi,8) incq %rsi cmpq %rsi, %rdx jne 0xb6ac testq %rbx, %rbx setne %al addq $0x8, %rsp popq %rbx popq %r14 retq
/sp-nitech[P]SPTK/src/math/symmetric_matrix.cc
test_gzio
void test_gzio(fname, uncompr, uncomprLen) const char *fname; /* compressed file name */ Byte *uncompr; uLong uncomprLen; { #ifdef NO_GZCOMPRESS fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n"); #else int err; int len = (int)strlen(hello)+1; gzFile file; z_off_t pos; file = gzopen(fname, "wb"); if (file == NULL) { fprintf(stderr, "gzopen error\n"); exit(1); } gzputc(file, 'h'); if (gzputs(file, "ello") != 4) { fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err)); exit(1); } if (gzprintf(file, ", %s!", "hello") != 8) { fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err)); exit(1); } gzseek(file, 1L, SEEK_CUR); /* add one zero byte */ gzclose(file); file = gzopen(fname, "rb"); if (file == NULL) { fprintf(stderr, "gzopen error\n"); exit(1); } strcpy((char*)uncompr, "garbage"); if (gzread(file, uncompr, (unsigned)uncomprLen) != len) { fprintf(stderr, "gzread err: %s\n", gzerror(file, &err)); exit(1); } if (strcmp((char*)uncompr, hello)) { fprintf(stderr, "bad gzread: %s\n", (char*)uncompr); exit(1); } else { printf("gzread(): %s\n", (char*)uncompr); } pos = gzseek(file, -8L, SEEK_CUR); if (pos != 6 || gztell(file) != pos) { fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n", (long)pos, (long)gztell(file)); exit(1); } if (gzgetc(file) != ' ') { fprintf(stderr, "gzgetc error\n"); exit(1); } if (gzungetc(' ', file) != ' ') { fprintf(stderr, "gzungetc error\n"); exit(1); } gzgets(file, (char*)uncompr, (int)uncomprLen); if (strlen((char*)uncompr) != 7) { /* " hello!" */ fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err)); exit(1); } if (strcmp((char*)uncompr, hello + 6)) { fprintf(stderr, "bad gzgets after gzseek\n"); exit(1); } else { printf("gzgets() after gzseek: %s\n", (char*)uncompr); } gzclose(file); #endif }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 leaq 0x44db(%rip), %rdi # 0x7140 callq 0x20e0 movq %rax, %r12 leaq 0x13d1(%rip), %rsi # 0x4045 movq %r15, %rdi callq 0x2170 testq %rax, %rax je 0x2e35 movq %rax, %r13 movq %rax, %rdi movl $0x68, %esi callq 0x21c0 leaq 0x13ba(%rip), %rsi # 0x4056 movq %r13, %rdi callq 0x2190 cmpl $0x4, %eax jne 0x2e3a leaq 0x13b7(%rip), %rsi # 0x406b leaq 0x1349(%rip), %rdx # 0x4004 movq %r13, %rdi xorl %eax, %eax callq 0x20c0 cmpl $0x8, %eax jne 0x2e47 movl $0x1, %esi movq %r13, %rdi movl $0x1, %edx callq 0x20a0 movq %r13, %rdi callq 0x2030 leaq 0x1394(%rip), %rsi # 0x4083 movq %r15, %rdi callq 0x2170 testq %rax, %rax je 0x2e54 movq %rax, %r15 incl %r12d movabsq $0x65676162726167, %rax # imm = 0x65676162726167 movq %rax, (%rbx) movq %r15, %rdi movq %rbx, %rsi movl %r14d, %edx callq 0x2150 cmpl %r12d, %eax jne 0x2e59 leaq 0x440f(%rip), %rsi # 0x7140 movq %rbx, %rdi callq 0x2130 testl %eax, %eax jne 0x2e66 leaq 0x135e(%rip), %rdi # 0x40a6 movq %rbx, %rsi xorl %eax, %eax callq 0x20f0 movq %r15, %rdi movq $-0x8, %rsi movl $0x1, %edx callq 0x20a0 movq %rax, %r12 cmpq $0x6, %rax jne 0x2e2a movq %r15, %rdi callq 0x2220 cmpq $0x6, %rax jne 0x2e2a movl (%r15), %eax testl %eax, %eax je 0x2da6 decl %eax movl %eax, (%r15) incq 0x10(%r15) movq 0x8(%r15), %rax leaq 0x1(%rax), %rcx movq %rcx, 0x8(%r15) movzbl (%rax), %eax jmp 0x2dae movq %r15, %rdi callq 0x2090 cmpl $0x20, %eax jne 0x2e6e movl $0x20, %edi movq %r15, %rsi callq 0x20b0 cmpl $0x20, %eax jne 0x2e73 movq %r15, %rdi movq %rbx, %rsi movl %r14d, %edx callq 0x2080 movq %rbx, %rdi callq 0x20e0 cmpq $0x7, %rax jne 0x2e78 leaq 0x4352(%rip), %rsi # 0x7146 movq %rbx, %rdi callq 0x2130 testl %eax, %eax jne 0x2e85 leaq 0x1320(%rip), %rdi # 0x412b movq %rbx, %rsi xorl %eax, %eax callq 0x20f0 movq %r15, %rdi addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x2030 movq %r15, %rdi movq %r12, %rsi callq 0x2391 callq 0x2486 leaq 0xc(%rsp), %rsi movq %r13, %rdi callq 0x22e9 leaq 0xc(%rsp), %rsi movq %r13, %rdi callq 0x2315 callq 0x2461 leaq 0xc(%rsp), %rsi movq %r15, %rdi callq 0x2341 movq %rbx, %rdi callq 0x236d callq 0x23c6 callq 0x23eb leaq 0xc(%rsp), %rsi movq %r15, %rdi callq 0x2410 callq 0x243c
/coapp-packages[P]zlib/test/example.c
test_deflate
void test_deflate(compr, comprLen) Byte *compr; uLong comprLen; { z_stream c_stream; /* compression stream */ int err; uLong len = (uLong)strlen(hello)+1; c_stream.zalloc = zalloc; c_stream.zfree = zfree; c_stream.opaque = (voidpf)0; err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION); CHECK_ERR(err, "deflateInit"); c_stream.next_in = (z_const unsigned char *)hello; c_stream.next_out = compr; while (c_stream.total_in != len && c_stream.total_out < comprLen) { c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */ err = deflate(&c_stream, Z_NO_FLUSH); CHECK_ERR(err, "deflate"); } /* Finish the stream, still forcing small buffers: */ for (;;) { c_stream.avail_out = 1; err = deflate(&c_stream, Z_FINISH); if (err == Z_STREAM_END) break; CHECK_ERR(err, "deflate"); } err = deflateEnd(&c_stream); CHECK_ERR(err, "deflateEnd"); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rsi, %rbx movq %rdi, %r15 leaq 0x429b(%rip), %r12 # 0x7140 movq %r12, %rdi callq 0x20e0 movq %rax, %r14 xorps %xmm0, %xmm0 leaq 0x8(%rsp), %rdi movups %xmm0, 0x40(%rdi) movq $0x0, 0x50(%rdi) leaq 0x127b(%rip), %rdx # 0x4146 movl $0xffffffff, %esi # imm = 0xFFFFFFFF movl $0x70, %ecx callq 0x2140 testl %eax, %eax jne 0x2f65 incq %r14 leaq 0x8(%rsp), %r13 movq %r12, (%r13) movq %r15, 0x18(%r13) movl $0x1, %ebp cmpq %r14, 0x18(%rsp) je 0x2f22 cmpq %rbx, 0x30(%rsp) jae 0x2f22 movl %ebp, 0x28(%rsp) movl %ebp, 0x10(%rsp) movq %r13, %rdi xorl %esi, %esi callq 0x2100 testl %eax, %eax je 0x2ef7 movl %eax, %edi callq 0x2529 leaq 0x8(%rsp), %rdi movl $0x1, 0x20(%rdi) movl $0x4, %esi callq 0x2100 testl %eax, %eax je 0x2f22 cmpl $0x1, %eax jne 0x2f5e leaq 0x8(%rsp), %rdi callq 0x21d0 testl %eax, %eax jne 0x2f6c addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x24ff movl %eax, %edi callq 0x24ab movl %eax, %edi callq 0x24d5
/coapp-packages[P]zlib/test/example.c
test_inflate
void test_inflate(compr, comprLen, uncompr, uncomprLen) Byte *compr, *uncompr; uLong comprLen, uncomprLen; { int err; z_stream d_stream; /* decompression stream */ strcpy((char*)uncompr, "garbage"); d_stream.zalloc = zalloc; d_stream.zfree = zfree; d_stream.opaque = (voidpf)0; d_stream.next_in = compr; d_stream.avail_in = 0; d_stream.next_out = uncompr; err = inflateInit(&d_stream); CHECK_ERR(err, "inflateInit"); while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) { d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */ err = inflate(&d_stream, Z_NO_FLUSH); if (err == Z_STREAM_END) break; CHECK_ERR(err, "inflate"); } err = inflateEnd(&d_stream); CHECK_ERR(err, "inflateEnd"); if (strcmp((char*)uncompr, hello)) { fprintf(stderr, "bad inflate\n"); exit(1); } else { printf("inflate(): %s\n", (char *)uncompr); } }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x70, %rsp movq %rcx, %r14 movq %rdx, %rbx movq %rsi, %r15 movabsq $0x65676162726167, %rax # imm = 0x65676162726167 movq %rax, (%rdx) xorps %xmm0, %xmm0 movq %rsp, %rax movups %xmm0, 0x40(%rax) movq $0x0, 0x50(%rax) movq %rdi, (%rax) movl $0x0, 0x8(%rax) movq %rdx, 0x18(%rax) leaq 0x118a(%rip), %rsi # 0x4146 movq %rax, %rdi movl $0x70, %edx callq 0x21e0 testl %eax, %eax jne 0x3042 movl $0x1, %ebp movq %rsp, %r12 cmpq %r14, 0x28(%rsp) jae 0x2ffe cmpq %r15, 0x10(%rsp) jae 0x2ffe movl %ebp, 0x20(%rsp) movl %ebp, 0x8(%rsp) movq %r12, %rdi xorl %esi, %esi callq 0x2060 testl %eax, %eax je 0x2fd5 cmpl $0x1, %eax jne 0x303b movq %rsp, %rdi callq 0x2180 testl %eax, %eax jne 0x3049 leaq 0x412f(%rip), %rsi # 0x7140 movq %rbx, %rdi callq 0x2130 testl %eax, %eax jne 0x3050 leaq 0x116b(%rip), %rdi # 0x418f movq %rbx, %rsi xorl %eax, %eax callq 0x20f0 addq $0x70, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl %eax, %edi callq 0x25cc movl %eax, %edi callq 0x2553 movl %eax, %edi callq 0x257d callq 0x25a7
/coapp-packages[P]zlib/test/example.c
test_large_deflate
void test_large_deflate(compr, comprLen, uncompr, uncomprLen) Byte *compr, *uncompr; uLong comprLen, uncomprLen; { z_stream c_stream; /* compression stream */ int err; c_stream.zalloc = zalloc; c_stream.zfree = zfree; c_stream.opaque = (voidpf)0; err = deflateInit(&c_stream, Z_BEST_SPEED); CHECK_ERR(err, "deflateInit"); c_stream.next_out = compr; c_stream.avail_out = (uInt)comprLen; /* At this point, uncompr is still mostly zeroes, so it should compress * very well: */ c_stream.next_in = uncompr; c_stream.avail_in = (uInt)uncomprLen; err = deflate(&c_stream, Z_NO_FLUSH); CHECK_ERR(err, "deflate"); if (c_stream.avail_in != 0) { fprintf(stderr, "deflate not greedy\n"); exit(1); } /* Feed in already compressed data and switch to no compression: */ deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY); c_stream.next_in = compr; c_stream.avail_in = (uInt)comprLen/2; err = deflate(&c_stream, Z_NO_FLUSH); CHECK_ERR(err, "deflate"); /* Switch back to compressing mode: */ deflateParams(&c_stream, Z_BEST_COMPRESSION, Z_FILTERED); c_stream.next_in = uncompr; c_stream.avail_in = (uInt)uncomprLen; err = deflate(&c_stream, Z_NO_FLUSH); CHECK_ERR(err, "deflate"); err = deflate(&c_stream, Z_FINISH); if (err != Z_STREAM_END) { fprintf(stderr, "deflate should report Z_STREAM_END\n"); exit(1); } err = deflateEnd(&c_stream); CHECK_ERR(err, "deflateEnd"); }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x70, %rsp movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 xorps %xmm0, %xmm0 movq %rsp, %rdi movups %xmm0, 0x40(%rdi) movq $0x0, 0x50(%rdi) leaq 0x10bf(%rip), %rdx # 0x4146 movl $0x1, %esi movl $0x70, %ecx callq 0x2140 testl %eax, %eax jne 0x3147 movq %rsp, %rdi movq %r12, 0x18(%rdi) movl %r15d, 0x20(%rdi) movq %r14, (%rdi) movl %ebx, 0x8(%rdi) xorl %esi, %esi callq 0x2100 testl %eax, %eax jne 0x314e cmpl $0x0, 0x8(%rsp) jne 0x3155 movq %rsp, %r13 movq %r13, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x2110 movq %r12, (%r13) shrl %r15d movl %r15d, 0x8(%r13) movq %r13, %rdi xorl %esi, %esi callq 0x2100 testl %eax, %eax jne 0x315a movq %rsp, %r15 movq %r15, %rdi movl $0x9, %esi movl $0x1, %edx callq 0x2110 movq %r14, (%r15) movl %ebx, 0x8(%r15) movq %r15, %rdi xorl %esi, %esi callq 0x2100 testl %eax, %eax jne 0x3161 movq %rsp, %rdi movl $0x4, %esi callq 0x2100 cmpl $0x1, %eax jne 0x3168 movq %rsp, %rdi callq 0x21d0 testl %eax, %eax jne 0x316d addq $0x70, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl %eax, %edi callq 0x25f6 movl %eax, %edi callq 0x2620 callq 0x264a movl %eax, %edi callq 0x266f movl %eax, %edi callq 0x2699 callq 0x26c3 movl %eax, %edi callq 0x26e8
/coapp-packages[P]zlib/test/example.c
test_dict_deflate
void test_dict_deflate(compr, comprLen) Byte *compr; uLong comprLen; { z_stream c_stream; /* compression stream */ int err; c_stream.zalloc = zalloc; c_stream.zfree = zfree; c_stream.opaque = (voidpf)0; err = deflateInit(&c_stream, Z_BEST_COMPRESSION); CHECK_ERR(err, "deflateInit"); err = deflateSetDictionary(&c_stream, (const Bytef*)dictionary, (int)sizeof(dictionary)); CHECK_ERR(err, "deflateSetDictionary"); dictId = c_stream.adler; c_stream.next_out = compr; c_stream.avail_out = (uInt)comprLen; c_stream.next_in = (z_const unsigned char *)hello; c_stream.avail_in = (uInt)strlen(hello)+1; err = deflate(&c_stream, Z_FINISH); if (err != Z_STREAM_END) { fprintf(stderr, "deflate should report Z_STREAM_END\n"); exit(1); } err = deflateEnd(&c_stream); CHECK_ERR(err, "deflateEnd"); }
pushq %r15 pushq %r14 pushq %rbx subq $0x70, %rsp movq %rsi, %rbx movq %rdi, %r14 xorps %xmm0, %xmm0 movq %rsp, %rdi movups %xmm0, 0x40(%rdi) movq $0x0, 0x50(%rdi) leaq 0xd31(%rip), %rdx # 0x4146 movl $0x9, %esi movl $0x70, %ecx callq 0x2140 testl %eax, %eax jne 0x3493 leaq 0xbd5(%rip), %rsi # 0x4004 movq %rsp, %rdi movl $0x6, %edx callq 0x2240 testl %eax, %eax jne 0x349a movq %rsp, %r15 movq 0x60(%r15), %rax movq %rax, 0x3d0a(%rip) # 0x7158 movq %r14, 0x18(%r15) movl %ebx, 0x20(%r15) leaq 0x3ce3(%rip), %rdi # 0x7140 movq %rdi, (%r15) callq 0x20e0 incl %eax movl %eax, 0x8(%r15) movq %r15, %rdi movl $0x4, %esi callq 0x2100 cmpl $0x1, %eax jne 0x34a1 movq %rsp, %rdi callq 0x21d0 testl %eax, %eax jne 0x34a6 addq $0x70, %rsp popq %rbx popq %r14 popq %r15 retq movl %eax, %edi callq 0x28ff movl %eax, %edi callq 0x2929 callq 0x2953 movl %eax, %edi callq 0x2978
/coapp-packages[P]zlib/test/example.c
test_dict_inflate
void test_dict_inflate(compr, comprLen, uncompr, uncomprLen) Byte *compr, *uncompr; uLong comprLen, uncomprLen; { int err; z_stream d_stream; /* decompression stream */ strcpy((char*)uncompr, "garbage"); d_stream.zalloc = zalloc; d_stream.zfree = zfree; d_stream.opaque = (voidpf)0; d_stream.next_in = compr; d_stream.avail_in = (uInt)comprLen; err = inflateInit(&d_stream); CHECK_ERR(err, "inflateInit"); d_stream.next_out = uncompr; d_stream.avail_out = (uInt)uncomprLen; for (;;) { err = inflate(&d_stream, Z_NO_FLUSH); if (err == Z_STREAM_END) break; if (err == Z_NEED_DICT) { if (d_stream.adler != dictId) { fprintf(stderr, "unexpected dictionary"); exit(1); } err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary, (int)sizeof(dictionary)); } CHECK_ERR(err, "inflate with dict"); } err = inflateEnd(&d_stream); CHECK_ERR(err, "inflateEnd"); if (strcmp((char*)uncompr, hello)) { fprintf(stderr, "bad inflate with dict\n"); exit(1); } else { printf("inflate with dictionary: %s\n", (char *)uncompr); } }
pushq %r15 pushq %r14 pushq %rbx subq $0x70, %rsp movq %rcx, %r15 movq %rdx, %rbx movabsq $0x65676162726167, %rax # imm = 0x65676162726167 movq %rax, (%rdx) xorps %xmm0, %xmm0 movq %rsp, %rax movups %xmm0, 0x40(%rax) movq $0x0, 0x50(%rax) movq %rdi, (%rax) movl %esi, 0x8(%rax) leaq 0xc5e(%rip), %rsi # 0x4146 movq %rax, %rdi movl $0x70, %edx callq 0x21e0 testl %eax, %eax jne 0x358d movq %rsp, %r14 movq %rbx, 0x18(%r14) movl %r15d, 0x20(%r14) leaq 0xaf5(%rip), %r15 # 0x4004 movq %r14, %rdi xorl %esi, %esi callq 0x2060 cmpl $0x2, %eax je 0x3525 cmpl $0x1, %eax jne 0x3543 jmp 0x354e movq 0x60(%rsp), %rax cmpq 0x3c27(%rip), %rax # 0x7158 jne 0x3588 movq %r14, %rdi movq %r15, %rsi movl $0x6, %edx callq 0x21a0 testl %eax, %eax je 0x350f movl %eax, %edi callq 0x2a40 movq %rsp, %rdi callq 0x2180 testl %eax, %eax jne 0x3594 leaq 0x3bdf(%rip), %rsi # 0x7140 movq %rbx, %rdi callq 0x2130 testl %eax, %eax jne 0x359b leaq 0xd26(%rip), %rdi # 0x429a movq %rbx, %rsi xorl %eax, %eax callq 0x20f0 addq $0x70, %rsp popq %rbx popq %r14 popq %r15 retq callq 0x29cc movl %eax, %edi callq 0x29a2 movl %eax, %edi callq 0x29f1 callq 0x2a1b
/coapp-packages[P]zlib/test/example.c
main
int main(argc, argv) int argc; char *argv[]; { Byte *compr, *uncompr; uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */ uLong uncomprLen = comprLen; static const char* myVersion = ZLIB_VERSION; if (zlibVersion()[0] != myVersion[0]) { fprintf(stderr, "incompatible zlib version\n"); exit(1); } else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) { fprintf(stderr, "warning: different zlib version\n"); } printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n", ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags()); compr = (Byte*)calloc((uInt)comprLen, 1); uncompr = (Byte*)calloc((uInt)uncomprLen, 1); /* compr and uncompr are cleared to avoid reading uninitialized * data and to ensure that uncompr compresses well. */ if (compr == Z_NULL || uncompr == Z_NULL) { printf("out of memory\n"); exit(1); } #ifdef Z_SOLO argc = strlen(argv[0]); #else test_compress(compr, comprLen, uncompr, uncomprLen); test_gzio((argc > 1 ? argv[1] : TESTFILE), uncompr, uncomprLen); #endif test_deflate(compr, comprLen); test_inflate(compr, comprLen, uncompr, uncomprLen); test_large_deflate(compr, comprLen, uncompr, uncomprLen); test_large_inflate(compr, comprLen, uncompr, uncomprLen); test_flush(compr, &comprLen); test_sync(compr, comprLen, uncompr, uncomprLen); comprLen = uncomprLen; test_dict_deflate(compr, comprLen); test_dict_inflate(compr, comprLen, uncompr, uncomprLen); free(compr); free(uncompr); return 0; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r15 movl %edi, %ebp movq $0x9c40, (%rsp) # imm = 0x9C40 callq 0x21f0 cmpb $0x31, (%rax) jne 0x3727 callq 0x21f0 leaq 0xb78(%rip), %rsi # 0x4146 movq %rax, %rdi callq 0x2130 testl %eax, %eax jne 0x371d callq 0x2230 leaq 0xd09(%rip), %rdi # 0x42f3 leaq 0xb55(%rip), %rsi # 0x4146 movl $0x1280, %edx # imm = 0x1280 movq %rax, %rcx xorl %eax, %eax callq 0x20f0 movl $0x9c40, %edi # imm = 0x9C40 movl $0x1, %esi callq 0x2120 movq %rax, %rbx movl $0x9c40, %edi # imm = 0x9C40 movl $0x1, %esi callq 0x2120 testq %rbx, %rbx je 0x372c movq %rax, %r14 testq %rax, %rax je 0x372c movl $0x9c40, %esi # imm = 0x9C40 movl $0x9c40, %ecx # imm = 0x9C40 movq %rbx, %rdi movq %r14, %rdx callq 0x2b9c cmpl $0x2, %ebp jl 0x3656 movq 0x8(%r15), %rdi jmp 0x365d leaq 0xcc7(%rip), %rdi # 0x4324 movl $0x9c40, %edx # imm = 0x9C40 movq %r14, %rsi callq 0x2c48 movl $0x9c40, %esi # imm = 0x9C40 movq %rbx, %rdi callq 0x2e8a movl $0x9c40, %esi # imm = 0x9C40 movl $0x9c40, %ecx # imm = 0x9C40 movq %rbx, %rdi movq %r14, %rdx callq 0x2f73 movl $0x9c40, %esi # imm = 0x9C40 movl $0x9c40, %ecx # imm = 0x9C40 movq %rbx, %rdi movq %r14, %rdx callq 0x3055 movl $0x9c40, %esi # imm = 0x9C40 movl $0x9c40, %ecx # imm = 0x9C40 movq %rbx, %rdi movq %r14, %rdx callq 0x3174 movq %rsp, %r15 movq %rbx, %rdi movq %r15, %rsi callq 0x323a movq (%r15), %rsi movl $0x9c40, %ecx # imm = 0x9C40 movq %rbx, %rdi movq %r14, %rdx callq 0x330f movq $0x9c40, (%r15) # imm = 0x9C40 movl $0x9c40, %esi # imm = 0x9C40 movq %rbx, %rdi callq 0x33ed movl $0x9c40, %esi # imm = 0x9C40 movl $0x9c40, %ecx # imm = 0x9C40 movq %rbx, %rdi movq %r14, %rdx callq 0x34ad movq %rbx, %rdi callq 0x2040 movq %r14, %rdi callq 0x2040 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x2a8f jmp 0x35de callq 0x2a6a leaq 0xc0c(%rip), %rdi # 0x433f callq 0x2070 movl $0x1, %edi callq 0x2200
/coapp-packages[P]zlib/test/example.c
ted_ub::LGMTreeIndex<cost_model::UnitCostModelLD<label::StringLabel>, node::TreeIndexLGM>::ted_k(node::TreeIndexLGM const&, node::TreeIndexLGM const&, int)
double LGMTreeIndex<CostModel, TreeIndex>::ted_k(const TreeIndex& t1, const TreeIndex& t2, const int k) { // Initialize the internals. init(t2); // We don't compute the upper bound for node pairs with size lower bound // greater than threshold. if (std::abs(t1.tree_size_ - t2.tree_size_) > k) { return std::numeric_limits<double>::infinity(); } return mapping_cost(t1, t2, lb_mapping_fill_gaps(t1, t2, k)); }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movl %ecx, %ebp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq %rdx, %rsi callq 0x5c10 movl (%r14), %eax subl (%rbx), %eax movl %eax, %ecx negl %ecx cmovsl %eax, %ecx cmpl %ebp, %ecx jle 0x6281 movsd 0x4d89(%rip), %xmm0 # 0xb008 jmp 0x62cc leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx movl %ebp, %r8d callq 0x63aa movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx movq %r12, %rcx callq 0x62fc movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x62cc movq 0x18(%rsp), %rsi subq %rdi, %rsi movsd %xmm0, (%rsp) callq 0x2200 movsd (%rsp), %xmm0 addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x62f3 movq 0x18(%rsp), %rsi subq %rdi, %rsi callq 0x2200 movq %rbx, %rdi callq 0x2350 nop
/DatabaseGroup[P]tree-similarity/src/ted_ub/lgm_tree_index_impl.h
main
void tst_qpromise_timeout::fulfilled() { QElapsedTimer timer; qint64 elapsed = -1; timer.start(); auto p = QtPromise::QPromise<int>{[](const QtPromise::QPromiseResolve<int>& resolve) { QTimer::singleShot(1000, [=]() { resolve(42); }); }}.timeout(2000) .finally([&]() { elapsed = timer.elapsed(); }); QCOMPARE(waitForValue(p, -1), 42); QCOMPARE(p.isFulfilled(), true); QVERIFY(elapsed < 2000); }
pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl $0x0, -0x4(%rbp) movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) callq 0x17200 movq -0x10(%rbp), %rdx leaq -0x20(%rbp), %rdi leaq -0x8(%rbp), %rsi movl $0x60204, %ecx # imm = 0x60204 callq 0x43b0 movl $0x8, %edi movl $0x1, %esi callq 0x4350 jmp 0x4512 leaq -0x40(%rbp), %rdi callq 0x17210 jmp 0x451d leaq 0x24318(%rip), %rdi # 0x2883c leaq 0x24389(%rip), %rsi # 0x288b4 callq 0x4210 jmp 0x4532 movl -0x8(%rbp), %esi movq -0x10(%rbp), %rdx leaq -0x40(%rbp), %rdi callq 0x4130 movl %eax, -0x44(%rbp) jmp 0x4547 movl -0x44(%rbp), %eax movl %eax, -0x4(%rbp) leaq -0x40(%rbp), %rdi callq 0x17250 leaq -0x20(%rbp), %rdi callq 0x4330 movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x28(%rbp) movl %eax, -0x2c(%rbp) jmp 0x458b movq %rax, %rcx movl %edx, %eax movq %rcx, -0x28(%rbp) movl %eax, -0x2c(%rbp) leaq -0x40(%rbp), %rdi callq 0x17250 leaq -0x20(%rbp), %rdi callq 0x4330 movq -0x28(%rbp), %rdi callq 0x4200 nopl (%rax)
/simonbrunel[P]qtpromise/tests/auto/qtpromise/qpromise/tst_timeout.cpp
void QtPromisePrivate::qtpromise_defer<QtPromisePrivate::PromiseDataBase<void, void ()>::dispatch()::'lambda'()>(QtPromisePrivate::PromiseDataBase<void, void ()>::dispatch()::'lambda'()&&, QPointer<QThread> const&)
static void qtpromise_defer(F&& f, const QPointer<QThread>& thread) { using FType = typename std::decay<F>::type; struct Event : public QEvent { Event(FType&& f) : QEvent{QEvent::None}, m_f{std::move(f)} { } Event(const FType& f) : QEvent{QEvent::None}, m_f{f} { } ~Event() override { m_f(); } FType m_f; }; if (!thread || thread->isFinished()) { // Make sure to not call `f` if the captured thread doesn't exist anymore, // which would potentially result in dispatching to the wrong thread (ie. // nullptr == current thread). Since the target thread is gone, it should // be safe to simply skip that notification. return; } QObject* target = QAbstractEventDispatcher::instance(thread); if (!target && QCoreApplication::closingDown()) { // When the app is shutting down, the even loop is not anymore available // so we don't have any way to dispatch `f`. This case can happen when a // promise is resolved after the app is requested to close, in which case // we should not trigger any error and skip that notification. return; } Q_ASSERT_X(target, "postMetaCall", "Target thread must have an event loop"); QCoreApplication::postEvent(target, new Event{std::forward<F>(f)}); }
pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x19660 cmpq $0x0, %rax je 0x6f36 movq -0x10(%rbp), %rdi callq 0x19680 movq %rax, %rdi callq 0x4280 testb $0x1, %al jne 0x6f36 jmp 0x6f38 jmp 0x6f97 movq -0x10(%rbp), %rdi callq 0x19660 movq %rax, %rdi callq 0x4250 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x6f61 callq 0x43a0 testb $0x1, %al jne 0x6f5f jmp 0x6f61 jmp 0x6f97 movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movl $0x38, %edi callq 0x40a0 movq %rax, %rdi movq %rdi, %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rsi callq 0x6fc0 jmp 0x6f88 movq -0x30(%rbp), %rsi movq -0x38(%rbp), %rdi xorl %edx, %edx callq 0x40d0 addq $0x40, %rsp popq %rbp retq movq -0x30(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) movl $0x38, %esi callq 0x4070 movq -0x20(%rbp), %rdi callq 0x4200
/simonbrunel[P]qtpromise/include/../src/qtpromise/qpromise_p.h
sx__default_assert_handler
static void sx__default_assert_handler(const char* text, const char* sourcefile, uint32_t line) { char output_text[2048]; if (sourcefile) { sx_snprintf(output_text, sizeof(output_text), "%s(%d): ASSERT FAILURE - ", sourcefile, line); } else { sx_strcpy(output_text, sizeof(output_text), "ASSERT FAILURE - "); } char* endptr = sx_strcat(output_text, sizeof(output_text), text); sx_unused(endptr); // print #if SX_PLATFORM_ANDROID __android_log_write(ANDROID_LOG_DEBUG, "", output_text); #elif SX_PLATFORM_WINDOWS sx_strcat(endptr, sizeof(output_text), "\n"); OutputDebugStringA(output_text); #else fputs(output_text, stderr); fflush(stderr); #endif }
pushq %r14 pushq %rbx subq $0x808, %rsp # imm = 0x808 movq %rdi, %rbx testq %rsi, %rsi jne 0x457a leaq 0xacb2(%rip), %rdx # 0xf21d movq %rsp, %rdi movl $0x800, %esi # imm = 0x800 callq 0x8d82 jmp 0x4596 movl %edx, %r8d movq %rsi, %rcx leaq 0xac8e(%rip), %rdx # 0xf215 movq %rsp, %rdi movl $0x800, %esi # imm = 0x800 xorl %eax, %eax callq 0x6b8e movq %rsp, %r14 movq %r14, %rdi movl $0x800, %esi # imm = 0x800 movq %rbx, %rdx callq 0x908a movq 0xea48(%rip), %rbx # 0x12ff8 movq (%rbx), %rsi movq %r14, %rdi callq 0x4190 movq (%rbx), %rdi callq 0x42f0 addq $0x808, %rsp # imm = 0x808 popq %rbx popq %r14 retq nop
/septag[P]sx/src/sx.c
sx__malloc_cb
static void* sx__malloc_cb(void* ptr, size_t size, uint32_t align, const char* file, const char* func, uint32_t line, void* user_data) { sx_unused(user_data); sx_unused(line); sx_unused(func); sx_unused(file); if (size == 0) { if (ptr) { if (align <= SX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT) { free(ptr); return NULL; } #if SX_COMPILER_MSVC _aligned_free(ptr); #else sx__aligned_free(&g_alloc_malloc, ptr, file, func, line); #endif } return NULL; } else if (ptr == NULL) { if (align <= SX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT) return malloc(size); #if SX_COMPILER_MSVC return _aligned_malloc(size, align); #else return sx__aligned_alloc(&g_alloc_malloc, size, align, file, func, line); #endif } else { if (align <= SX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT) return realloc(ptr, size); #if SX_COMPILER_MSVC return _aligned_realloc(ptr, size, align); #else return sx__aligned_realloc(&g_alloc_malloc, ptr, size, align, file, func, line); #endif } }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx testq %rsi, %rsi je 0x49dd movq %rsi, %r14 testq %rbx, %rbx je 0x49fc cmpl $0x8, %edx ja 0x4a12 movq %rbx, %rdi movq %r14, %rsi popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x4320 testq %rbx, %rbx je 0x49f5 cmpl $0x8, %edx jbe 0x49ed movl -0x4(%rbx), %eax subq %rax, %rbx movq %rbx, %rdi callq 0x4040 xorl %ebx, %ebx jmp 0x4aff cmpl $0x8, %edx ja 0x4a4c movq %r14, %rdi popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x42d0 movl -0x4(%rbx), %r12d movq %rbx, %rdi subq %r12, %rdi cmpl $0x9, %edx movl $0x8, %r15d cmovgel %edx, %r15d leaq (%r14,%r15), %rsi addq $0x4, %rsi je 0x4a78 callq 0x4320 testq %rax, %rax je 0x4a7d movq %rax, %r13 decl %r15d addq %r15, %rax addq $0x4, %rax jmp 0x4aa2 movl $0x8, %ebx cmovgl %edx, %ebx addq %rbx, %r14 addq $0x4, %r14 je 0x4acd movq %r14, %rdi callq 0x42d0 testq %rax, %rax je 0x4acd movq %rax, %r14 decl %ebx addq %rbx, %rax addq $0x4, %rax jmp 0x4af1 callq 0x4040 leaq 0x9642(%rip), %rdi # 0xe0c6 leaq 0xa97a(%rip), %rdx # 0xf405 xorl %r13d, %r13d movl $0xcd, %esi xorl %eax, %eax callq 0xc102 int3 decl %r15d leaq 0x4(%r15), %rax notq %r15 andq %rax, %r15 cmpq %rbx, %r15 je 0x4aff addq %r13, %r12 movq %r15, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x4350 movl %r15d, %eax subl %r13d, %eax movl %eax, -0x4(%r15) movq %r15, %rbx jmp 0x4aff leaq 0x95f2(%rip), %rdi # 0xe0c6 leaq 0xa92a(%rip), %rdx # 0xf405 xorl %r14d, %r14d movl $0xb0, %esi xorl %eax, %eax callq 0xc102 int3 decl %ebx leaq 0x4(%rbx), %rax notq %rbx andq %rax, %rbx movl %ebx, %eax subl %r14d, %eax movl %eax, -0x4(%rbx) movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
/septag[P]sx/src/allocator.c
sx__malloc_leakd_cb
static void* sx__malloc_leakd_cb(void* ptr, size_t size, uint32_t align, const char* file, const char* func, uint32_t line, void* user_data) { sx_unused(user_data); if (size == 0) { if (ptr) { if (align <= SX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT) { stb_leakcheck_free(ptr); return NULL; } sx__aligned_free(&g_alloc_malloc_leakd, ptr, file, func, line); } return NULL; } else if (ptr == NULL) { if (align <= SX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT) return stb_leakcheck_malloc(size, file, func, (int)line); return sx__aligned_alloc(&g_alloc_malloc_leakd, size, align, file, func, line); } else { if (align <= SX_CONFIG_ALLOCATOR_NATURAL_ALIGNMENT) return stb_leakcheck_realloc(ptr, size, file, func, (int)line); return sx__aligned_realloc(&g_alloc_malloc_leakd, ptr, size, align, file, func, line); } }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx testq %rsi, %rsi je 0x4b74 movq %rsi, %r14 testq %rbx, %rbx je 0x4b93 cmpl $0x8, %edx ja 0x4bb6 cmpq %r14, -0x18(%rbx) jae 0x4ca5 movq %r14, %rdi movq %rcx, %rsi movq %r8, %rdx movl %r9d, %ecx callq 0x4d55 testq %rax, %rax je 0x4b8c movq %rax, %r14 movq -0x18(%rbx), %rdx movq %rax, %rdi movq %rbx, %rsi callq 0x4290 movq %rbx, %rdi callq 0x4cb6 movq %r14, %rbx jmp 0x4ca5 testq %rbx, %rbx je 0x4b8c cmpl $0x8, %edx jbe 0x4b84 movl -0x4(%rbx), %eax subq %rax, %rbx movq %rbx, %rdi callq 0x4cb6 xorl %ebx, %ebx jmp 0x4ca5 cmpl $0x8, %edx ja 0x4bf1 movq %r14, %rdi movq %rcx, %rsi movq %r8, %rdx movl %r9d, %ecx addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0x4d55 movl -0x4(%rbx), %r12d movq %rbx, %rdi subq %r12, %rdi cmpl $0x9, %edx movl $0x8, %r15d cmovgel %edx, %r15d leaq (%r14,%r15), %rsi addq $0x4, %rsi xorl %edx, %edx callq 0x4b0c movq %rax, %r13 testq %rax, %rax je 0x4c26 decl %r15d leaq (%r15,%r13), %rax addq $0x4, %rax jmp 0x4c48 movl $0x8, %ebx cmovgl %edx, %ebx addq %rbx, %r14 addq $0x4, %r14 je 0x4c73 movq %r14, %rdi movq %rcx, %rsi movq %r8, %rdx movl %r9d, %ecx callq 0x4d55 testq %rax, %rax je 0x4c73 movq %rax, %r14 decl %ebx addq %rbx, %rax addq $0x4, %rax jmp 0x4c97 leaq 0x9499(%rip), %rdi # 0xe0c6 leaq 0xa7d1(%rip), %rdx # 0xf405 movl $0xcd, %esi xorl %eax, %eax callq 0xc102 int3 decl %r15d leaq 0x4(%r15), %rax notq %r15 andq %rax, %r15 cmpq %rbx, %r15 je 0x4ca5 addq %r13, %r12 movq %r15, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x4350 movl %r15d, %eax subl %r13d, %eax movl %eax, -0x4(%r15) movq %r15, %rbx jmp 0x4ca5 leaq 0x944c(%rip), %rdi # 0xe0c6 leaq 0xa784(%rip), %rdx # 0xf405 xorl %r14d, %r14d movl $0xb0, %esi xorl %eax, %eax callq 0xc102 int3 decl %ebx leaq 0x4(%rbx), %rax notq %rbx andq %rax, %rbx movl %ebx, %eax subl %r14d, %eax movl %eax, -0x4(%rbx) movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
/septag[P]sx/src/allocator.c
sx_os_dlopen
void* sx_os_dlopen(const char* filepath) { #if SX_PLATFORM_WINDOWS return (void*)LoadLibraryA(filepath); #elif SX_PLATFORM_EMSCRIPTEN || SX_PLATFORM_PS4 || SX_PLATFORM_XBOXONE || SX_PLATFORM_WINRT sx_unused(filepath); return NULL; #else return dlopen(filepath, RTLD_LOCAL | RTLD_LAZY); #endif // SX_PLATFORM_ }
movl $0x1, %esi jmp 0x4250
/septag[P]sx/src/os.c
sx_os_sleep
void sx_os_sleep(int ms) { #if SX_PLATFORM_WINDOWS Sleep(ms); #else struct timespec req = { (time_t)ms / 1000, (long)((ms % 1000) * 1000000) }; struct timespec rem = { 0, 0 }; nanosleep(&req, &rem); #endif // SX_PLATFORM_ }
subq $0x28, %rsp movslq %edi, %rax imulq $0x10624dd3, %rax, %rcx # imm = 0x10624DD3 movq %rcx, %rdx shrq $0x3f, %rdx sarq $0x26, %rcx addl %edx, %ecx movslq %ecx, %rcx leaq 0x18(%rsp), %rdi movq %rcx, (%rdi) imull $0x3e8, %ecx, %ecx # imm = 0x3E8 subl %ecx, %eax imull $0xf4240, %eax, %eax # imm = 0xF4240 cltq movq %rax, 0x8(%rdi) xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) callq 0x4170 addq $0x28, %rsp retq
/septag[P]sx/src/os.c
sx_os_exec
sx_pinfo sx_os_exec(const char* const* argv) { #if SX_PLATFORM_LINUX || SX_PLATFORM_HURD pid_t pid = fork(); if (0 == pid) { int result = execvp(argv[0], (char* const*)(&argv[1])); sx_unused(result); return (sx_pinfo){ 0 }; } return (sx_pinfo){ .linux_pid = (uintptr_t)pid }; #elif SX_PLATFORM_WINDOWS STARTUPINFOA si; sx_memset(&si, 0, sizeof(STARTUPINFOA)); si.cb = sizeof(STARTUPINFOA); PROCESS_INFORMATION pi; sx_memset(&pi, 0, sizeof(PROCESS_INFORMATION)); int total = 0; for (int ii = 0; NULL != argv[ii]; ++ii) { total += sx_strlen(argv[ii]) + 1; } sx_assert(total <= 32768); char* temp = (char*)alloca(total); sx_assert(temp); int len = 0; for (int ii = 0; NULL != argv[ii]; ++ii) { len += sx_snprintf(&temp[len], sx_max(0, total - len), "%s ", argv[ii]); } sx_pinfo pinfo; bool ok = !!CreateProcessA(argv[0], temp, NULL, NULL, false, 0, NULL, NULL, &si, &pi); if (ok) { pinfo.win_process_handle = pi.hProcess; pinfo.win_thread_handle = pi.hThread; } else { pinfo.win_process_handle = NULL; pinfo.win_thread_handle = NULL; } return pinfo; #else sx_unused(argv); sx_assertf(0, "not implemented"); return (sx_pinfo){ {0}, 0 }; #endif // SX_PLATFORM_ }
pushq %rbx movq %rdi, %rbx callq 0x4490 testl %eax, %eax je 0x4fee cltq jmp 0x4fff movq (%rbx), %rdi addq $0x8, %rbx movq %rbx, %rsi callq 0x4410 xorl %eax, %eax xorl %edx, %edx popq %rbx retq
/septag[P]sx/src/os.c
sx_os_del
bool sx_os_del(const char* path, sx_file_type type) { sx_assert(type != SX_FILE_TYPE_INVALID); #if SX_PLATFORM_WINDOWS if (type == SX_FILE_TYPE_REGULAR) return DeleteFileA(path) ? true : false; else return RemoveDirectoryA(path) ? true : false; #else return type == SX_FILE_TYPE_REGULAR ? (unlink(path) == 0) : (rmdir(path) == 0); #endif }
pushq %rbx movq %rdi, %rbx cmpl $0x1, %esi je 0x50d5 testl %esi, %esi jne 0x50cb leaq 0x90df(%rip), %rdi # 0xe196 leaq 0x9140(%rip), %rdx # 0xe1fe movl $0x148, %esi # imm = 0x148 xorl %eax, %eax callq 0xc102 int3 movq %rbx, %rdi callq 0x4110 jmp 0x50dd movq %rbx, %rdi callq 0x4050 testl %eax, %eax sete %al popq %rbx retq
/septag[P]sx/src/os.c
sx_os_path_exepath
char* sx_os_path_exepath(char* dst, int size) { #if SX_PLATFORM_WINDOWS GetModuleFileName(NULL, dst, size); return dst; #elif SX_PLATFORM_LINUX || SX_PLATFORM_RPI char proc_path[32]; sx_snprintf(proc_path, sizeof(proc_path), "/proc/%d/exe", getpid()); size_t bytes = readlink(proc_path, dst, size); dst[bytes] = 0; return dst; #elif SX_PLATFORM_OSX _NSGetExecutablePath(dst, (uint32_t*)&size); return dst; #else sx_unused(dst); sx_unused(size); sx_assertf(0, "not implemented"); return NULL; #endif }
pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movl %esi, %ebx movq %rdi, %r14 callq 0x40e0 leaq 0x910b(%rip), %rdx # 0xe21b movq %rsp, %r15 movq %r15, %rdi movl $0x20, %esi movl %eax, %ecx xorl %eax, %eax callq 0x6b8e movslq %ebx, %rdx movq %r15, %rdi movq %r14, %rsi callq 0x40c0 movb $0x0, (%r14,%rax) movq %r14, %rax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq
/septag[P]sx/src/os.c
sx_os_path_unixpath
char* sx_os_path_unixpath(char* dst, int size, const char* path) { int len = sx_strlen(path); len = sx_min(len, size - 1); for (int i = 0; i < len; i++) { if (path[i] != '\\') dst[i] = path[i]; else dst[i] = '/'; } dst[len] = '\0'; return dst; }
pushq %rbp pushq %r14 pushq %rbx movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx movq %rdx, %rdi callq 0x8e02 decl %ebp cmpl %ebp, %eax cmovll %eax, %ebp testl %ebp, %ebp jle 0x5258 movl %ebp, %eax xorl %ecx, %ecx movl $0x2f, %edx movzbl (%r14,%rcx), %esi cmpb $0x5c, %sil cmovel %edx, %esi movb %sil, (%rbx,%rcx) incq %rcx cmpq %rcx, %rax jne 0x5240 movslq %ebp, %rax movb $0x0, (%rbx,%rax) movq %rbx, %rax popq %rbx popq %r14 popq %rbp retq
/septag[P]sx/src/os.c
sx_os_path_winpath
char* sx_os_path_winpath(char* dst, int size, const char* path) { int len = sx_strlen(path); len = sx_min(len, size - 1); for (int i = 0; i < len; i++) { if (path[i] != '/') dst[i] = path[i]; else dst[i] = '\\'; } dst[len] = '\0'; return dst; }
pushq %rbp pushq %r14 pushq %rbx movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx movq %rdx, %rdi callq 0x8e02 decl %ebp cmpl %ebp, %eax cmovll %eax, %ebp testl %ebp, %ebp jle 0x52a7 movl %ebp, %eax xorl %ecx, %ecx movl $0x5c, %edx movzbl (%r14,%rcx), %esi cmpb $0x2f, %sil cmovel %edx, %esi movb %sil, (%rbx,%rcx) incq %rcx cmpq %rcx, %rax jne 0x528f movslq %ebp, %rax movb $0x0, (%rbx,%rax) movq %rbx, %rax popq %rbx popq %r14 popq %rbp retq
/septag[P]sx/src/os.c
sx_os_path_dirname
char* sx_os_path_dirname(char* dst, int size, const char* path) { const char* r = sx_strrchar(path, '/'); if (!r) r = sx_strrchar(path, '\\'); if (r) { int o = (int)(intptr_t)(r - path); if (dst == path) { dst[o] = '\0'; } else { sx_strncpy(dst, size, path, o); } } else if (dst != path) { *dst = '\0'; } return dst; }
pushq %rbp pushq %r14 pushq %rbx movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx movq %rdx, %rdi movl $0x2f, %esi callq 0x91c0 testq %rax, %rax jne 0x533d movq %r14, %rdi movl $0x5c, %esi callq 0x91c0 testq %rax, %rax je 0x535e subq %r14, %rax cmpq %r14, %rbx je 0x5356 movq %rbx, %rdi movl %ebp, %esi movq %r14, %rdx movl %eax, %ecx callq 0x8ef4 jmp 0x5366 cltq movb $0x0, (%rbx,%rax) jmp 0x5366 cmpq %r14, %rbx je 0x5366 movb $0x0, (%rbx) movq %rbx, %rax popq %rbx popq %r14 popq %rbp retq
/septag[P]sx/src/os.c
sx_os_path_normcase
char* sx_os_path_normcase(char* dst, int size, const char* path) { #if SX_PLATFORM_WINDOWS return sx_tolower(dst, size, path); #else if (dst != path) sx_strcpy(dst, size, path); return dst; #endif }
pushq %rbx movq %rdi, %rbx cmpq %rdx, %rdi je 0x55af movq %rbx, %rdi callq 0x8d82 movq %rbx, %rax popq %rbx retq
/septag[P]sx/src/os.c
strpool_internal_add_block
static int strpool_internal_add_block( strpool_t* pool, int size ) { if( pool->block_count >= pool->block_capacity ) { pool->block_capacity *= 2; strpool_internal_block_t* new_blocks = (strpool_internal_block_t*) STRPOOL_MALLOC( pool->memctx, pool->block_capacity * sizeof( *pool->blocks ) ); STRPOOL_ASSERT( new_blocks ); STRPOOL_MEMCPY( new_blocks, pool->blocks, pool->block_count * sizeof( *pool->blocks ) ); STRPOOL_FREE( pool->memctx, pool->blocks ); pool->blocks = new_blocks; } pool->blocks[ pool->block_count ].capacity = size; pool->blocks[ pool->block_count ].data = (char*) STRPOOL_MALLOC( pool->memctx, (size_t) size ); STRPOOL_ASSERT( pool->blocks[ pool->block_count ].data ); pool->blocks[ pool->block_count ].tail = pool->blocks[ pool->block_count ].data; pool->blocks[ pool->block_count ].free_list = -1; return pool->block_count++; }
pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movl %esi, %ebp movq %rdi, %rbx movl 0x74(%rdi), %eax movslq 0x70(%rdi), %rsi cmpl %esi, %eax jge 0x59c4 movq 0x68(%rbx), %r14 jmp 0x5a2b leal (%rsi,%rsi), %eax movl %eax, 0x70(%rbx) movq (%rbx), %rax shlq $0x6, %rsi movq 0x8(%rax), %rcx movq %rcx, (%rsp) xorl %edi, %edi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *(%rax) testq %rax, %rax je 0x5aa8 movq %rax, %r14 movq 0x68(%rbx), %rsi movslq 0x74(%rbx), %rdx shlq $0x5, %rdx movq %rax, %rdi callq 0x4290 movq (%rbx), %rax movq 0x68(%rbx), %rdi movq 0x8(%rax), %rcx movq %rcx, (%rsp) xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *(%rax) movq %r14, 0x68(%rbx) movl 0x74(%rbx), %eax cltq shlq $0x5, %rax movl %ebp, (%r14,%rax) movq (%rbx), %rax movslq %ebp, %rsi movq 0x8(%rax), %rcx movq %rcx, (%rsp) xorl %edi, %edi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *(%rax) movq %rax, %rcx movq 0x68(%rbx), %rdx movslq 0x74(%rbx), %rax movq %rax, %rsi shlq $0x5, %rsi movq %rcx, 0x8(%rdx,%rsi) testq %rcx, %rcx je 0x5a89 movq %rcx, 0x10(%rdx,%rsi) movl $0xffffffff, 0x18(%rdx,%rsi) # imm = 0xFFFFFFFF leal 0x1(%rax), %ecx movl %ecx, 0x74(%rbx) addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq leaq 0x91a2(%rip), %rdi # 0xec32 leaq 0x8dd1(%rip), %rsi # 0xe868 leaq 0x9163(%rip), %rcx # 0xec01 movl $0x21d, %edx # imm = 0x21D callq 0x4180 leaq 0x9147(%rip), %rdi # 0xebf6 leaq 0x8db2(%rip), %rsi # 0xe868 leaq 0x9144(%rip), %rcx # 0xec01 movl $0x216, %edx # imm = 0x216 callq 0x4180
/septag[P]sx/src/../3rdparty/mattias/strpool.h
strpool_inject
STRPOOL_U64 strpool_inject( strpool_t* pool, char const* string, int length ) { if( !string || length < 0 ) return 0; STRPOOL_U32 hash = strpool_internal_find_in_blocks( pool, string, length ); // If no stored hash, calculate it from data if( !hash ) hash = strpool_internal_calculate_hash( string, length, pool->ignore_case ); // Return handle to existing string, if it is already in pool int base_slot = (int)( hash & (STRPOOL_U32)( pool->hash_capacity - 1 ) ); int base_count = pool->hash_table[ base_slot ].base_count; int slot = base_slot; int first_free = slot; while( base_count > 0 ) { STRPOOL_U32 slot_hash = pool->hash_table[ slot ].hash_key; if( slot_hash == 0 && pool->hash_table[ first_free ].hash_key != 0 ) first_free = slot; int slot_base = (int)( slot_hash & (STRPOOL_U32)( pool->hash_capacity - 1 ) ); if( slot_base == base_slot ) { STRPOOL_ASSERT( base_count > 0 ); --base_count; if( slot_hash == hash ) { int index = pool->hash_table[ slot ].entry_index; strpool_internal_entry_t* entry = &pool->entries[ index ]; if( entry->length == length && ( ( !pool->ignore_case && STRPOOL_MEMCMP( entry->data + 2 * sizeof( STRPOOL_U32 ), string, (size_t)length ) == 0 ) || ( pool->ignore_case && STRPOOL_STRNICMP( entry->data + 2 * sizeof( STRPOOL_U32 ), string, (size_t)length ) == 0 ) ) ) { int handle_index = entry->handle_index; return strpool_internal_make_handle( handle_index, pool->handles[ handle_index ].counter, pool->index_mask, pool->counter_shift, pool->counter_mask ); } } } slot = ( slot + 1 ) & ( pool->hash_capacity - 1 ); } // This is a new string, so let's add it if( pool->entry_count >= ( pool->hash_capacity - pool->hash_capacity / 3 ) ) { strpool_internal_expand_hash_table( pool ); base_slot = (int)( hash & (STRPOOL_U32)( pool->hash_capacity - 1 ) ); slot = base_slot; first_free = slot; while( base_count ) { STRPOOL_U32 slot_hash = pool->hash_table[ slot ].hash_key; if( slot_hash == 0 && pool->hash_table[ first_free ].hash_key != 0 ) first_free = slot; int slot_base = (int)( slot_hash & (STRPOOL_U32)( pool->hash_capacity - 1 ) ); if( slot_base == base_slot ) --base_count; slot = ( slot + 1 ) & ( pool->hash_capacity - 1 ); } } slot = first_free; while( pool->hash_table[ slot ].hash_key ) slot = ( slot + 1 ) & ( pool->hash_capacity - 1 ); if( pool->entry_count >= pool->entry_capacity ) strpool_internal_expand_entries( pool ); STRPOOL_ASSERT( !pool->hash_table[ slot ].hash_key && ( hash & ( (STRPOOL_U32) pool->hash_capacity - 1 ) ) == (STRPOOL_U32) base_slot ); STRPOOL_ASSERT( hash ); pool->hash_table[ slot ].hash_key = hash; pool->hash_table[ slot ].entry_index = pool->entry_count; ++pool->hash_table[ base_slot ].base_count; int handle_index; if( pool->handle_count < pool->handle_capacity ) { handle_index = pool->handle_count; pool->handles[ pool->handle_count ].counter = 1; ++pool->handle_count; } else if( pool->handle_freelist_head >= 0 ) { handle_index = pool->handle_freelist_head; if( pool->handle_freelist_tail == pool->handle_freelist_head ) pool->handle_freelist_tail = pool->handles[ pool->handle_freelist_head ].entry_index; pool->handle_freelist_head = pool->handles[ pool->handle_freelist_head ].entry_index; } else { strpool_internal_expand_handles( pool ); handle_index = pool->handle_count; pool->handles[ pool->handle_count ].counter = 1; ++pool->handle_count; } pool->handles[ handle_index ].entry_index = pool->entry_count; strpool_internal_entry_t* entry = &pool->entries[ pool->entry_count ]; ++pool->entry_count; int data_size = length + 1 + (int) ( 2 * sizeof( STRPOOL_U32 ) ); char* data = strpool_internal_get_data_storage( pool, data_size, &data_size ); entry->hash_slot = slot; entry->handle_index = handle_index; entry->data = data; entry->size = data_size; entry->length = length; entry->refcount = 0; *(STRPOOL_U32*)(data) = hash; data += sizeof( STRPOOL_U32 ); *(STRPOOL_U32*)(data) = (STRPOOL_U32) length; data += sizeof( STRPOOL_U32 ); STRPOOL_MEMCPY( data, string, (size_t) length ); data[ length ] = 0; // Ensure trailing zero return strpool_internal_make_handle( handle_index, pool->handles[ handle_index ].counter, pool->index_mask, pool->counter_shift, pool->counter_mask ); }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp testq %rsi, %rsi sete %al testl %edx, %edx sets %cl orb %al, %cl je 0x6041 xorl %eax, %eax jmp 0x66cf movl %edx, %r11d movslq 0x74(%rdi), %rax movl %edx, %r10d testq %rax, %rax jle 0x6090 movq 0x68(%rdi), %rcx shlq $0x5, %rax xorl %edx, %edx movq 0x8(%rcx,%rdx), %r9 leaq 0x8(%r9), %r8 cmpq %rsi, %r8 ja 0x6074 movslq (%rcx,%rdx), %r8 addq %r8, %r9 cmpq %rsi, %r9 ja 0x607f addq $0x20, %rdx cmpq %rdx, %rax jne 0x605a jmp 0x6090 cmpl %r11d, -0x4(%rsi) jne 0x6090 cmpb $0x0, (%rsi,%r10) je 0x6725 cmpl $0x0, 0x8(%rdi) je 0x60cd testl %r11d, %r11d jle 0x60f2 movl $0x1505, %ebp # imm = 0x1505 xorl %eax, %eax movzbl (%rsi,%rax), %ecx leal -0x61(%rcx), %edx leal -0x20(%rcx), %r8d cmpb $0x1a, %dl movzbl %r8b, %edx cmovael %ecx, %edx movl %ebp, %ecx shll $0x5, %ecx addl %ebp, %ecx movsbl %dl, %ebp xorl %ecx, %ebp incq %rax cmpq %rax, %r10 jne 0x60a2 jmp 0x60f7 testl %r11d, %r11d jle 0x60f2 movl $0x1505, %ecx # imm = 0x1505 xorl %eax, %eax movl %ecx, %ebp movsbl (%rsi,%rax), %edx shll $0x5, %ebp addl %ecx, %ebp xorl %edx, %ebp incq %rax movl %ebp, %ecx cmpq %rax, %r10 jne 0x60db jmp 0x60f7 movl $0x1505, %ebp # imm = 0x1505 cmpl $0x1, %ebp adcl $0x0, %ebp movq %r10, 0x28(%rsp) movq %rsi, 0x30(%rsp) movl 0x38(%rdi), %eax movq %rax, 0x40(%rsp) leal -0x1(%rax), %r14d movl %r14d, %r8d andl %ebp, %r8d movq %rdi, 0x38(%rsp) movq 0x30(%rdi), %rdi movslq %r8d, %rax leaq (%rax,%rax,2), %rax movl 0x8(%rdi,%rax,4), %ebx testl %ebx, %ebx movq %r11, 0x10(%rsp) movq %rdi, 0x20(%rsp) jle 0x61e8 movl %r8d, %r12d movl %r8d, %r15d movl %r8d, 0x18(%rsp) movslq %r12d, %rax leaq (%rax,%rax,2), %rax movl (%rdi,%rax,4), %ecx testl %ecx, %ecx jne 0x6167 movslq %r15d, %r15 leaq (%r15,%r15,2), %rdx cmpl $0x0, (%rdi,%rdx,4) cmovnel %r12d, %r15d movl %ecx, %edx andl %r14d, %edx cmpl %r8d, %edx jne 0x61d8 decl %ebx cmpl %ebp, %ecx jne 0x61d8 movslq 0x4(%rdi,%rax,4), %rax movq 0x38(%rsp), %rcx movq 0x40(%rcx), %r13 shlq $0x5, %rax cmpl %r11d, 0x14(%r13,%rax) jne 0x61d8 addq %rax, %r13 movq 0x8(%r13), %rdi addq $0x8, %rdi cmpl $0x0, 0x8(%rcx) je 0x61b2 movq 0x30(%rsp), %rsi movq 0x28(%rsp), %rdx callq 0x42e0 jmp 0x61c1 movq 0x30(%rsp), %rsi movq 0x28(%rsp), %rdx callq 0x4300 testl %eax, %eax movq 0x10(%rsp), %r11 movq 0x20(%rsp), %rdi movl 0x18(%rsp), %r8d je 0x66f5 incl %r12d andl %r14d, %r12d testl %ebx, %ebx jg 0x614a jmp 0x61eb movl %r8d, %r15d movq 0x40(%rsp), %r12 movslq %r12d, %rax imulq $0x55555555, %rax, %rcx # imm = 0x55555555 shrq $0x20, %rcx subl %r12d, %ecx movl %ecx, %edx shrl $0x1f, %edx sarl %ecx addl %edx, %ecx addl %r12d, %ecx movq 0x38(%rsp), %r14 cmpl %ecx, 0x4c(%r14) jl 0x6367 leal (%r12,%r12), %ecx movl %ecx, 0x38(%r14) movq (%r14), %r10 shlq $0x3, %rax leaq (%rax,%rax,2), %rsi movq 0x8(%r10), %rax movq %rax, (%rsp) xorl %edi, %edi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *(%r10) movq %rax, 0x30(%r14) testq %rax, %rax je 0x6754 movslq 0x38(%r14), %rcx shlq $0x2, %rcx leaq (%rcx,%rcx,2), %rdx movq %rax, %rdi xorl %esi, %esi callq 0x41c0 testl %r12d, %r12d movq 0x20(%rsp), %rdi jle 0x62f1 xorl %eax, %eax leaq (%rax,%rax,2), %rsi movslq (%rdi,%rsi,4), %rcx testq %rcx, %rcx je 0x62e9 movslq 0x38(%r14), %r9 decq %r9 movq %r9, %rdx andq %rcx, %rdx movq 0x30(%r14), %rdi leaq (%rdx,%rdx,2), %r8 cmpl $0x0, (%rdi,%r8,4) je 0x62b7 incl %edx andl %r9d, %edx movslq %edx, %r10 leaq (%r10,%r10,2), %r11 cmpl $0x0, (%rdi,%r11,4) jne 0x629e leaq (%rdi,%r11,4), %r9 jmp 0x62be leaq (%rdi,%r8,4), %r9 movq %rdx, %r10 movq 0x20(%rsp), %r11 leaq (%r11,%rsi,4), %rsi movl %ecx, (%r9) movslq 0x4(%rsi), %rcx leaq (%r10,%r10,2), %rsi movl %ecx, 0x4(%rdi,%rsi,4) movq 0x40(%r14), %rsi shlq $0x5, %rcx movl %edx, (%rsi,%rcx) incl 0x8(%rdi,%r8,4) movq %r11, %rdi incq %rax cmpq %r12, %rax jne 0x6275 movq (%r14), %rax movq 0x8(%rax), %rcx movq %rcx, (%rsp) xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *(%rax) movl 0x38(%r14), %r12d leal -0x1(%r12), %eax movl %eax, %r8d andl %ebp, %r8d movq 0x30(%r14), %rdi testl %ebx, %ebx je 0x635f movl %r8d, %ecx movl %r8d, %r15d movq 0x10(%rsp), %r11 movslq %ecx, %rdx leaq (%rdx,%rdx,2), %rdx movl (%rdi,%rdx,4), %edx testl %edx, %edx jne 0x634a movslq %r15d, %rsi leaq (%rsi,%rsi,2), %rsi cmpl $0x0, (%rdi,%rsi,4) je 0x634a movl %ecx, %r15d andl %eax, %edx xorl %esi, %esi cmpl %r8d, %edx sete %sil incl %ecx andl %eax, %ecx subl %esi, %ebx jne 0x632c jmp 0x6367 movl %r8d, %r15d movq 0x10(%rsp), %r11 movslq %r15d, %rbx leaq (%rbx,%rbx,2), %rax cmpl $0x0, (%rdi,%rax,4) je 0x638a decl %r12d incl %r15d andl %r12d, %r15d movslq %r15d, %rbx leaq (%rbx,%rbx,2), %rax cmpl $0x0, (%rdi,%rax,4) jne 0x6377 movslq 0x48(%r14), %rsi cmpl %esi, 0x4c(%r14) jl 0x6408 movl %r8d, %r12d leal (%rsi,%rsi), %eax movl %eax, 0x48(%r14) movq (%r14), %rax shlq $0x6, %rsi movq 0x8(%rax), %rcx movq %rcx, (%rsp) xorl %edi, %edi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *(%rax) testq %rax, %rax je 0x6773 movq %rax, %r13 movq 0x40(%r14), %rsi movslq 0x4c(%r14), %rdx shlq $0x5, %rdx movq %rax, %rdi callq 0x4290 movq (%r14), %rax movq 0x40(%r14), %rdi movq 0x8(%rax), %rcx movq %rcx, (%rsp) xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *(%rax) movq %r13, 0x40(%r14) movq 0x30(%r14), %rdi movq 0x10(%rsp), %r11 movl %r12d, %r8d leaq (%rbx,%rbx,2), %rax cmpl $0x0, (%rdi,%rax,4) jne 0x6735 movl 0x38(%r14), %ecx decl %ecx andl %ebp, %ecx cmpl %r8d, %ecx jne 0x6735 leaq (%rdi,%rax,4), %rcx movl %ebp, (%rcx) movl 0x4c(%r14), %eax movl %eax, 0x4(%rcx) movslq %r8d, %rcx leaq (%rcx,%rcx,2), %rcx incl 0x8(%rdi,%rcx,4) movl 0x5c(%r14), %ecx movslq 0x58(%r14), %rsi cmpl %esi, %ecx jge 0x646b movslq %ecx, %rbx movq 0x50(%r14), %r13 movl $0x1, 0x4(%r13,%rbx,8) movq %rcx, 0x18(%rsp) incl %ecx movl %ecx, 0x5c(%r14) jmp 0x6521 movslq 0x60(%r14), %rbx testq %rbx, %rbx js 0x6497 movq 0x50(%r14), %r13 movl (%r13,%rbx,8), %ecx cmpl %ebx, 0x64(%r14) jne 0x6487 movl %ecx, 0x64(%r14) movl %ecx, 0x60(%r14) movl %ebx, %ecx movq %rcx, 0x18(%rsp) jmp 0x6521 leal (%rsi,%rsi), %eax movl %eax, 0x58(%r14) movq (%r14), %rax shlq $0x4, %rsi movq 0x8(%rax), %rcx movq %rcx, (%rsp) xorl %edi, %edi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *(%rax) testq %rax, %rax je 0x6792 movq %rax, %r13 movq 0x50(%r14), %rsi movslq 0x5c(%r14), %rdx shlq $0x3, %rdx movq %rax, %rdi callq 0x4290 movq (%r14), %rax movq 0x50(%r14), %rdi movq 0x8(%rax), %rcx movq %rcx, (%rsp) xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *(%rax) movq %r13, 0x50(%r14) movl 0x5c(%r14), %eax movq %rax, 0x18(%rsp) movslq %eax, %rbx movl $0x1, 0x4(%r13,%rbx,8) leal 0x1(%rbx), %eax movl %eax, 0x5c(%r14) movl 0x4c(%r14), %eax movq 0x10(%rsp), %r11 movl %eax, (%r13,%rbx,8) cltq movq %rax, %r12 shlq $0x5, %r12 addq 0x40(%r14), %r12 incl %eax movl %eax, 0x4c(%r14) leal 0x9(%r11), %eax movl 0x2c(%r14), %ecx cmpl %eax, %ecx cmovgl %ecx, %eax decl %eax movl %eax, %ecx shrl %ecx orl %eax, %ecx movl %ecx, %eax shrl $0x2, %eax orl %ecx, %eax movl %eax, %ecx shrl $0x4, %ecx orl %eax, %ecx movl %ecx, %eax shrl $0x8, %eax orl %ecx, %eax movl %eax, %r13d shrl $0x10, %r13d orl %eax, %r13d leal 0x1(%r13), %eax cmpl $0x1, %eax adcl $0x1, %r13d movslq 0x74(%r14), %rcx movq 0x68(%r14), %rax testq %rcx, %rcx movq %rbx, 0x20(%rsp) jle 0x65f6 xorl %edx, %edx movq %rdx, %r9 shlq $0x5, %r9 movslq 0x18(%rax,%r9), %rdi testq %rdi, %rdi js 0x65ee movq 0x8(%rax,%r9), %r8 movl (%r8,%rdi), %esi movl %esi, %r10d shrl $0x1f, %r10d addl %esi, %r10d sarl %r10d cmpl %r13d, %r10d jge 0x65c2 cmpl %r13d, %esi jl 0x65ee jmp 0x66de movl %edi, %r9d movslq 0x4(%r8,%rdi), %rdi testq %rdi, %rdi js 0x65ee movl (%r8,%rdi), %esi movl %esi, %r10d shrl $0x1f, %r10d addl %esi, %r10d sarl %r10d cmpl %r13d, %r10d jge 0x65c2 cmpl %r13d, %esi jge 0x670c incq %rdx cmpq %rcx, %rdx jne 0x658c movslq 0x78(%r14), %rcx shlq $0x5, %rcx movq %r14, %rbx movq 0x10(%rax,%rcx), %r14 movl 0x8(%rax,%rcx), %edx subl %r14d, %edx addl (%rax,%rcx), %edx cmpl %edx, %r13d jle 0x664b movl 0x28(%rbx), %esi cmpl %esi, %r13d cmovgl %r13d, %esi movq %rbx, %rdi callq 0x59a6 movq 0x10(%rsp), %r11 movl %eax, 0x78(%rbx) movq 0x68(%rbx), %rcx cltq shlq $0x5, %rax movq 0x10(%rcx,%rax), %r14 movslq %r13d, %rdx addq %r14, %rdx movq %rdx, 0x10(%rcx,%rax) jmp 0x6658 addq %rcx, %rax movslq %r13d, %rcx addq %r14, %rcx movq %rcx, 0x10(%rax) movl %r13d, %esi movl %r15d, (%r12) movq 0x18(%rsp), %r13 movl %r13d, 0x4(%r12) movq %r14, 0x8(%r12) movl %esi, 0x10(%r12) movl %r11d, 0x14(%r12) movl $0x0, 0x18(%r12) movl %ebp, (%r14) movl %r11d, 0x4(%r14) leaq 0x8(%r14), %rdi movq 0x30(%rsp), %rsi movq 0x28(%rsp), %r15 movq %r15, %rdx callq 0x4290 movb $0x0, 0x8(%r14,%r15) movq 0x50(%rbx), %rax movq 0x20(%rsp), %rcx leaq (%rax,%rcx,8), %rax addq $0x4, %rax movslq (%rax), %rdx movb 0xc(%rbx), %cl incl %r13d andq 0x10(%rbx), %rdx shlq %cl, %rdx movslq %r13d, %rax andq 0x18(%rbx), %rax orq %rdx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq %r9, %rax movq %r14, %rbx leaq (%r8,%rdi), %r14 movl 0x4(%r8,%rdi), %ecx movl %ecx, 0x18(%rax) jmp 0x665b movslq 0x4(%r13), %r13 movq 0x38(%rsp), %rbx movq 0x50(%rbx), %rax leaq (%rax,%r13,8), %rax addq $0x4, %rax jmp 0x66b5 movq %r14, %rbx leaq (%r8,%rdi), %r14 movl %r9d, %eax movl 0x4(%r8,%rdi), %ecx movl %ecx, 0x4(%r8,%rax) jmp 0x665b movl -0x8(%rsi), %ebp testl %ebp, %ebp jne 0x60fd jmp 0x6090 leaq 0x8267(%rip), %rdi # 0xe9a3 leaq 0x8125(%rip), %rsi # 0xe868 leaq 0x8217(%rip), %rcx # 0xe961 movl $0x3e9, %edx # imm = 0x3E9 callq 0x4180 leaq 0x81a6(%rip), %rdi # 0xe901 leaq 0x8106(%rip), %rsi # 0xe868 leaq 0x84f0(%rip), %rcx # 0xec59 movl $0x33c, %edx # imm = 0x33C callq 0x4180 leaq 0x8514(%rip), %rdi # 0xec8e leaq 0x80e7(%rip), %rsi # 0xe868 leaq 0x8512(%rip), %rcx # 0xec9a movl $0x359, %edx # imm = 0x359 callq 0x4180 leaq 0x8533(%rip), %rdi # 0xeccc leaq 0x80c8(%rip), %rsi # 0xe868 leaq 0x8531(%rip), %rcx # 0xecd8 movl $0x365, %edx # imm = 0x365 callq 0x4180
/septag[P]sx/src/../3rdparty/mattias/strpool.h
strpool_decref
int strpool_decref( strpool_t* pool, STRPOOL_U64 handle ) { strpool_internal_entry_t* entry = strpool_internal_get_entry( pool, handle ); if( entry ) { STRPOOL_ASSERT( entry->refcount > 0 ); --entry->refcount; return entry->refcount; } return 0; }
pushq %rax callq 0x6995 testq %rax, %rax je 0x6a0f movq %rax, %rcx movl 0x18(%rax), %eax testl %eax, %eax jle 0x6a13 decl %eax movl %eax, 0x18(%rcx) jmp 0x6a11 xorl %eax, %eax popq %rcx retq leaq 0x8056(%rip), %rdi # 0xea70 leaq 0x7e47(%rip), %rsi # 0xe868 leaq 0x805c(%rip), %rcx # 0xea84 movl $0x48a, %edx # imm = 0x48A callq 0x4180
/septag[P]sx/src/../3rdparty/mattias/strpool.h
sx_vsnprintf_alloc
char* sx_vsnprintf_alloc(const sx_alloc* alloc, const char* fmt, va_list args) { sx__printf_ctx ctx; ctx.alloc = alloc; ctx.buff = NULL; ctx.len = 0; stbsp_vsprintfcb(sx__vsnprintf_callback, &ctx, ctx.tmp, fmt, args); ctx.buff[ctx.len] = '\0'; return ctx.buff; }
pushq %rbx subq $0x220, %rsp # imm = 0x220 movq %rdx, %r8 movq %rsi, %rcx leaq 0x1c(%rsp), %rdx movq %rdi, -0x14(%rdx) movq $0x0, -0xc(%rdx) movl $0x0, -0x4(%rdx) leaq 0x1eda(%rip), %rdi # 0x8caa leaq 0x8(%rsp), %rbx movq %rbx, %rsi callq 0x6df6 movq 0x8(%rbx), %rax movslq 0x10(%rbx), %rcx movb $0x0, (%rax,%rcx) movq 0x8(%rbx), %rax addq $0x220, %rsp # imm = 0x220 popq %rbx retq
/septag[P]sx/src/string.c
sx_strncpy
char* sx_strncpy(char* SX_RESTRICT dst, int dst_sz, const char* SX_RESTRICT src, int _num) { sx_assert(dst); sx_assert(src); const int len = sx__strnlen(src, _num); const int32_t max = dst_sz - 1; const int32_t num = (len < max ? len : max); if (num > 0) { sx_memcpy(dst, src, num); } dst[num] = '\0'; return &dst[num]; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %ecx, %r15d movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx testq %rdi, %rdi jne 0x8f26 leaq 0x5bde(%rip), %rdi # 0xeaf0 leaq 0x533b(%rip), %rdx # 0xe254 movl $0xd9, %esi xorl %eax, %eax callq 0xc102 int3 testq %r14, %r14 je 0x9085 movq %r14, %rax testb $0x7, %r14b je 0x8f62 cmpb $0x0, (%r14) je 0x8ff2 leaq 0x1(%r14), %rax movq %r14, %rcx leal 0x1(%rcx), %edx testb $0x7, %dl je 0x8f62 incq %rcx cmpb $0x0, (%rax) leaq 0x1(%rax), %rax jne 0x8f49 jmp 0x8ff5 movabsq $-0x7f7f7f7f7f7f7f80, %rdx # imm = 0x8080808080808080 movl %eax, %esi subl %r14d, %esi xorl %ecx, %ecx movabsq $0x101010101010100, %rdi # imm = 0x101010101010100 movq (%rax,%rcx), %r8 movq %rdi, %r9 subq %r8, %r9 orq %r8, %r9 notq %r9 testq %r9, %rdx je 0x8fec leal (%rsi,%rcx), %r9d cmpl %r15d, %r9d jg 0x9055 testb %r8b, %r8b je 0x9004 testl $0xff00, %r8d # imm = 0xFF00 je 0x900b testl $0xff0000, %r8d # imm = 0xFF0000 je 0x9014 movq %r8, %r9 shrq $0x18, %r9 testb %r9b, %r9b je 0x901e movq %r8, %r9 shrq $0x20, %r9 testb %r9b, %r9b je 0x9028 movq %r8, %r9 shrq $0x28, %r9 testb %r9b, %r9b je 0x9032 movq %r8, %r9 shrq $0x30, %r9 testb %r9b, %r9b je 0x903c shrq $0x38, %r8 je 0x9046 addq $0x8, %rcx jmp 0x8f7d movq %r14, %rcx subl %r14d, %ecx cmpl %r15d, %ecx cmovgel %r15d, %ecx movl %ecx, %r15d jmp 0x9055 subl %r14d, %eax addl %eax, %ecx jmp 0x8fff subl %r14d, %eax addl %ecx, %eax incl %eax jmp 0x904e subl %r14d, %eax addl %ecx, %eax addl $0x2, %eax jmp 0x904e subl %r14d, %eax addl %ecx, %eax addl $0x3, %eax jmp 0x904e subl %r14d, %eax addl %ecx, %eax addl $0x4, %eax jmp 0x904e subl %r14d, %eax addl %ecx, %eax addl $0x5, %eax jmp 0x904e subl %r14d, %eax addl %ecx, %eax addl $0x6, %eax jmp 0x904e subl %r14d, %eax addl %ecx, %eax addl $0x7, %eax cmpl %r15d, %eax cmovll %eax, %r15d decl %ebp cmpl %ebp, %r15d cmovll %r15d, %ebp testl %ebp, %ebp jle 0x906f movl %ebp, %edx movq %rbx, %rdi movq %r14, %rsi callq 0x4290 movslq %ebp, %rcx leaq (%rbx,%rcx), %rax movb $0x0, (%rbx,%rcx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x450b
/septag[P]sx/src/string.c
sx_strrchar
const char* sx_strrchar(const char* str, char ch) { const char *found = NULL, *p; ch = (uint8_t)ch; if (ch == '\0') return sx_strchar(str, '\0'); while ((p = sx_strchar(str, ch)) != NULL) { found = p; str = p + 1; } return (const char*)found; }
testb %sil, %sil je 0x91ed pushq %r14 pushq %rbx pushq %rax xorl %eax, %eax movsbl %sil, %ebx movq %rax, %r14 movl %ebx, %esi callq 0x91f4 leaq 0x1(%rax), %rdi testq %rax, %rax jne 0x91cf movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq xorl %esi, %esi jmp 0x91f4
/septag[P]sx/src/string.c
sx_strstr
const char* sx_strstr(const char* SX_RESTRICT str, const char* SX_RESTRICT find) { sx_assert(str); sx_assert(find); char ch = find[0]; const char* _start = sx_strchar(str, ch); int find_len = sx_strlen(find); int len = sx_strlen(str); while (_start) { // We have the first character, check the rest len -= (int)(intptr_t)(_start - str); if (len < find_len) return NULL; str = _start; if (sx_memcmp(_start, find, find_len) == 0) return str; _start = sx_strchar(_start + 1, ch); } return NULL; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbp movq %rdi, %rbx testq %rdi, %rdi jne 0x934a leaq 0x57ba(%rip), %rdi # 0xeaf0 leaq 0x5809(%rip), %rdx # 0xeb46 movl $0x15b, %esi # imm = 0x15B xorl %eax, %eax callq 0xc102 int3 testq %rbp, %rbp je 0x9370 movb (%rbp), %r14b movsbl %r14b, %esi movq %rbx, %rdi callq 0x91f4 movq %rax, %r15 movq %rbp, %rdi callq 0x8e02 movl %eax, 0x4(%rsp) jmp 0x93a3 leaq 0x5779(%rip), %rdi # 0xeaf0 leaq 0x57cc(%rip), %rdx # 0xeb4a movl $0x15c, %esi # imm = 0x15C xorl %eax, %eax callq 0xc102 int3 movq %rbx, %rdi xorl %esi, %esi callq 0x91f4 movq %rax, %r15 xorl %edi, %edi callq 0x8e02 movl %eax, 0x4(%rsp) movq %rbx, %rdi callq 0x8e02 testq %r15, %r15 je 0x93fa movl %eax, %r13d movslq 0x4(%rsp), %r12 movsbl %r14b, %r14d movl %r13d, %eax movq %rbx, %rcx movq %r15, %rbx subl %ebx, %ecx movl %ecx, %r13d addl %eax, %r13d cmpl 0x4(%rsp), %r13d jl 0x93fa movq %rbx, %rdi movq %rbp, %rsi movq %r12, %rdx callq 0x4300 testl %eax, %eax je 0x93fc leaq 0x1(%rbx), %rdi movl %r14d, %esi callq 0x91f4 movq %rax, %r15 testq %rax, %rax jne 0x93bc xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/septag[P]sx/src/string.c
sx_trim_whitespace
char* sx_trim_whitespace(char* dest, int dest_sz, const char* src) { int len = sx_min(sx_strlen(src), dest_sz - 1); int offset = 0; for (int i = 0; i < len; i++) { if (!sx_isspace(src[i])) dest[offset++] = src[i]; } dest[offset] = '\0'; return dest; }
pushq %rbp pushq %r14 pushq %rbx movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx movq %rdx, %rdi callq 0x8e02 decl %ebp cmpl %ebp, %eax cmovll %eax, %ebp xorl %eax, %eax testl %ebp, %ebp jle 0x97b8 movl %ebp, %ecx movl $0x80001f00, %edx # imm = 0x80001F00 xorl %esi, %esi movsbl (%r14,%rsi), %edi leal -0x1(%rdi), %r10d xorl %r8d, %r8d btl %r10d, %edx setb %r9b cmpl $0x1f, %r10d ja 0x97a5 movb %r9b, %r8b testl %r8d, %r8d jne 0x97ae movslq %eax, %r8 incl %eax movb %dil, (%rbx,%r8) incq %rsi cmpq %rsi, %rcx jne 0x9783 cltq movb $0x0, (%rbx,%rax) movq %rbx, %rax popq %rbx popq %r14 popq %rbp retq
/septag[P]sx/src/string.c
sx_trim
char* sx_trim(char* dest, int dest_sz, const char* src, const char* trim) { int len = sx_min(sx_strlen(src), dest_sz - 1); int offset = 0; for (int i = 0; i < len; i++) { const char* t = trim; char sch = src[i]; bool trim_it = false; while (*t) { if (sch != *t) { ++t; continue; } trim_it = true; break; } if (!trim_it) dest[offset++] = src[i]; } dest[offset] = '\0'; return dest; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx movq %rdx, %rdi callq 0x8e02 decl %ebp cmpl %ebp, %eax cmovll %eax, %ebp xorl %eax, %eax testl %ebp, %ebp jle 0x9822 movl %ebp, %ecx leaq 0x1(%r14), %rdx xorl %esi, %esi movb (%r15,%rsi), %dil movb (%r14), %r9b movq %rdx, %r8 testb %r9b, %r9b je 0x980f cmpb %r9b, %dil je 0x9818 movb (%r8), %r9b incq %r8 jmp 0x97fd movslq %eax, %r8 incl %eax movb %dil, (%rbx,%r8) incq %rsi cmpq %rcx, %rsi jne 0x97f3 cltq movb $0x0, (%rbx,%rax) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
/septag[P]sx/src/string.c
sx_replace
char* sx_replace(char* dest, int dest_sz, const char* src, const char* find, const char* replace) { sx_assert(dest != src); char f = find[0]; int flen = sx_strlen(find); int rlen = sx_strlen(replace); int srclen = sx_strlen(src); int offset = 0; int dest_max = dest_sz - 1; const char* start = src; while (*src && offset < dest_max) { // Found first character, check for rest if (f != *src) { dest[offset++] = *src; } else { srclen -= (int)(intptr_t)(src - start); if (srclen >= flen && sx_memcmp(src, find, flen) == 0) { src += flen; int l = sx_min(dest_max - offset, rlen); sx_memcpy(dest + offset, replace, l); offset += l; } else { dest[offset++] = *src; } } ++src; } dest[offset] = '\0'; return dest; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r13 movq %rcx, %r14 movq %rdx, %r12 movl %esi, %ebp movq %rdi, %rbx cmpq %rdx, %rdi jne 0x98ce leaq 0x5236(%rip), %rdi # 0xeaf0 leaq 0x5296(%rip), %rdx # 0xeb57 movl $0x23c, %esi # imm = 0x23C xorl %eax, %eax callq 0xc102 int3 movb (%r14), %al movb %al, 0xf(%rsp) movq %r14, 0x30(%rsp) movq %r14, %rdi callq 0x8e02 movl %eax, %r15d movq %r13, %rdi callq 0x8e02 movl %eax, 0x14(%rsp) movq %r12, %rdi callq 0x8e02 movl %eax, %r14d movb (%r12), %al testb %al, %al sete %cl cmpl $0x2, %ebp setl %dl movq %r13, %rsi xorl %r13d, %r13d orb %cl, %dl jne 0x99ed movq %r12, %r8 movl %ebp, %edx movq %rsi, 0x20(%rsp) decl %edx movslq %r15d, %rcx movq %rcx, 0x18(%rsp) movb 0xf(%rsp), %sil movl %r15d, %edi movq %rbx, 0x28(%rsp) movl %r15d, 0x10(%rsp) cmpb %al, %sil jne 0x9989 movl %r8d, %eax subl %r12d, %eax addl %eax, %r14d cmpl %edi, %r14d jl 0x997d movq %r12, %rdi movl %edx, %r15d movq 0x30(%rsp), %rsi movq 0x18(%rsp), %rdx movq %r8, %rbp callq 0x4300 movl 0x10(%rsp), %edi movb 0xf(%rsp), %sil movl %r15d, %edx movq %rbp, %r8 testl %eax, %eax je 0x99a5 movslq %r13d, %rax incl %r13d movb %sil, (%rbx,%rax) jmp 0x9992 movslq %r13d, %rcx incl %r13d movb %al, (%rbx,%rcx) movb 0x1(%r12), %al testb %al, %al je 0x99ea incq %r12 cmpl %edx, %r13d jl 0x993f jmp 0x99ea addq 0x18(%rsp), %r12 movl %edx, %eax subl %r13d, %eax movl 0x14(%rsp), %ecx cmpl %ecx, %eax cmovgel %ecx, %eax movslq %r13d, %rdi addq %rbx, %rdi movslq %eax, %rbx movq 0x20(%rsp), %rsi movq %rbx, %rdx callq 0x4290 movl 0x10(%rsp), %edi movb 0xf(%rsp), %sil movl %r15d, %edx movq %rbp, %r8 addl %r13d, %ebx movl %ebx, %r13d movq 0x28(%rsp), %rbx jmp 0x9992 movslq %r13d, %r13 movb $0x0, (%rbx,%r13) movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/septag[P]sx/src/string.c
sx_EOL_LF
char* sx_EOL_LF(char* dest, int dest_sz, const char* src) { assert(dest_sz > 0); char* end = dest + dest_sz - 1; for (char ch = *src++; ch != '\0' && dest < end; ch = *src++) { if ('\r' != ch) *dest++ = ch; } *dest = '\0'; return dest; }
pushq %rax testl %esi, %esi jle 0x9a88 movl %esi, %eax addq %rdi, %rax decq %rax movb (%rdx), %cl testb %cl, %cl setne %sil cmpq %rdi, %rax seta %r8b andb %sil, %r8b cmpb $0x1, %r8b jne 0x9a80 incq %rdx cmpb $0xd, %cl je 0x9a72 movb %cl, (%rdi) incq %rdi movb (%rdx), %cl testb %cl, %cl je 0x9a80 incq %rdx cmpq %rax, %rdi jb 0x9a68 movb $0x0, (%rdi) movq %rdi, %rax popq %rcx retq leaq 0x50d4(%rip), %rdi # 0xeb63 leaq 0x505a(%rip), %rsi # 0xeaf0 leaq 0x50d2(%rip), %rcx # 0xeb6f movl $0x26f, %edx # imm = 0x26F callq 0x4180
/septag[P]sx/src/string.c
sx_split
bool sx_split(char* dest1, int dest1_sz, char* dest2, int dest2_sz, const char* src, char splitch) { const char* sptr = sx_strchar(src, splitch); if (sptr) { sx_strncpy(dest1, dest1_sz, src, (int)(uintptr_t)(sptr - src)); sx_strcpy(dest2, dest2_sz, src + 1); return true; } return false; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %rbx movl %ecx, %ebp movq %rdx, %r14 movl %esi, %r12d movq %rdi, %r13 movq %r8, %rdi movl %r9d, %esi callq 0x91f4 movq %rax, %r15 testq %rax, %rax je 0x9af6 movl %r15d, %ecx subl %ebx, %ecx movq %r13, %rdi movl %r12d, %esi movq %rbx, %rdx callq 0x8ef4 incq %rbx movq %r14, %rdi movl %ebp, %esi movq %rbx, %rdx callq 0x8d82 testq %r15, %r15 setne %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/septag[P]sx/src/string.c
sx_findblock
sx_str_block sx_findblock(const char* str, char open, char close) { int count = 0; sx_str_block b = { NULL, NULL }; for (char ch = *str; ch && count >= 0; ch = *++str) { if (!b.start && ch == open) { b.start = str + 1; } else if (b.start && ch == close) { b.end = str - 1; return b; } } return b; }
movb (%rdi), %cl testb %cl, %cl je 0x9b4f incq %rdi xorl %r8d, %r8d movq %r8, %rax testq %r8, %r8 sete %r9b cmpb %sil, %cl sete %r10b movq %rdi, %r8 testb %r10b, %r9b jne 0x9b41 testq %rax, %rax je 0x9b3e cmpb %dl, %cl je 0x9b57 movq %rax, %r8 jmp 0x9b41 xorl %r8d, %r8d movb (%rdi), %cl incq %rdi testb %cl, %cl jne 0x9b17 movq %r8, %rax jmp 0x9b51 xorl %eax, %eax xorl %edi, %edi movq %rdi, %rdx retq addq $-0x2, %rdi jmp 0x9b53
/septag[P]sx/src/string.c
sx_ishex
bool sx_ishex(const char* str) { while (*str) { if (!sx_ishexchar(*str)) return false; ++str; } return true; }
movb (%rdi), %cl testb %cl, %cl je 0x9bc7 incq %rdi leal -0x41(%rcx), %eax cmpb $0x1a, %al setb %al shlb $0x5, %al addb %cl, %al addb $-0x61, %al cmpb $0x6, %al setb %dl addb $-0x30, %cl cmpb $0xa, %cl setb %al orb %dl, %al je 0x9bc6 movb (%rdi), %cl incq %rdi testb %cl, %cl jne 0x9b9c retq movb $0x1, %al retq
/septag[P]sx/src/string.c
sx_toupper
char* sx_toupper(char* dst, int dst_sz, const char* str) { int offset = 0; int dst_max = dst_sz - 1; while (*str && offset < dst_max) { dst[offset++] = sx_toupperchar(*str); ++str; } dst[offset] = '\0'; return dst; }
movq %rdi, %rax movb (%rdx), %cl testb %cl, %cl sete %dil cmpl $0x2, %esi setl %r8b orb %dil, %r8b jne 0x9c5d decl %esi xorl %edi, %edi leal -0x61(%rcx), %r8d cmpb $0x1a, %r8b setae %r8b shlb $0x5, %r8b addb %cl, %r8b addb $-0x20, %r8b movb %r8b, (%rax,%rdi) movb 0x1(%rdx,%rdi), %cl incq %rdi testb %cl, %cl je 0x9c5f cmpq %rsi, %rdi jb 0x9c30 jmp 0x9c5f xorl %edi, %edi movb $0x0, (%rax,%rdi) retq
/septag[P]sx/src/string.c
sx_strpool_create
sx_strpool* sx_strpool_create(const sx_alloc* alloc, const sx_strpool_config* conf) { strpool_config_t sconf; sconf.memctx = (void*)alloc; if (!conf) { sconf.ignore_case = 0; sconf.counter_bits = 12; sconf.index_bits = 20; sconf.entry_capacity = 4096; sconf.block_capacity = 32; sconf.block_size = 256 * 1024; sconf.min_length = 23; } else { sconf.ignore_case = conf->ignore_case; sconf.counter_bits = conf->counter_bits; sconf.index_bits = conf->index_bits; sconf.entry_capacity = conf->entry_capacity; sconf.block_capacity = conf->block_capacity; sconf.block_size = conf->block_sz_kb * 1024; sconf.min_length = conf->min_str_len; } strpool_t* sp = (strpool_t*)sx_malloc(alloc, sizeof(strpool_t)); if (!sp) { sx_out_of_memory(); return NULL; } strpool_init(sp, &sconf); return sp; }
pushq %r14 pushq %rbx subq $0x38, %rsp movq %rdi, %rax movq %rdi, 0x10(%rsp) testq %rsi, %rsi je 0x9cc7 movups (%rsi), %xmm0 movl 0x10(%rsi), %edx movl 0x14(%rsi), %ecx shll $0xa, %ecx movl 0x18(%rsi), %esi jmp 0x9cdd movaps 0x45c2(%rip), %xmm0 # 0xe290 movl $0x17, %esi movl $0x40000, %ecx # imm = 0x40000 movl $0x20, %edx movups %xmm0, 0x18(%rsp) movl %edx, 0x28(%rsp) movl %ecx, 0x2c(%rsp) movl %esi, 0x30(%rsp) movq 0x8(%rax), %rcx movq %rcx, (%rsp) movl $0x80, %esi xorl %edi, %edi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *(%rax) movq %rax, %rbx testq %rax, %rax je 0x9d20 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x56d4 jmp 0x9d4b leaq 0x4dc9(%rip), %r14 # 0xeaf0 movq %r14, %rdi movl $0x2ff, %esi # imm = 0x2FF callq 0x48c0 leaq 0x4e5f(%rip), %rdx # 0xeb9a movq %r14, %rdi movl $0x2ff, %esi # imm = 0x2FF xorl %eax, %eax callq 0xc102 int3 movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r14 retq
/septag[P]sx/src/string.c
stbsp__clamp_callback
static char *stbsp__clamp_callback(char *buf, void *user, int len) { stbsp__context *c = (stbsp__context *)user; if (len > c->count) len = c->count; if (len) { if (buf != c->buf) { char *s, *d, *se; d = c->buf; s = buf; se = buf + len; do { *d++ = *s++; } while (s < se); } c->buf += len; c->count -= len; } if (c->count <= 0) return 0; return (c->count >= STB_SPRINTF_MIN) ? c->buf : c->tmp; // go direct into buffer if you can }
movq %rsi, %rax movl 0x8(%rsi), %ecx cmpl %edx, %ecx cmovll %ecx, %edx testl %edx, %edx je 0x9f2a movq (%rax), %rsi movslq %edx, %r8 cmpq %rdi, %rsi je 0x9f1f leaq (%rdi,%r8), %rcx movb (%rdi), %r9b incq %rdi movb %r9b, (%rsi) incq %rsi cmpq %rcx, %rdi jb 0x9f08 movq (%rax), %rsi movl 0x8(%rax), %ecx addq %r8, %rsi movq %rsi, (%rax) subl %edx, %ecx movl %ecx, 0x8(%rax) testl %ecx, %ecx jle 0x9f3a cmpl $0x200, %ecx # imm = 0x200 jb 0x9f3d movq (%rax), %rax retq xorl %eax, %eax retq addq $0xc, %rax retq
/septag[P]sx/src/../3rdparty/stb/stb_printf.h
stbsp__real_to_str
static stbsp__int32 stbsp__real_to_str(char const **start, stbsp__uint32 *len, char *out, stbsp__int32 *decimal_pos, double value, stbsp__uint32 frac_digits) { double d; stbsp__int64 bits = 0; stbsp__int32 expo, e, ng, tens; d = value; STBSP__COPYFP(bits, d); expo = (stbsp__int32)((bits >> 52) & 2047); ng = (stbsp__int32)(bits >> 63); if (ng) d = -d; if (expo == 2047) // is nan or inf? { *start = (bits & ((((stbsp__uint64)1) << 52) - 1)) ? "NaN" : "Inf"; *decimal_pos = STBSP__SPECIAL; *len = 3; return ng; } if (expo == 0) // is zero or denormal { if ((bits << 1) == 0) // do zero { *decimal_pos = 1; *start = out; out[0] = '0'; *len = 1; return ng; } // find the right expo for denormals { stbsp__int64 v = ((stbsp__uint64)1) << 51; while ((bits & v) == 0) { --expo; v >>= 1; } } } // find the decimal exponent as well as the decimal bits of the value { double ph, pl; // log10 estimate - very specifically tweaked to hit or undershoot by no more than 1 of log10 of all expos 1..2046 tens = expo - 1023; tens = (tens < 0) ? ((tens * 617) / 2048) : (((tens * 1233) / 4096) + 1); // move the significant bits into position and stick them into an int stbsp__raise_to_power10(&ph, &pl, d, 18 - tens); // get full as much precision from double-double as possible stbsp__ddtoS64(bits, ph, pl); // check if we undershot if (((stbsp__uint64)bits) >= stbsp__tento19th) ++tens; } // now do the rounding in integer land frac_digits = (frac_digits & 0x80000000) ? ((frac_digits & 0x7ffffff) + 1) : (tens + frac_digits); if ((frac_digits < 24)) { stbsp__uint32 dg = 1; if ((stbsp__uint64)bits >= stbsp__powten[9]) dg = 10; while ((stbsp__uint64)bits >= stbsp__powten[dg]) { ++dg; if (dg == 20) goto noround; } if (frac_digits < dg) { stbsp__uint64 r; // add 0.5 at the right position and round e = dg - frac_digits; if ((stbsp__uint32)e >= 24) goto noround; r = stbsp__powten[e]; bits = bits + (r / 2); if ((stbsp__uint64)bits >= stbsp__powten[dg]) ++tens; bits /= r; } noround:; } // kill long trailing runs of zeros if (bits) { stbsp__uint32 n; for (;;) { if (bits <= 0xffffffff) break; if (bits % 1000) goto donez; bits /= 1000; } n = (stbsp__uint32)bits; while ((n % 1000) == 0) n /= 1000; bits = n; donez:; } // convert to string out += 64; e = 0; for (;;) { stbsp__uint32 n; char *o = out - 8; // do the conversion in chunks of U32s (avoid most 64-bit divides, worth it, constant denomiators be damned) if (bits >= 100000000) { n = (stbsp__uint32)(bits % 100000000); bits /= 100000000; } else { n = (stbsp__uint32)bits; bits = 0; } while (n) { out -= 2; *(stbsp__uint16 *)out = *(stbsp__uint16 *)&stbsp__digitpair[(n % 100) * 2]; n /= 100; e += 2; } if (bits == 0) { if ((e) && (out[0] == '0')) { ++out; --e; } break; } while (out != o) { *--out = '0'; ++e; } } *decimal_pos = tens; *start = out; *len = e; return ng; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rcx, %r14 movq %rdx, %r13 movq %xmm0, %r11 movq %r11, %rax shrq $0x34, %rax andl $0x7ff, %eax # imm = 0x7FF je 0x9f9e cmpl $0x7ff, %eax # imm = 0x7FF jne 0x9fe6 movq %r11, %rax shlq $0xc, %rax leaq 0x4da1(%rip), %rax # 0xed1f leaq 0x4d96(%rip), %rcx # 0xed1b cmoveq %rax, %rcx movq %rcx, (%rdi) movl $0x7000, (%r14) # imm = 0x7000 movl $0x3, %r15d jmp 0xa626 xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jne 0x9fc4 jp 0x9fc4 movl $0x1, (%r14) movq %r13, (%rdi) movb $0x30, (%r13) movl $0x1, %r15d jmp 0xa626 movl $0xfffffc01, %ecx # imm = 0xFFFFFC01 btq $0x33, %r11 jb 0x9ff3 movabsq $0x8000000000000, %rcx # imm = 0x8000000000000 xorl %eax, %eax decl %eax shrq %rcx testq %r11, %rcx je 0x9fdc leal -0x3ff(%rax), %ecx cmpl $0x3fe, %eax # imm = 0x3FE jg 0xa003 imull $0xfffffd97, %ecx, %r15d # imm = 0xFFFFFD97 shrl $0xb, %r15d negl %r15d jmp 0xa011 imull $0x4d1, %ecx, %r15d # imm = 0x4D1 shrl $0xc, %r15d incl %r15d andpd 0x4287(%rip), %xmm0 # 0xe2a0 movl $0x12, %eax subl %r15d, %eax cmpl $0x16, %eax ja 0xa098 movl %eax, %eax leaq 0x4431(%rip), %rcx # 0xe460 movsd (%rcx,%rax,8), %xmm1 movapd %xmm0, %xmm2 mulsd %xmm1, %xmm2 movq %xmm0, %rax movabsq $0x7ffffffff8000000, %rcx # imm = 0x7FFFFFFFF8000000 andq %rax, %rcx movq %rcx, %xmm3 movq %xmm1, %rax andq $-0x8000000, %rax # imm = 0xF8000000 movq %rax, %xmm4 subsd %xmm3, %xmm0 subsd %xmm4, %xmm1 movapd %xmm3, %xmm5 mulsd %xmm4, %xmm5 subsd %xmm2, %xmm5 mulsd %xmm1, %xmm3 addsd %xmm5, %xmm3 mulsd %xmm0, %xmm4 addsd %xmm3, %xmm4 mulsd %xmm0, %xmm1 addsd %xmm4, %xmm1 movapd %xmm2, %xmm0 jmp 0xa398 movl %eax, %ecx negl %ecx cmovsl %eax, %ecx imull $0x2c9, %ecx, %edx # imm = 0x2C9 shrl $0xe, %edx cmpl $0xd, %edx movl $0xd, %eax cmovbl %edx, %eax imull $-0x17, %eax, %edx addl %ecx, %edx cmpl $0x13, %r15d jl 0xa152 testl %edx, %edx je 0xa1e3 movslq %edx, %r9 leaq 0x444c(%rip), %rdx # 0xe520 movsd -0x8(%rdx,%r9,8), %xmm2 movq %xmm0, %rdx movapd %xmm0, %xmm3 leaq 0x44e5(%rip), %r10 # 0xe5d0 movsd -0x8(%r10,%r9,8), %xmm1 mulsd %xmm0, %xmm1 mulsd %xmm2, %xmm0 movabsq $0x7ffffffff8000000, %r9 # imm = 0x7FFFFFFFF8000000 andq %rdx, %r9 movq %r9, %xmm4 movq %xmm2, %rdx andq $-0x8000000, %rdx # imm = 0xF8000000 movq %rdx, %xmm5 subsd %xmm4, %xmm3 subsd %xmm5, %xmm2 movapd %xmm4, %xmm6 mulsd %xmm5, %xmm6 subsd %xmm0, %xmm6 mulsd %xmm2, %xmm4 addsd %xmm6, %xmm4 mulsd %xmm3, %xmm5 addsd %xmm4, %xmm5 mulsd %xmm3, %xmm2 addsd %xmm5, %xmm2 addsd %xmm2, %xmm1 jmp 0xa1e7 testl %edx, %edx je 0xa278 cmpl $0x16, %edx movl $0x16, %ebp cmovll %edx, %ebp movslq %ebp, %r9 leaq 0x42f1(%rip), %rbx # 0xe460 movsd (%rbx,%r9,8), %xmm1 movapd %xmm0, %xmm3 mulsd %xmm1, %xmm3 movq %xmm0, %r9 movabsq $0x7ffffffff8000000, %r10 # imm = 0x7FFFFFFFF8000000 andq %r9, %r10 movq %r10, %xmm2 movq %xmm1, %r9 andq $-0x8000000, %r9 # imm = 0xF8000000 movq %r9, %xmm4 subsd %xmm2, %xmm0 subsd %xmm4, %xmm1 movapd %xmm2, %xmm5 mulsd %xmm4, %xmm5 subsd %xmm3, %xmm5 mulsd %xmm1, %xmm2 addsd %xmm5, %xmm2 mulsd %xmm0, %xmm4 addsd %xmm2, %xmm4 mulsd %xmm0, %xmm1 addsd %xmm4, %xmm1 cmpl $0x17, %edx jge 0xa27e movapd %xmm3, %xmm0 jmp 0xa2f6 xorpd %xmm1, %xmm1 cmpl $0x17, %ecx jb 0xa398 movapd %xmm0, %xmm2 addsd %xmm1, %xmm2 movapd %xmm2, %xmm4 subsd %xmm0, %xmm4 movl %eax, %eax leaq 0x4477(%rip), %rcx # 0xe680 movq -0x8(%rcx,%rax,8), %xmm3 movq %xmm2, %rcx subsd %xmm4, %xmm1 movq $-0x8000000, %rdx # imm = 0xF8000000 andq %rdx, %rcx movq %rcx, %xmm4 movq %xmm3, %rcx movapd %xmm2, %xmm0 mulsd %xmm3, %xmm0 andq %rdx, %rcx movq %rcx, %xmm5 movapd %xmm2, %xmm6 subsd %xmm4, %xmm6 mulsd %xmm3, %xmm1 subsd %xmm5, %xmm3 movapd %xmm4, %xmm7 mulsd %xmm5, %xmm7 subsd %xmm0, %xmm7 mulsd %xmm3, %xmm4 addsd %xmm7, %xmm4 mulsd %xmm6, %xmm5 addsd %xmm4, %xmm5 mulsd %xmm6, %xmm3 leaq 0x447d(%rip), %rcx # 0xe6f0 jmp 0xa382 xorpd %xmm1, %xmm1 jmp 0xa2f6 subl %ebp, %edx movapd %xmm3, %xmm2 addsd %xmm1, %xmm2 movapd %xmm2, %xmm0 subsd %xmm3, %xmm0 movq (%rbx,%rdx,8), %xmm4 movq %xmm2, %rdx subsd %xmm0, %xmm1 movq $-0x8000000, %r9 # imm = 0xF8000000 andq %r9, %rdx movq %rdx, %xmm3 movq %xmm4, %rdx movapd %xmm2, %xmm0 mulsd %xmm4, %xmm0 andq %r9, %rdx movq %rdx, %xmm5 subsd %xmm3, %xmm2 mulsd %xmm4, %xmm1 subsd %xmm5, %xmm4 movapd %xmm3, %xmm6 mulsd %xmm5, %xmm6 subsd %xmm0, %xmm6 mulsd %xmm4, %xmm3 addsd %xmm6, %xmm3 mulsd %xmm2, %xmm5 addsd %xmm3, %xmm5 mulsd %xmm2, %xmm4 addsd %xmm5, %xmm4 addsd %xmm4, %xmm1 cmpl $0x17, %ecx jb 0xa398 movapd %xmm0, %xmm2 addsd %xmm1, %xmm2 movapd %xmm2, %xmm4 subsd %xmm0, %xmm4 movl %eax, %eax leaq 0x4448(%rip), %rcx # 0xe760 movq -0x8(%rcx,%rax,8), %xmm3 movq %xmm2, %rcx subsd %xmm4, %xmm1 movq $-0x8000000, %rdx # imm = 0xF8000000 andq %rdx, %rcx movq %rcx, %xmm4 movq %xmm3, %rcx movapd %xmm2, %xmm0 mulsd %xmm3, %xmm0 andq %rdx, %rcx movq %rcx, %xmm5 movapd %xmm2, %xmm6 subsd %xmm4, %xmm6 mulsd %xmm3, %xmm1 subsd %xmm5, %xmm3 movapd %xmm4, %xmm7 mulsd %xmm5, %xmm7 subsd %xmm0, %xmm7 mulsd %xmm3, %xmm4 addsd %xmm7, %xmm4 mulsd %xmm6, %xmm5 addsd %xmm4, %xmm5 mulsd %xmm6, %xmm3 leaq 0x444e(%rip), %rcx # 0xe7d0 mulsd -0x8(%rcx,%rax,8), %xmm2 addsd %xmm5, %xmm3 addsd %xmm1, %xmm2 addsd %xmm3, %xmm2 movapd %xmm2, %xmm1 movapd %xmm0, %xmm2 addsd %xmm1, %xmm2 movapd %xmm2, %xmm3 subsd %xmm0, %xmm3 cvttsd2si %xmm2, %rax subsd %xmm3, %xmm1 xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 movapd %xmm2, %xmm3 subsd %xmm0, %xmm3 movapd %xmm3, %xmm4 subsd %xmm2, %xmm4 movapd %xmm3, %xmm5 subsd %xmm4, %xmm5 subsd %xmm5, %xmm2 addsd %xmm0, %xmm4 subsd %xmm4, %xmm2 addsd %xmm3, %xmm2 addsd %xmm1, %xmm2 cvttsd2si %xmm2, %rcx addq %rax, %rcx movabsq $0xde0b6b3a763ffff, %rax # imm = 0xDE0B6B3A763FFFF xorl %edx, %edx cmpq %rax, %rcx seta %dl addl %edx, %r15d movl %r8d, %edx andl $0x7ffffff, %edx # imm = 0x7FFFFFF incl %edx leal (%r15,%r8), %eax testl %r8d, %r8d cmovsl %edx, %eax cmpl $0x17, %eax ja 0xa488 xorl %edx, %edx cmpq $0x3b9aca00, %rcx # imm = 0x3B9ACA00 setae %dl leal (%rdx,%rdx,8), %r9d leaq 0x3f8d(%rip), %rdx # 0xe3c0 leaq (%rdx,%r9,8), %r8 addq $0x8, %r8 notl %r9d movq (%r8), %r10 cmpq %r10, %rcx jb 0xa455 decl %r9d addq $0x8, %r8 cmpl $-0x14, %r9d jne 0xa43e jmp 0xa488 movl %r9d, %r8d negl %r8d cmpl %r8d, %eax jae 0xa488 addl %r9d, %eax negl %eax cmpl $0x17, %eax ja 0xa488 movl %eax, %eax movq (%rdx,%rax,8), %r8 movq %r8, %rax shrq %rax addq %rcx, %rax cmpq %r10, %rax sbbl $-0x1, %r15d xorl %edx, %edx divq %r8 movq %rax, %rcx testq %rcx, %rcx movq %r11, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq %r14, 0x10(%rsp) movq %rdi, 0x8(%rsp) movq %r15, (%rsp) je 0xa4b9 movabsq $0x100000000, %rax # imm = 0x100000000 cmpq %rax, %rcx jge 0xa4bd movq %rcx, %rdx jmp 0xa505 xorl %ecx, %ecx jmp 0xa534 movabsq $0x20c49ba5e353f7cf, %r9 # imm = 0x20C49BA5E353F7CF movabsq $0x1cac083126e978d5, %r10 # imm = 0x1CAC083126E978D5 movabsq $0x4189374bc6a7ef, %r8 # imm = 0x4189374BC6A7EF movq %rcx, %rax shrq $0x3, %rax mulq %r9 movq %rcx, %rax imulq %r10, %rax rorq $0x3, %rax cmpq %r8, %rax ja 0xa534 shrq $0x4, %rdx shrq $0x23, %rcx cmpl $0x7c, %ecx movq %rdx, %rcx ja 0xa4db imull $0x26e978d5, %edx, %eax # imm = 0x26E978D5 rorl $0x3, %eax cmpl $0x418937, %eax # imm = 0x418937 ja 0xa532 movl %edx, %eax imulq $0x10624dd3, %rax, %rdx # imm = 0x10624DD3 shrq $0x26, %rdx imull $0x26e978d5, %edx, %eax # imm = 0x26E978D5 rorl $0x3, %eax cmpl $0x418938, %eax # imm = 0x418938 jb 0xa515 movl %edx, %ecx leaq 0x40(%r13), %r12 addq $0x3e, %r13 leaq 0x488d(%rip), %rbx # 0xedd0 xorl %r15d, %r15d cmpq $0x5f5e100, %rcx # imm = 0x5F5E100 jl 0xa577 movq %rcx, %rax movabsq $-0x543388ee7b9e3103, %rdx # imm = 0xABCC77118461CEFD mulq %rdx movq %rdx, %rbp shrq $0x1a, %rbp imulq $0x5f5e100, %rbp, %rax # imm = 0x5F5E100 subq %rax, %rcx jne 0xa580 xorl %r14d, %r14d jmp 0xa5bd movl $0x0, %ebp testl %ecx, %ecx je 0xa5ec xorl %r14d, %r14d movl %ecx, %eax imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F shrq $0x25, %rax imull $0x64, %eax, %edx movl %ecx, %esi subl %edx, %esi movzwl (%rbx,%rsi,2), %edx movw %dx, (%r13,%r14) addq $-0x2, %r14 cmpl $0x63, %ecx movl %eax, %ecx ja 0xa583 testq %rbp, %rbp je 0xa5e7 movl %r15d, %r15d subq %r14, %r15 cmpq $-0x8, %r14 je 0xa5d7 leaq -0x8(%r12), %rdi leaq 0x8(%r14), %rdx movl $0x30, %esi callq 0x41c0 addl %r14d, %r15d addl $0x8, %r15d addq $-0x8, %r12 addq $-0x8, %r13 movq %rbp, %rcx jmp 0xa546 subl %r14d, %r15d jmp 0xa5ef xorl %r14d, %r14d addq %r14, %r12 testl %r15d, %r15d movq 0x20(%rsp), %r11 movq 0x18(%rsp), %rsi je 0xa610 cmpb $0x30, (%r12) jne 0xa613 incq %r12 decl %r15d jmp 0xa613 xorl %r15d, %r15d movq 0x10(%rsp), %rax movq (%rsp), %rcx movl %ecx, (%rax) movq 0x8(%rsp), %rax movq %r12, (%rax) movl %r15d, (%rsi) sarq $0x3f, %r11 movl %r11d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/septag[P]sx/src/../3rdparty/stb/stb_printf.h
sx__new_job
static sx__job* sx__new_job(sx_job_context* ctx, int index, sx_job_cb* callback, void* user, int range_start, int range_end, sx_job_t counter, uint32_t tags, sx_job_priority priority) { sx__job* j = (sx__job*)sx_pool_new(ctx->job_pool); if (j) { j->job_index = index; j->owner_tid = 0; j->tags = tags; j->done = 0; if (!j->stack_mem.sptr) { // Initialize stack memory if (!sx_fiber_stack_init(&j->stack_mem, ctx->stack_sz)) { sx_out_of_memory(); return NULL; } } j->fiber = sx_fiber_create(j->stack_mem, fiber_fn); j->counter = counter; j->wait_counter = &ctx->dummy_counter; j->ctx = ctx; j->callback = callback; j->user = user; j->range_start = range_start; j->range_end = range_end; j->priority = priority; j->next = j->prev = NULL; } return j; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r9d, %ebp movl %r8d, %r14d movq %rcx, %r15 movq %rdx, %r12 movq %rdi, %r13 movl 0x48(%rsp), %eax movq 0x18(%rdi), %rcx movq 0x8(%rcx), %rcx movl 0x18(%rcx), %edx testl %edx, %edx jne 0xab88 movq 0x10(%rcx), %rcx testq %rcx, %rcx jne 0xab73 jmp 0xac23 jle 0xac23 movq (%rcx), %rdi decl %edx movl %edx, 0x18(%rcx) movq (%rdi,%rdx,8), %rbx testq %rbx, %rbx je 0xac52 movl %esi, (%rbx) movl %eax, 0xc(%rbx) movq $0x0, 0x4(%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi jne 0xabd9 leaq 0x10(%rbx), %rdi movl 0x14(%r13), %esi movq %rdi, (%rsp) callq 0xc894 testb %al, %al je 0xac56 movq (%rsp), %rax movq (%rax), %rdi movl 0x18(%rbx), %esi leaq 0x11ab(%rip), %rdx # 0xbd8e callq 0xc9e6 movq %rax, 0x20(%rbx) movq 0x40(%rsp), %rax movq %rax, 0x30(%rbx) leaq 0xd0(%r13), %rax movq %rax, 0x38(%rbx) movq %r13, 0x40(%rbx) movq %r12, 0x48(%rbx) movq %r15, 0x50(%rbx) movl %r14d, 0x58(%rbx) movl %ebp, 0x5c(%rbx) movl 0x50(%rsp), %eax movl %eax, 0x60(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x68(%rbx) jmp 0xac40 leaq 0x4491(%rip), %rdi # 0xf0bb leaq 0x44da(%rip), %rdx # 0xf10b xorl %ebx, %ebx movl $0x8f, %esi xorl %eax, %eax callq 0xc102 int3 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %ebx, %ebx jmp 0xac40 leaq 0x423c(%rip), %r14 # 0xee99 movq %r14, %rdi movl $0x81, %esi callq 0x48c0 leaq 0x3f29(%rip), %rdx # 0xeb9a xorl %ebx, %ebx movq %r14, %rdi movl $0x81, %esi jmp 0xac38
/septag[P]sx/src/jobs.c
sx_job_create_context
sx_job_context* sx_job_create_context(const sx_alloc* alloc, const sx_job_context_desc* desc) { sx_job_context* ctx = (sx_job_context*)sx_malloc(alloc, sizeof(sx_job_context)); if (!ctx) { sx_out_of_memory(); return NULL; } sx_memset(ctx, 0x0, sizeof(sx_job_context)); ctx->alloc = alloc; ctx->num_threads = desc->num_threads > 0 ? desc->num_threads : (sx_os_numcores() - 1); ctx->thread_tls = sx_tls_create(); ctx->stack_sz = desc->fiber_stack_sz > 0 ? desc->fiber_stack_sz : DEFAULT_FIBER_STACK_SIZE; ctx->thread_init_cb = desc->thread_init_cb; ctx->thread_shutdown_cb = desc->thread_shutdown_cb; ctx->thread_user = desc->thread_user_data; int max_fibers = desc->max_fibers > 0 ? desc->max_fibers : DEFAULT_MAX_FIBERS; sx_semaphore_init(&ctx->sem); sx__job_thread_data* main_tdata = sx__job_create_tdata(alloc, sx_thread_tid(), 0, true); if (!main_tdata) { sx_free(alloc, ctx); return NULL; } sx_tls_set(ctx->thread_tls, main_tdata); main_tdata->selector_fiber = sx_fiber_create(main_tdata->selector_stack, sx__job_selector_main_thrd); // pools ctx->job_pool = sx_pool_create(alloc, sizeof(sx__job), max_fibers); ctx->counter_pool = sx_pool_create(alloc, sizeof(int), COUNTER_POOL_SIZE); if (!ctx->job_pool || !ctx->counter_pool) return NULL; sx_memset(ctx->job_pool->pages->buff, 0x0, sizeof(sx__job) * max_fibers); // keep tags in an array for evaluating num_jobs ctx->tags = sx_malloc(alloc, sizeof(uint32_t) * ((size_t)ctx->num_threads + 1)); sx_memset(ctx->tags, 0xff, sizeof(uint32_t) * ((size_t)ctx->num_threads + 1)); // Worker threads if (ctx->num_threads > 0) { ctx->threads = (sx_thread**)sx_malloc(alloc, sizeof(sx_thread*) * ctx->num_threads); sx_assert(ctx->threads); for (int i = 0; i < ctx->num_threads; i++) { char name[32]; sx_snprintf(name, sizeof(name), "sx_job_thread(%d)", i + 1); ctx->threads[i] = sx_thread_create(alloc, sx__job_thread_fn, ctx, (int)sx_os_minstacksz(), name, (void*)(intptr_t)i); sx_assertf(ctx->threads[i], "sx_thread_create failed!"); } } return ctx; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %r15 movq %rdi, %r14 movq 0x8(%rdi), %rax movq %rax, (%rsp) movl $0x1c0, %esi # imm = 0x1C0 xorl %edi, %edi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *(%r14) testq %rax, %rax je 0xb5c9 movq %rax, %rbx movl $0x1c0, %edx # imm = 0x1C0 movq %rax, %rdi xorl %esi, %esi callq 0x41c0 movq %r14, (%rbx) movl (%r15), %eax testl %eax, %eax jg 0xb479 callq 0x56c9 decl %eax movl %eax, 0x10(%rbx) callq 0xc1b0 movq %rax, 0xc8(%rbx) movl 0x8(%r15), %eax testl %eax, %eax movl $0x100000, %ecx # imm = 0x100000 cmovgl %eax, %ecx movl %ecx, 0x14(%rbx) movups 0x10(%r15), %xmm0 movups %xmm0, 0x168(%rbx) movq 0x20(%r15), %rax movq %rax, 0x178(%rbx) movl 0x4(%r15), %eax testl %eax, %eax movl $0x40, %r13d cmovgl %eax, %r13d movq %rbx, %rdi addq $0xe0, %rdi callq 0xc381 callq 0xc885 movq (%r14), %rdi movq 0x8(%r14), %rsi movl %eax, %edx xorl %ecx, %ecx movl $0x1, %r8d callq 0xb877 testq %rax, %rax je 0xb5fb movq %rax, %r15 movq 0xc8(%rbx), %rdi movq %rax, %rsi callq 0xc209 movq 0x8(%r15), %rdi movl 0x10(%r15), %esi leaq -0x4a6(%rip), %rdx # 0xb06e callq 0xc9e6 movq %rax, 0x18(%r15) movq 0x8(%r14), %rax leal 0xf(%r13), %r12d andl $-0x10, %r12d movq %r12, %rsi shlq $0x7, %rsi orq $0x30, %rsi movq %rax, (%rsp) leaq 0x395a(%rip), %rcx # 0xee99 leaq 0x3aca(%rip), %r8 # 0xf010 xorl %edi, %edi movl $0x10, %edx movl $0x24d, %r9d # imm = 0x24D callq *(%r14) movq %rax, %r15 testq %rax, %rax je 0xb61a leaq 0x10(%r15), %rax movl $0x78, (%r15) movl %r12d, 0x4(%r15) movq %rax, 0x8(%r15) leaq 0x30(%r15), %rax movl %r12d, 0x28(%r15) movq %rax, 0x10(%r15) leaq (%r15,%r12,8), %rdi addq $0x30, %rdi movq %rdi, 0x18(%r15) movq $0x0, 0x20(%r15) testl %r12d, %r12d jle 0xb5bc xorl %eax, %eax movq %r12, %rcx movq 0x18(%r15), %rdx addq %rax, %rdx movq 0x10(%r15), %rsi movq %rdx, -0x8(%rsi,%rcx,8) addq $0x78, %rax decq %rcx jne 0xb59f movq 0x18(%r15), %rdi imull $0x78, %r12d, %edx xorl %esi, %esi callq 0x41c0 jmp 0xb645 leaq 0x38c9(%rip), %r14 # 0xee99 movq %r14, %rdi movl $0x233, %esi # imm = 0x233 callq 0x48c0 leaq 0x35b6(%rip), %rdx # 0xeb9a xorl %ebx, %ebx movq %r14, %rdi movl $0x233, %esi # imm = 0x233 xorl %eax, %eax callq 0xc102 int3 jmp 0xb865 movq 0x8(%r14), %rax movq %rax, (%rsp) movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *(%r14) jmp 0xb863 leaq 0x3a9a(%rip), %r12 # 0xf0bb movq %r12, %rdi movl $0x5b, %esi callq 0x48c0 leaq 0x3565(%rip), %rdx # 0xeb9a movq %r12, %rdi movl $0x5b, %esi xorl %eax, %eax callq 0xc102 int3 movq %r15, 0x18(%rbx) movq 0x8(%r14), %rax movq %rax, (%rsp) leaq 0x3841(%rip), %rcx # 0xee99 leaq 0x39b1(%rip), %r8 # 0xf010 movl $0xc30, %esi # imm = 0xC30 xorl %edi, %edi movl $0x10, %edx movl $0x24e, %r9d # imm = 0x24E callq *(%r14) testq %rax, %rax je 0xb830 movq %rax, %r15 addq $0x10, %rax movabsq $0x10000000004, %rcx # imm = 0x10000000004 movq %rcx, (%r15) movq %rax, 0x8(%r15) leaq 0x30(%r15), %rax movl $0x100, 0x28(%r15) # imm = 0x100 movq %rax, 0x10(%r15) movq %r15, %rax addq $0x830, %rax # imm = 0x830 movq %rax, 0x18(%r15) movq $0x0, 0x20(%r15) movl $0x1fe, %eax # imm = 0x1FE xorl %ecx, %ecx movq 0x18(%r15), %rdx addq %rcx, %rdx movq 0x10(%r15), %rsi movq %rdx, (%rsi,%rax,4) addq $0x4, %rcx addq $-0x2, %rax cmpq $0x400, %rcx # imm = 0x400 jne 0xb6c1 movq 0x18(%r15), %rdi movl $0x400, %edx # imm = 0x400 xorl %esi, %esi callq 0x41c0 movq %r15, 0x20(%rbx) movq 0x18(%rbx), %rax testq %rax, %rax je 0xb863 movq 0x8(%rax), %rax movq 0x8(%rax), %rdi movl %r13d, %eax imulq $0x78, %rax, %rdx xorl %esi, %esi callq 0x41c0 movslq 0x10(%rbx), %rax leaq 0x4(,%rax,4), %rsi movq 0x8(%r14), %rax movq %rax, (%rsp) xorl %edi, %edi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *(%r14) movq %rax, 0x58(%rbx) movslq 0x10(%rbx), %rcx leaq 0x4(,%rcx,4), %rdx movq %rax, %rdi movl $0xff, %esi callq 0x41c0 movslq 0x10(%rbx), %rsi testq %rsi, %rsi jle 0xb865 shlq $0x3, %rsi movq 0x8(%r14), %rax movq %rax, (%rsp) xorl %edi, %edi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *(%r14) movq %rax, 0x8(%rbx) testq %rax, %rax jne 0xb7a4 leaq 0x3709(%rip), %rdi # 0xee99 leaq 0x38ce(%rip), %rdx # 0xf065 movl $0x25a, %esi # imm = 0x25A xorl %eax, %eax callq 0xc102 int3 cmpl $0x0, 0x10(%rbx) jle 0xb865 leaq 0x10(%rsp), %r12 leaq 0x178(%rip), %r13 # 0xb932 xorl %r15d, %r15d movq %r15, %rbp incq %r15 movq %r12, %rdi movl $0x20, %esi leaq 0x38a0(%rip), %rdx # 0xf072 movl %r15d, %ecx xorl %eax, %eax callq 0x6b8e callq 0x4e49 movq %r14, %rdi movq %r13, %rsi movq %rbx, %rdx movl %eax, %ecx movq %r12, %r8 movq %rbp, %r9 callq 0xc235 movq 0x8(%rbx), %rcx movq %rax, (%rcx,%rbp,8) movq 0x8(%rbx), %rax cmpq $0x0, (%rax,%rbp,8) jne 0xb825 leaq 0x3688(%rip), %rdi # 0xee99 movl $0x261, %esi # imm = 0x261 leaq 0x3867(%rip), %rdx # 0xf084 xorl %eax, %eax callq 0xc102 int3 movslq 0x10(%rbx), %rax cmpq %rax, %r15 jl 0xb7bd jmp 0xb865 leaq 0x3884(%rip), %r14 # 0xf0bb movq %r14, %rdi movl $0x5b, %esi callq 0x48c0 leaq 0x334f(%rip), %rdx # 0xeb9a movq %r14, %rdi movl $0x5b, %esi xorl %eax, %eax callq 0xc102 int3 movq $0x0, 0x20(%rbx) xorl %ebx, %ebx movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/septag[P]sx/src/jobs.c
sx__job_create_tdata
static sx__job_thread_data* sx__job_create_tdata(const sx_alloc* alloc, uint32_t tid, int index, bool main_thrd) { sx__job_thread_data* tdata = (sx__job_thread_data*)sx_malloc(alloc, sizeof(sx__job_thread_data)); if (!tdata) { sx_out_of_memory(); return NULL; } sx_memset(tdata, 0x0, sizeof(sx__job_thread_data)); tdata->thread_index = index; tdata->tid = tid; tdata->tags = 0xffffffff; tdata->main_thrd = main_thrd; bool r = sx_fiber_stack_init(&tdata->selector_stack, (int)sx_os_minstacksz()); sx_assertf(r, "Not enough memory for temp stacks"); sx_unused(r); return tdata; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %r8d, %ebp movl %ecx, %r15d movl %edx, %r14d movq %rdi, %rax movq %rsi, (%rsp) movl $0x30, %esi xorl %edi, %edi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *%rax movq %rax, %rbx testq %rax, %rax je 0xb8f9 xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, (%rbx) movl %r15d, 0x20(%rbx) movl %r14d, 0x24(%rbx) movl $0xffffffff, 0x28(%rbx) # imm = 0xFFFFFFFF movb %bpl, 0x2c(%rbx) movq %rbx, %r14 addq $0x8, %r14 callq 0x4e49 movq %r14, %rdi movl %eax, %esi callq 0xc894 testb %al, %al jne 0xb924 leaq 0x35ae(%rip), %rdi # 0xee99 leaq 0x38db(%rip), %rdx # 0xf1cd movl $0x204, %esi # imm = 0x204 jmp 0xb91c leaq 0x3599(%rip), %r14 # 0xee99 movq %r14, %rdi movl $0x1fa, %esi # imm = 0x1FA callq 0x48c0 leaq 0x3286(%rip), %rdx # 0xeb9a movq %r14, %rdi movl $0x1fa, %esi # imm = 0x1FA xorl %eax, %eax callq 0xc102 int3 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
/septag[P]sx/src/jobs.c
sx__del_job
static void sx__del_job(sx_job_context* ctx, sx__job* job) { sx_lock(ctx->job_lk) { sx_pool_del(ctx->job_pool, job); } }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movl $0x1, %eax xchgl %eax, 0x80(%rdi) testl %eax, %eax jne 0xbedf jmp 0xbef6 pause movl 0x80(%rbx), %eax testl %eax, %eax jne 0xbedd movl $0x1, %eax xchgl %eax, 0x80(%rbx) jmp 0xbed7 movq 0x18(%rbx), %rax movq 0x8(%rax), %r15 testq %r15, %r15 je 0xbf2c movslq 0x4(%rax), %r12 movslq (%rax), %rcx movq %rcx, %rax imulq %r12, %rax movq 0x8(%r15), %rdx cmpq %r14, %rdx ja 0xbf23 leaq (%rdx,%rax), %rsi cmpq %r14, %rsi ja 0xbf49 movq 0x10(%r15), %r15 testq %r15, %r15 jne 0xbf11 leaq 0x3188(%rip), %rdi # 0xf0bb leaq 0x3270(%rip), %rdx # 0xf1aa movl $0xe0, %esi xorl %eax, %eax callq 0xc102 int3 jmp 0xbfac movq %r14, %rax subq %rdx, %rax xorl %edx, %edx divq %rcx testq %rdx, %rdx je 0xbf74 leaq 0x315b(%rip), %rdi # 0xf0bb leaq 0x31e2(%rip), %rdx # 0xf149 movl $0xd6, %esi xorl %eax, %eax callq 0xc102 int3 movl 0x18(%r15), %eax cmpl %r12d, %eax jne 0xbf9c leaq 0x3137(%rip), %rdi # 0xf0bb leaq 0x31ec(%rip), %rdx # 0xf177 movl $0xd8, %esi xorl %eax, %eax callq 0xc102 int3 movl 0x18(%r15), %eax movq (%r15), %rcx leal 0x1(%rax), %edx movl %edx, 0x18(%r15) cltq movq %r14, (%rcx,%rax,8) movl $0x0, 0x80(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/septag[P]sx/src/jobs.c
sx_thread_create
sx_thread* sx_thread_create(const sx_alloc* alloc, sx_thread_cb* callback, void* user_data1, int stack_sz, const char* name, void* user_data2) { sx_thread* thrd = (sx_thread*)sx_malloc(alloc, sizeof(sx_thread)); if (!thrd) return NULL; sx_semaphore_init(&thrd->sem); thrd->callback = callback; thrd->user_data1 = user_data1; thrd->user_data2 = user_data2; thrd->stack_sz = sx_max(stack_sz, (int)sx_os_minstacksz()); thrd->running = true; pthread_attr_t attr; int r = pthread_attr_init(&attr); sx_unused(r); sx_assertf(r == 0, "pthread_attr_init failed"); r = pthread_attr_setstacksize(&attr, thrd->stack_sz); sx_assertf(r == 0, "pthread_attr_setstacksize failed"); # if SX_PLATFORM_APPLE thrd->name[0] = 0; if (name) sx_strcpy(thrd->name, sizeof(thrd->name), name); # endif r = pthread_create(&thrd->handle, &attr, thread_fn, thrd); sx_assertf(r == 0, "pthread_create failed"); // Ensure that thread callback is running sx_semaphore_wait(&thrd->sem, -1); # if !SX_PLATFORM_APPLE if (name) sx_thread_setname(thrd, name); # endif return thrd; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r9, %r15 movq %r8, %rbx movl %ecx, %ebp movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rax movq 0x8(%rdi), %rcx movq %rcx, (%rsp) movl $0xb0, %esi xorl %edi, %edi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq *(%rax) movq %rax, %r14 testq %rax, %rax je 0xc36f movq %r14, %rdi callq 0xc381 movq %r13, 0x80(%r14) movq %r12, 0x90(%r14) movq %r15, 0x98(%r14) callq 0x4e49 cmpl %ebp, %eax cmovgl %eax, %ebp movl %ebp, 0xa0(%r14) movb $0x1, 0xa4(%r14) leaq 0x10(%rsp), %rdi callq 0x4220 testl %eax, %eax je 0xc2da leaq 0x2f69(%rip), %rdi # 0xf22f leaq 0x2ffc(%rip), %rdx # 0xf2c9 movl $0xd6, %esi xorl %eax, %eax callq 0xc102 int3 movslq 0xa0(%r14), %rsi leaq 0x10(%rsp), %rdi callq 0x44c0 testl %eax, %eax je 0xc30a leaq 0x2f39(%rip), %rdi # 0xf22f leaq 0x2fe5(%rip), %rdx # 0xf2e2 movl $0xd8, %esi xorl %eax, %eax callq 0xc102 int3 movq %r14, %rdi addq $0x88, %rdi leaq 0xc6(%rip), %rdx # 0xc3e1 leaq 0x10(%rsp), %rsi movq %r14, %rcx callq 0x4340 testl %eax, %eax je 0xc347 leaq 0x2efc(%rip), %rdi # 0xf22f leaq 0x2fc9(%rip), %rdx # 0xf303 movl $0xe1, %esi xorl %eax, %eax callq 0xc102 int3 movq %r14, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0xc407 testq %rbx, %rbx je 0xc36f movl $0xf, %edi movq %rbx, %rsi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d xorl %eax, %eax callq 0x42a0 movq %r14, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/septag[P]sx/src/threads.c
thread_fn
static void* thread_fn(void* arg) { sx_thread* thrd = (sx_thread*)arg; union { void* ptr; int32_t i; } cast; # if SX_PLATFORM_APPLE if (thrd->name[0]) sx_thread_setname(thrd, thrd->name); # endif sx_semaphore_post(&thrd->sem, 1); cast.i = thrd->callback(thrd->user_data1, thrd->user_data2); return cast.ptr; }
pushq %rbx movq %rdi, %rbx movl $0x1, %esi callq 0xc7db movq 0x90(%rbx), %rdi movq 0x98(%rbx), %rsi callq *0x80(%rbx) movl %eax, %eax popq %rbx retq
/septag[P]sx/src/threads.c
sx_signal_init
void sx_signal_init(sx_signal* sig) { sx__signal* _sig = (sx__signal*)sig->data; _sig->value = 0; int r = pthread_mutex_init(&_sig->mutex, NULL); sx_assertf(r == 0, "pthread_mutex_init failed"); r = pthread_cond_init(&_sig->cond, NULL); sx_assertf(r == 0, "pthread_cond_init failed"); sx_unused(r); }
pushq %rbx movq %rdi, %rbx movl $0x0, 0x58(%rdi) xorl %esi, %esi callq 0x4470 testl %eax, %eax je 0xc68d leaq 0x2bb6(%rip), %rdi # 0xf22f leaq 0x2cb7(%rip), %rdx # 0xf337 movl $0x161, %esi # imm = 0x161 xorl %eax, %eax callq 0xc102 int3 addq $0x28, %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x42b0 testl %eax, %eax je 0xc6ba leaq 0x2b89(%rip), %rdi # 0xf22f leaq 0x2ca4(%rip), %rdx # 0xf351 movl $0x164, %esi # imm = 0x164 xorl %eax, %eax callq 0xc102 int3 popq %rbx retq
/septag[P]sx/src/threads.c
sx_signal_wait
bool sx_signal_wait(sx_signal* sig, int msecs) { sx__signal* _sig = (sx__signal*)sig->data; int r = pthread_mutex_lock(&_sig->mutex); sx_assert(r == 0); if (msecs == -1) { r = pthread_cond_wait(&_sig->cond, &_sig->mutex); } else { struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); sx__tm_add(&ts, msecs); r = pthread_cond_timedwait(&_sig->cond, &_sig->mutex, &ts); } bool ok = r == 0; if (ok) _sig->value = 0; r = pthread_mutex_unlock(&_sig->mutex); sx_unused(r); return ok; }
pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movl %esi, %ebp movq %rdi, %rbx callq 0x44a0 testl %eax, %eax je 0xc747 leaq 0x2afc(%rip), %rdi # 0xf22f leaq 0x2bf6(%rip), %rdx # 0xf330 movl $0x17f, %esi # imm = 0x17F xorl %eax, %eax callq 0xc102 int3 cmpl $-0x1, %ebp je 0xc7ab movq %rsp, %r14 xorl %edi, %edi movq %r14, %rsi callq 0x40d0 imulq $0x3b9aca00, (%r14), %rax # imm = 0x3B9ACA00 movslq %ebp, %rcx imulq $0xf4240, %rcx, %rcx # imm = 0xF4240 addq 0x8(%r14), %rcx addq %rax, %rcx movq %rcx, %rax shrq $0x9, %rax movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53 mulq %rdx shrq $0xb, %rdx movq %rdx, (%r14) imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00 subq %rax, %rcx movq %rcx, 0x8(%r14) leaq 0x28(%rbx), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x4360 jmp 0xc7b7 leaq 0x28(%rbx), %rdi movq %rbx, %rsi callq 0x40f0 testl %eax, %eax jne 0xc7c2 movl $0x0, 0x58(%rbx) testl %eax, %eax sete %bpl movq %rbx, %rdi callq 0x42c0 movl %ebp, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq
/septag[P]sx/src/threads.c
sx_fiber_stack_init_ptr
void sx_fiber_stack_init_ptr(sx_fiber_stack* fstack, void* ptr, unsigned int size) { size_t page_sz = sx_os_pagesz(); sx_unused(page_sz); sx_assertf((uintptr_t)ptr % page_sz == 0, "buffer size must be dividable to OS page size"); sx_assertf(size % page_sz == 0, "buffer size must be dividable to OS page size"); fstack->sptr = ptr; fstack->ssize = size; }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movl %edx, %ebx movq %rsi, %r15 movq %rdi, %r14 callq 0x4e20 movq %rax, %r12 movq %r15, %rax xorl %edx, %edx divq %r12 testq %rdx, %rdx je 0xc976 leaq 0x2a22(%rip), %rdi # 0xf384 leaq 0x2a65(%rip), %rdx # 0xf3ce movl $0x4b, %esi xorl %eax, %eax callq 0xc102 int3 movl %ebx, %eax xorl %edx, %edx divq %r12 testq %rdx, %rdx je 0xc99d leaq 0x29fb(%rip), %rdi # 0xf384 leaq 0x2a3e(%rip), %rdx # 0xf3ce movl $0x4c, %esi xorl %eax, %eax callq 0xc102 int3 movq %r15, (%r14) movl %ebx, 0x8(%r14) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
/septag[P]sx/src/fiber.c
sx_coro_update
void sx_coro_update(sx_coro_context* ctx, float dt) { sx_assert(ctx->cur_coro == NULL); sx__coro_state* fs = ctx->run_list; while (fs) { sx__coro_state* next = fs->next; // Check state and take action for pending fibers switch (fs->ret_state) { case CORO_RET_YIELD: { ++fs->counter.n; if (fs->counter.n >= fs->arg.n) { ctx->cur_coro = fs; fs->fiber = sx_fiber_switch(fs->fiber, fs->user).from; } break; } case CORO_RET_WAIT: { fs->counter.tm += dt; if (fs->counter.tm >= fs->arg.tm) { ctx->cur_coro = fs; fs->fiber = sx_fiber_switch(fs->fiber, fs->user).from; } break; } default: sx_assertf(0, "Invalid ret type in update loop"); break; } fs = next; } }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movss %xmm0, 0xc(%rsp) movq %rdi, %rbx cmpq $0x0, 0x20(%rdi) je 0xcfc1 leaq 0x23d7(%rip), %rdi # 0xf384 leaq 0x2504(%rip), %rdx # 0xf4b8 movl $0xf5, %esi xorl %eax, %eax callq 0xc102 int3 movq 0x10(%rbx), %r12 testq %r12, %r12 je 0xd048 leaq 0x23b3(%rip), %r14 # 0xf384 leaq 0x24f6(%rip), %r15 # 0xf4ce movq %r12, %r13 movq 0x38(%r12), %r12 movl 0x28(%r13), %eax cmpl $0x3, %eax je 0xd000 cmpl $0x2, %eax jne 0xd030 movl 0x30(%r13), %eax incl %eax movl %eax, 0x30(%r13) cmpl 0x2c(%r13), %eax jge 0xd019 jmp 0xd043 movss 0x30(%r13), %xmm0 addss 0xc(%rsp), %xmm0 movss %xmm0, 0x30(%r13) ucomiss 0x2c(%r13), %xmm0 jb 0xd043 movq %r13, 0x20(%rbx) movq (%r13), %rdi movq 0x20(%r13), %rsi callq 0xd4a0 movq %rax, (%r13) jmp 0xd043 movq %r14, %rdi movl $0x10e, %esi # imm = 0x10E movq %r15, %rdx xorl %eax, %eax callq 0xc102 int3 testq %r12, %r12 jne 0xcfd8 addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
/septag[P]sx/src/fiber.c
sx__coro_yield
void sx__coro_yield(sx_coro_context* ctx, sx_fiber_t* pfrom, int nupdates) { sx__coro_return(ctx, pfrom, CORO_RET_YIELD, nupdates); }
pushq %rbp pushq %r14 pushq %rbx movl %edx, %ebp movq %rsi, %rbx movq %rdi, %r14 movq 0x20(%rdi), %rax testq %rax, %rax jne 0xd42c leaq 0x1f70(%rip), %rdi # 0xf384 leaq 0x20d3(%rip), %rdx # 0xf4ee movl $0x135, %esi # imm = 0x135 xorl %eax, %eax callq 0xc102 int3 movq 0x20(%r14), %rax movl $0x2, 0x28(%rax) movl $0x0, 0x30(%rax) movl %ebp, 0x2c(%rax) movq $0x0, 0x20(%r14) movq (%rbx), %rdi xorl %esi, %esi callq 0xd4a0 movq %rax, (%rbx) popq %rbx popq %r14 popq %rbp retq nopw (%rax,%rax)
/septag[P]sx/src/fiber.c
KDReports::Test::vspaceInHeader()
void vspaceInHeader() { QFile file(":/vspaceInHeader.xml"); QVERIFY(file.open(QIODevice::ReadOnly)); Report report; KDReports::ErrorDetails details; QVERIFY(!report.loadFromXML(&file, &details)); QCOMPARE(details.line(), -1); QCOMPARE(details.column(), -1); QCOMPARE(details.driverMessage(), QString("<vspace> not allowed in headers, footers, or table cells")); QCOMPARE(details.message(), QString("<vspace> not allowed in headers, footers, or table cells")); }
pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xa0, %rsp leaq 0x775f(%rip), %rax # 0x11011 leaq 0x10(%rsp), %rsi movq %rax, (%rsi) leaq 0x28(%rsp), %rbx movq %rbx, %rdi callq 0xc766 movq (%rbx), %rsi movq 0x8(%rbx), %rdx leaq 0x70(%rsp), %rbx movq %rbx, %rdi callq 0x53a0 xorps %xmm0, %xmm0 leaq 0x50(%rsp), %r14 movaps %xmm0, (%r14) movups (%rbx), %xmm0 movq 0x8(%r14), %rax movaps %xmm0, (%r14) xorl %ecx, %ecx movq %rcx, (%rbx) movq %rax, 0x8(%rbx) movq 0x10(%rbx), %rax movq %rax, 0x10(%r14) movq %rcx, 0x10(%rbx) movq %rbx, %rdi callq 0xc7a2 leaq 0x40(%rsp), %rdi movq %r14, %rsi callq 0x5880 leaq 0x50(%rsp), %rdi callq 0xc7a2 leaq 0x40(%rsp), %rdi movl $0x1, %esi callq 0x5310 movzbl %al, %edi leaq 0x6b13(%rip), %rsi # 0x10452 leaq 0x6da0(%rip), %rdx # 0x106e6 leaq 0x6a33(%rip), %rcx # 0x10380 movl $0xe4, %r8d callq 0x5740 testb %al, %al je 0x9c12 leaq 0x50(%rsp), %rdi xorl %esi, %esi callq 0x52b0 leaq 0x8(%rsp), %rdi callq 0x5610 leaq 0x50(%rsp), %rdi leaq 0x40(%rsp), %rsi leaq 0x8(%rsp), %rdx callq 0x53e0 xorb $0x1, %al movzbl %al, %edi leaq 0x74a5(%rip), %rsi # 0x10e3b leaq 0x6d49(%rip), %rdx # 0x106e6 leaq 0x69dc(%rip), %rcx # 0x10380 movl $0xe7, %r8d callq 0x5740 testb %al, %al je 0x9bfe leaq 0x8(%rsp), %rdi callq 0x53c0 leaq 0x7498(%rip), %rdx # 0x10e60 leaq 0x75aa(%rip), %rcx # 0x10f79 leaq 0x69aa(%rip), %r8 # 0x10380 movl %eax, %edi movl $0xffffffff, %esi # imm = 0xFFFFFFFF movl $0xe8, %r9d callq 0x54f0 testb %al, %al je 0x9bfe leaq 0x8(%rsp), %rdi callq 0x56e0 leaq 0x746e(%rip), %rdx # 0x10e6f leaq 0x7571(%rip), %rcx # 0x10f79 leaq 0x6971(%rip), %rbx # 0x10380 movl %eax, %edi movl $0xffffffff, %esi # imm = 0xFFFFFFFF movq %rbx, %r8 movl $0xe9, %r9d callq 0x54f0 testb %al, %al je 0x9bfe leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x54d0 leaq 0x75e4(%rip), %r12 # 0x11026 leaq 0x88(%rsp), %rsi movq %r12, (%rsi) leaq 0x90(%rsp), %r14 movq %r14, %rdi callq 0xc766 movq (%r14), %rsi movq 0x8(%r14), %rdx leaq 0x70(%rsp), %rdi callq 0x53a0 xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) leaq 0x70(%rsp), %rdi movups (%rdi), %xmm0 movq 0x18(%rsp), %rax movaps %xmm0, 0x10(%rsp) xorl %ecx, %ecx movq %rcx, (%rdi) movq %rax, 0x8(%rdi) movq 0x10(%rdi), %rax movq %rax, 0x20(%rsp) movq %rcx, 0x10(%rdi) callq 0xc7a2 movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx leaq 0x70(%rsp), %r14 movq %r14, %rdi callq 0xc7e8 movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx leaq 0x90(%rsp), %r15 movq %r15, %rdi callq 0xc7e8 movq (%r14), %rdi movq 0x8(%r14), %rsi movq (%r15), %rdx movq 0x8(%r15), %rcx leaq 0x739a(%rip), %r8 # 0x10e83 leaq 0x756f(%rip), %r9 # 0x1105f pushq $0xea pushq %rbx callq 0x5500 addq $0x10, %rsp movl %eax, %ebp leaq 0x10(%rsp), %rdi callq 0xc7a2 leaq 0x28(%rsp), %rdi callq 0xc7a2 testb %bpl, %bpl je 0x9bfe leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x5840 leaq 0x88(%rsp), %rsi movq %r12, (%rsi) leaq 0x90(%rsp), %r14 movq %r14, %rdi callq 0xc766 movq (%r14), %rsi movq 0x8(%r14), %rdx leaq 0x70(%rsp), %rdi callq 0x53a0 xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) leaq 0x70(%rsp), %rdi movups (%rdi), %xmm0 movq 0x18(%rsp), %rax movaps %xmm0, 0x10(%rsp) xorl %ecx, %ecx movq %rcx, (%rdi) movq %rax, 0x8(%rdi) movq 0x10(%rdi), %rax movq %rax, 0x20(%rsp) movq %rcx, 0x10(%rdi) callq 0xc7a2 movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx leaq 0x70(%rsp), %r14 movq %r14, %rdi callq 0xc7e8 movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx leaq 0x90(%rsp), %r15 movq %r15, %rdi callq 0xc7e8 movq (%r14), %rdi movq 0x8(%r14), %rsi movq (%r15), %rdx movq 0x8(%r15), %rcx leaq 0x7333(%rip), %r8 # 0x10f07 leaq 0x7484(%rip), %r9 # 0x1105f pushq $0xeb pushq %rbx callq 0x5500 addq $0x10, %rsp leaq 0x10(%rsp), %rdi callq 0xc7a2 leaq 0x28(%rsp), %rdi callq 0xc7a2 leaq 0x8(%rsp), %rdi callq 0x5750 leaq 0x50(%rsp), %rdi callq 0x5580 leaq 0x40(%rsp), %rdi callq 0x58b0 addq $0xa0, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0xc7a2 jmp 0x9c54 movq %rax, %rbx jmp 0x9c54 jmp 0x9c78 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0xc7a2 jmp 0x9c54 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0xc7a2 jmp 0x9c7b jmp 0x9c78 movq %rax, %rbx jmp 0x9c85 jmp 0x9c91 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0xc7a2 jmp 0x9c9e movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x5750 leaq 0x50(%rsp), %rdi callq 0x5580 jmp 0x9c94 movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x58b0 movq %rbx, %rdi callq 0x5280
/KDAB[P]KDReports/unittests/XmlParser/XmlParser.cpp
pugi::impl::(anonymous namespace)::strconv_attribute_impl<pugi::impl::(anonymous namespace)::opt_false>::parse_simple(char*, char)
gap(): end(0), size(0) { }
pushq %rbx subq $0x10, %rsp xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) leaq 0x9f7ff(%rip), %rax # 0xa6680 movq %rdi, %rbx movzbl (%rdi), %ecx testb $0x2, (%rcx,%rax) jne 0x6ebe movzbl 0x1(%rbx), %ecx testb $0x2, (%rcx,%rax) jne 0x6eb5 movzbl 0x2(%rbx), %ecx testb $0x2, (%rcx,%rax) jne 0x6eba movzbl 0x3(%rbx), %ecx leaq 0x4(%rbx), %rdi testb $0x2, (%rcx,%rax) je 0x6e81 addq $0x3, %rbx jmp 0x6ebe incq %rbx jmp 0x6ebe addq $0x2, %rbx cmpb %sil, %cl je 0x6ecf testb %cl, %cl je 0x6ee2 incq %rbx movq %rbx, %rdi jmp 0x6e81 movq %rsp, %rdi movq %rbx, %rsi callq 0x86778 movb $0x0, (%rax) incq %rbx jmp 0x6ee4 xorl %ebx, %ebx movq %rbx, %rax addq $0x10, %rsp popq %rbx retq nop
/JohanSmet[P]lsim/libs/pugixml/src/pugixml.cpp
pugi::impl::(anonymous namespace)::strconv_attribute_impl<pugi::impl::(anonymous namespace)::opt_true>::parse_simple(char*, char)
static char_t* parse_simple(char_t* s, char_t end_quote) { gap g; while (true) { PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr)); if (*s == end_quote) { *g.flush(s) = 0; return s + 1; } else if (opt_escape::value && *s == '&') { s = strconv_escape(s, g); } else if (!*s) { return 0; } else ++s; } }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movl %esi, %ebx movq %rdi, %rax xorps %xmm0, %xmm0 movq %rsp, %r15 movaps %xmm0, (%r15) leaq 0x9f771(%rip), %r12 # 0xa6680 movq %rax, %r14 movzbl (%rax), %ecx testb $0x2, (%rcx,%r12) jne 0x6f53 movzbl 0x1(%r14), %ecx testb $0x2, (%rcx,%r12) jne 0x6f4a movzbl 0x2(%r14), %ecx testb $0x2, (%rcx,%r12) jne 0x6f4f movzbl 0x3(%r14), %ecx leaq 0x4(%r14), %rax testb $0x2, (%rcx,%r12) je 0x6f0f addq $0x3, %r14 jmp 0x6f53 incq %r14 jmp 0x6f53 addq $0x2, %r14 cmpb %bl, %cl je 0x6f78 cmpb $0x26, %cl je 0x6f6b movzbl %cl, %eax testl %eax, %eax je 0x6f8b incq %r14 movq %r14, %rax jmp 0x6f0f movq %r14, %rdi movq %r15, %rsi callq 0x867cf jmp 0x6f0f movq %rsp, %rdi movq %r14, %rsi callq 0x86778 movb $0x0, (%rax) incq %r14 jmp 0x6f8e xorl %r14d, %r14d movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
/JohanSmet[P]lsim/libs/pugixml/src/pugixml.cpp
pugi::impl::(anonymous namespace)::strconv_attribute_impl<pugi::impl::(anonymous namespace)::opt_true>::parse_eol(char*, char)
static char_t* parse_eol(char_t* s, char_t end_quote) { gap g; while (true) { PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr)); if (*s == end_quote) { *g.flush(s) = 0; return s + 1; } else if (*s == '\r') { *s++ = '\n'; if (*s == '\n') g.push(s, 1); } else if (opt_escape::value && *s == '&') { s = strconv_escape(s, g); } else if (!*s) { return 0; } else ++s; } }
pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movl %esi, %ebx movq %rdi, %rax xorps %xmm0, %xmm0 movq %rsp, %r14 movaps %xmm0, (%r14) leaq 0x9f59f(%rip), %r12 # 0xa6680 movzbl (%rax), %ecx testb $0x2, (%rcx,%r12) jne 0x71bf addq $0x2, %rax movq %rax, %r15 movzbl -0x1(%r15), %ecx testb $0x2, (%rcx,%r12) jne 0x712f movzbl (%r15), %ecx testb $0x2, (%rcx,%r12) jne 0x7137 movzbl 0x1(%r15), %ecx testb $0x2, (%rcx,%r12) jne 0x7134 movzbl 0x2(%r15), %ecx addq $0x4, %r15 testb $0x2, (%rcx,%r12) je 0x70f6 addq $-0x2, %r15 jmp 0x7137 decq %r15 jmp 0x7137 incq %r15 cmpb %bl, %cl je 0x71c7 cmpb $0xd, %cl je 0x716c movzbl %cl, %eax cmpl $0x26, %eax je 0x715c testl %eax, %eax je 0x71da incq %r15 movq %r15, %rax jmp 0x70e1 movq %r15, %rdi movq %r14, %rsi callq 0x867cf jmp 0x70e1 leaq 0x1(%r15), %rax movb $0xa, (%r15) cmpb $0xa, 0x1(%r15) jne 0x70e1 movq (%rsp), %rsi testq %rsi, %rsi je 0x71a2 subq %rsi, %rax jb 0x71ee movq 0x8(%rsp), %r13 movq %rsi, %rdi subq %r13, %rdi movq %rax, %rdx callq 0x6190 jmp 0x71a7 movq 0x8(%rsp), %r13 addq $0x2, %r15 movq %r15, (%rsp) incq %r13 movq %r13, 0x8(%rsp) movq %r15, %rax jmp 0x70e1 movq %rax, %r15 jmp 0x7137 movq %rsp, %rdi movq %r15, %rsi callq 0x86778 movb $0x0, (%rax) incq %r15 jmp 0x71dd xorl %r15d, %r15d movq %r15, %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0xa0b99(%rip), %rdi # 0xa7d8e leaq 0x9f6f9(%rip), %rsi # 0xa68f5 leaq 0xa0bd4(%rip), %rcx # 0xa7dd7 movl $0x974, %edx # imm = 0x974 callq 0x61b0 nop
/JohanSmet[P]lsim/libs/pugixml/src/pugixml.cpp
pugi::impl::(anonymous namespace)::strconv_attribute_impl<pugi::impl::(anonymous namespace)::opt_true>::parse_wnorm(char*, char)
static char_t* parse_wnorm(char_t* s, char_t end_quote) { gap g; // trim leading whitespaces if (PUGI__IS_CHARTYPE(*s, ct_space)) { char_t* str = s; do ++str; while (PUGI__IS_CHARTYPE(*str, ct_space)); g.push(s, str - s); } while (true) { PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr_ws | ct_space)); if (*s == end_quote) { char_t* str = g.flush(s); do *str-- = 0; while (PUGI__IS_CHARTYPE(*str, ct_space)); return s + 1; } else if (PUGI__IS_CHARTYPE(*s, ct_space)) { *s++ = ' '; if (PUGI__IS_CHARTYPE(*s, ct_space)) { char_t* str = s + 1; while (PUGI__IS_CHARTYPE(*str, ct_space)) ++str; g.push(s, str - s); } } else if (opt_escape::value && *s == '&') { s = strconv_escape(s, g); } else if (!*s) { return 0; } else ++s; } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %esi, %ebx movq %rdi, %r12 xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movzbl (%rdi), %eax leaq 0x9f02e(%rip), %r13 # 0xa6680 testb $0x8, (%rax,%r13) je 0x7677 xorl %eax, %eax movzbl 0x1(%r12,%rax), %ecx incq %rax testb $0x8, (%rcx,%r13) jne 0x765b addq %rax, %r12 movq %r12, (%rsp) movq %rax, 0x8(%rsp) movq %rsp, %r14 movzbl (%r12), %eax movb (%rax,%r13), %cl testb $0xc, %cl jne 0x777c addq $0x2, %r12 movq %r12, %r15 movzbl -0x1(%r15), %eax movb (%rax,%r13), %cl testb $0xc, %cl jne 0x76d4 movzbl (%r15), %eax movb (%rax,%r13), %cl testb $0xc, %cl jne 0x76dc movzbl 0x1(%r15), %eax movb (%rax,%r13), %cl testb $0xc, %cl jne 0x76d9 movzbl 0x2(%r15), %eax movb (%rax,%r13), %cl addq $0x4, %r15 testb $0xc, %cl je 0x7693 addq $-0x2, %r15 jmp 0x76dc decq %r15 jmp 0x76dc incq %r15 cmpb %bl, %al je 0x7784 testb $0x8, %cl jne 0x7703 cmpb $0x26, %al je 0x7750 movzbl %al, %eax testl %eax, %eax je 0x77b5 incq %r15 movq %r15, %r12 jmp 0x767a leaq 0x1(%r15), %r12 movb $0x20, (%r15) movzbl 0x1(%r15), %eax testb $0x8, (%rax,%r13) je 0x767a xorl %ebp, %ebp movzbl 0x2(%r15,%rbp), %eax incq %rbp testb $0x8, (%rax,%r13) jne 0x771d movq (%rsp), %rsi testq %rsi, %rsi je 0x7763 movq %r12, %rdx subq %rsi, %rdx jb 0x77ba movq 0x8(%rsp), %r15 movq %rsi, %rdi subq %r15, %rdi callq 0x6190 jmp 0x7768 movq %r15, %rdi movq %r14, %rsi callq 0x867cf movq %rax, %r12 jmp 0x767a movq 0x8(%rsp), %r15 addq %rbp, %r12 movq %r12, (%rsp) addq %rbp, %r15 movq %r15, 0x8(%rsp) jmp 0x767a movq %r12, %r15 jmp 0x76dc movq %rsp, %rdi movq %r15, %rsi callq 0x86778 movb $0x0, (%rax) movzbl -0x1(%rax), %ecx decq %rax testb $0x8, (%rcx,%r13) jne 0x778f incq %r15 movq %r15, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %r15d, %r15d jmp 0x77a3 leaq 0xa05cd(%rip), %rdi # 0xa7d8e leaq 0x9f12d(%rip), %rsi # 0xa68f5 leaq 0xa0608(%rip), %rcx # 0xa7dd7 movl $0x974, %edx # imm = 0x974 callq 0x61b0 nop
/JohanSmet[P]lsim/libs/pugixml/src/pugixml.cpp
pugi::impl::(anonymous namespace)::strconv_pcdata_impl<pugi::impl::(anonymous namespace)::opt_false, pugi::impl::(anonymous namespace)::opt_true, pugi::impl::(anonymous namespace)::opt_false>::parse(char*)
static char_t* parse(char_t* s) { gap g; char_t* begin = s; while (true) { PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_pcdata)); if (*s == '<') // PCDATA ends here { char_t* end = g.flush(s); if (opt_trim::value) while (end > begin && PUGI__IS_CHARTYPE(end[-1], ct_space)) --end; *end = 0; return s + 1; } else if (opt_eol::value && *s == '\r') // Either a single 0x0d or 0x0d 0x0a pair { *s++ = '\n'; // replace first one with 0x0a if (*s == '\n') g.push(s, 1); } else if (opt_escape::value && *s == '&') { s = strconv_escape(s, g); } else if (*s == 0) { char_t* end = g.flush(s); if (opt_trim::value) while (end > begin && PUGI__IS_CHARTYPE(end[-1], ct_space)) --end; *end = 0; return s; } else ++s; } }
pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rdx xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) leaq 0x9ed4c(%rip), %r14 # 0xa6680 movzbl (%rdx), %eax testb $0x1, (%rax,%r14) jne 0x79e8 addq $0x2, %rdx movq %rdx, %rbx movzbl -0x1(%rbx), %eax testb $0x1, (%rax,%r14) jne 0x797e movzbl (%rbx), %eax testb $0x1, (%rax,%r14) jne 0x7986 movzbl 0x1(%rbx), %eax testb $0x1, (%rax,%r14) jne 0x7983 movzbl 0x2(%rbx), %eax addq $0x4, %rbx testb $0x1, (%rax,%r14) je 0x7949 addq $-0x2, %rbx jmp 0x7986 decq %rbx jmp 0x7986 incq %rbx cmpb $0xd, %al je 0x799e movzbl %al, %eax testl %eax, %eax je 0x7a00 cmpl $0x3c, %eax je 0x79ed incq %rbx movq %rbx, %rdx jmp 0x7934 leaq 0x1(%rbx), %rdx movb $0xa, (%rbx) cmpb $0xa, 0x1(%rbx) jne 0x7934 movq (%rsp), %rsi testq %rsi, %rsi je 0x79cb subq %rsi, %rdx jb 0x7a1b movq 0x8(%rsp), %r15 movq %rsi, %rdi subq %r15, %rdi callq 0x6190 jmp 0x79d0 movq 0x8(%rsp), %r15 addq $0x2, %rbx movq %rbx, (%rsp) incq %r15 movq %r15, 0x8(%rsp) movq %rbx, %rdx jmp 0x7934 movq %rdx, %rbx jmp 0x7986 movq %rsp, %rdi movq %rbx, %rsi callq 0x86778 movb $0x0, (%rax) incq %rbx jmp 0x7a0e movq %rsp, %rdi movq %rbx, %rsi callq 0x86778 movb $0x0, (%rax) movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0xa036c(%rip), %rdi # 0xa7d8e leaq 0x9eecc(%rip), %rsi # 0xa68f5 leaq 0xa03a7(%rip), %rcx # 0xa7dd7 movl $0x974, %edx # imm = 0x974 callq 0x61b0
/JohanSmet[P]lsim/libs/pugixml/src/pugixml.cpp
pugi::impl::(anonymous namespace)::strconv_cdata(char*, char)
PUGI__FN char_t* strconv_cdata(char_t* s, char_t endch) { gap g; while (true) { PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_cdata)); if (*s == '\r') // Either a single 0x0d or 0x0d 0x0a pair { *s++ = '\n'; // replace first one with 0x0a if (*s == '\n') g.push(s, 1); } else if (s[0] == ']' && s[1] == ']' && PUGI__ENDSWITH(s[2], '>')) // CDATA ends here { *g.flush(s) = 0; return s + 1; } else if (*s == 0) { return 0; } else ++s; } }
pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movl %esi, %ebx movq %rdi, %rdx xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) leaq 0x9e62e(%rip), %r15 # 0xa6680 xorb $0x3e, %bl movzbl (%rdx), %eax testb $0x10, (%rax,%r15) jne 0x8133 addq $0x2, %rdx movq %rdx, %r14 movzbl -0x1(%r14), %eax testb $0x10, (%rax,%r15) jne 0x80a3 movzbl (%r14), %eax testb $0x10, (%rax,%r15) jne 0x80ab movzbl 0x1(%r14), %eax testb $0x10, (%rax,%r15) jne 0x80a8 movzbl 0x2(%r14), %eax addq $0x4, %r14 testb $0x10, (%rax,%r15) je 0x806a addq $-0x2, %r14 jmp 0x80ab decq %r14 jmp 0x80ab incq %r14 cmpb $0xd, %al je 0x80e3 movzbl %al, %eax cmpl $0x5d, %eax je 0x80bd testl %eax, %eax jne 0x80d8 jmp 0x813b cmpb $0x5d, 0x1(%r14) jne 0x80d8 movb 0x2(%r14), %cl movl %ebx, %eax orb %cl, %al sete %al cmpb $0x3e, %cl je 0x813f testb %al, %al jne 0x813f incq %r14 movq %r14, %rdx jmp 0x8055 leaq 0x1(%r14), %rdx movb $0xa, (%r14) cmpb $0xa, 0x1(%r14) jne 0x8055 movq (%rsp), %rsi testq %rsi, %rsi je 0x8116 subq %rsi, %rdx jb 0x8160 movq 0x8(%rsp), %r12 movq %rsi, %rdi subq %r12, %rdi callq 0x6190 jmp 0x811b movq 0x8(%rsp), %r12 addq $0x2, %r14 movq %r14, (%rsp) incq %r12 movq %r12, 0x8(%rsp) movq %r14, %rdx jmp 0x8055 movq %rdx, %r14 jmp 0x80ab xorl %ebx, %ebx jmp 0x8151 leaq 0x1(%r14), %rbx movq %rsp, %rdi movq %r14, %rsi callq 0x86778 movb $0x0, (%rax) movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x9fc27(%rip), %rdi # 0xa7d8e leaq 0x9e787(%rip), %rsi # 0xa68f5 leaq 0x9fc62(%rip), %rcx # 0xa7dd7 movl $0x974, %edx # imm = 0x974 callq 0x61b0
/JohanSmet[P]lsim/libs/pugixml/src/pugixml.cpp
ImGui::StyleColorsDark(ImGuiStyle*)
void ImGui::StyleColorsDark(ImGuiStyle* dst) { ImGuiStyle* style = dst ? dst : &ImGui::GetStyle(); ImVec4* colors = style->Colors; colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f); colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f); colors[ImGuiCol_WindowBg] = ImVec4(0.06f, 0.06f, 0.06f, 0.94f); colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); colors[ImGuiCol_PopupBg] = ImVec4(0.08f, 0.08f, 0.08f, 0.94f); colors[ImGuiCol_Border] = ImVec4(0.43f, 0.43f, 0.50f, 0.50f); colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); colors[ImGuiCol_FrameBg] = ImVec4(0.16f, 0.29f, 0.48f, 0.54f); colors[ImGuiCol_FrameBgHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.40f); colors[ImGuiCol_FrameBgActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f); colors[ImGuiCol_TitleBg] = ImVec4(0.04f, 0.04f, 0.04f, 1.00f); colors[ImGuiCol_TitleBgActive] = ImVec4(0.16f, 0.29f, 0.48f, 1.00f); colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.00f, 0.00f, 0.00f, 0.51f); colors[ImGuiCol_MenuBarBg] = ImVec4(0.14f, 0.14f, 0.14f, 1.00f); colors[ImGuiCol_ScrollbarBg] = ImVec4(0.02f, 0.02f, 0.02f, 0.53f); colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f); colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f); colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.51f, 0.51f, 0.51f, 1.00f); colors[ImGuiCol_CheckMark] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); colors[ImGuiCol_SliderGrab] = ImVec4(0.24f, 0.52f, 0.88f, 1.00f); colors[ImGuiCol_SliderGrabActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); colors[ImGuiCol_Button] = ImVec4(0.26f, 0.59f, 0.98f, 0.40f); colors[ImGuiCol_ButtonHovered] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); colors[ImGuiCol_ButtonActive] = ImVec4(0.06f, 0.53f, 0.98f, 1.00f); colors[ImGuiCol_Header] = ImVec4(0.26f, 0.59f, 0.98f, 0.31f); colors[ImGuiCol_HeaderHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.80f); colors[ImGuiCol_HeaderActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); colors[ImGuiCol_Separator] = colors[ImGuiCol_Border]; colors[ImGuiCol_SeparatorHovered] = ImVec4(0.10f, 0.40f, 0.75f, 0.78f); colors[ImGuiCol_SeparatorActive] = ImVec4(0.10f, 0.40f, 0.75f, 1.00f); colors[ImGuiCol_ResizeGrip] = ImVec4(0.26f, 0.59f, 0.98f, 0.25f); colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f); colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f); colors[ImGuiCol_Tab] = ImLerp(colors[ImGuiCol_Header], colors[ImGuiCol_TitleBgActive], 0.80f); colors[ImGuiCol_TabHovered] = colors[ImGuiCol_HeaderHovered]; colors[ImGuiCol_TabActive] = ImLerp(colors[ImGuiCol_HeaderActive], colors[ImGuiCol_TitleBgActive], 0.60f); colors[ImGuiCol_TabUnfocused] = ImLerp(colors[ImGuiCol_Tab], colors[ImGuiCol_TitleBg], 0.80f); colors[ImGuiCol_TabUnfocusedActive] = ImLerp(colors[ImGuiCol_TabActive], colors[ImGuiCol_TitleBg], 0.40f); colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f); colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f); colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f); colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f); colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f); colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f); colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f); colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f); colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f); }
pushq %rax testq %rdi, %rdi jne 0x889a callq 0x1e7da movq %rax, %rdi movaps 0x8576f(%rip), %xmm0 # 0x8e010 movups %xmm0, 0xa8(%rdi) movaps 0x85771(%rip), %xmm0 # 0x8e020 movups %xmm0, 0xb8(%rdi) movaps 0x85773(%rip), %xmm0 # 0x8e030 movups %xmm0, 0xc8(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0xd8(%rdi) movaps 0x8576b(%rip), %xmm1 # 0x8e040 movups %xmm1, 0xe8(%rdi) movaps 0x8576d(%rip), %xmm1 # 0x8e050 movups %xmm1, 0xf8(%rdi) movups %xmm0, 0x108(%rdi) movaps 0x85768(%rip), %xmm0 # 0x8e060 movups %xmm0, 0x118(%rdi) movaps 0x8576a(%rip), %xmm2 # 0x8e070 movups %xmm2, 0x128(%rdi) movaps 0x8576c(%rip), %xmm1 # 0x8e080 movups %xmm1, 0x138(%rdi) movaps 0x8576e(%rip), %xmm0 # 0x8e090 movups %xmm0, 0x148(%rdi) movaps 0x85770(%rip), %xmm0 # 0x8e0a0 movups %xmm0, 0x158(%rdi) movaps 0x85772(%rip), %xmm0 # 0x8e0b0 movups %xmm0, 0x168(%rdi) movaps 0x85774(%rip), %xmm0 # 0x8e0c0 movups %xmm0, 0x178(%rdi) movaps 0x85776(%rip), %xmm0 # 0x8e0d0 movups %xmm0, 0x188(%rdi) movaps 0x85778(%rip), %xmm0 # 0x8e0e0 movups %xmm0, 0x198(%rdi) movaps 0x8577a(%rip), %xmm0 # 0x8e0f0 movups %xmm0, 0x1a8(%rdi) movaps 0x8577c(%rip), %xmm0 # 0x8e100 movups %xmm0, 0x1b8(%rdi) movaps 0x8577e(%rip), %xmm0 # 0x8e110 movups %xmm0, 0x1c8(%rdi) movaps 0x85780(%rip), %xmm3 # 0x8e120 movups %xmm3, 0x1d8(%rdi) movups %xmm0, 0x1e8(%rdi) movups %xmm2, 0x1f8(%rdi) movups %xmm0, 0x208(%rdi) movaps 0x8576d(%rip), %xmm2 # 0x8e130 movups %xmm2, 0x218(%rdi) movaps 0x8576f(%rip), %xmm2 # 0x8e140 movups %xmm2, 0x228(%rdi) movaps 0x85771(%rip), %xmm2 # 0x8e150 movups %xmm2, 0x238(%rdi) movups %xmm0, 0x248(%rdi) movups 0xf8(%rdi), %xmm2 movups 0x238(%rdi), %xmm3 movups %xmm2, 0x258(%rdi) movaps 0x85757(%rip), %xmm2 # 0x8e160 movups %xmm2, 0x268(%rdi) movaps 0x85759(%rip), %xmm2 # 0x8e170 movups %xmm2, 0x278(%rdi) movaps 0x8575b(%rip), %xmm2 # 0x8e180 movups %xmm2, 0x288(%rdi) movups %xmm1, 0x298(%rdi) movaps 0x85756(%rip), %xmm1 # 0x8e190 movups %xmm1, 0x2a8(%rdi) movaps 0x85758(%rip), %xmm1 # 0x8e1a0 movups %xmm1, 0x2b8(%rdi) movups %xmm3, 0x2c8(%rdi) movaps 0x85753(%rip), %xmm1 # 0x8e1b0 movups %xmm1, 0x2d8(%rdi) movaps 0x85755(%rip), %xmm1 # 0x8e1c0 movups %xmm1, 0x2e8(%rdi) movaps 0x85757(%rip), %xmm1 # 0x8e1d0 movups %xmm1, 0x2f8(%rdi) movaps 0x85759(%rip), %xmm1 # 0x8e1e0 movups %xmm1, 0x308(%rdi) movaps 0x8575b(%rip), %xmm1 # 0x8e1f0 movups %xmm1, 0x318(%rdi) movaps 0x8575d(%rip), %xmm1 # 0x8e200 movups %xmm1, 0x328(%rdi) movaps 0x8575f(%rip), %xmm1 # 0x8e210 movups %xmm1, 0x338(%rdi) movaps 0x85761(%rip), %xmm1 # 0x8e220 movups %xmm1, 0x348(%rdi) movaps 0x85763(%rip), %xmm1 # 0x8e230 movups %xmm1, 0x358(%rdi) movups %xmm0, 0x368(%rdi) movaps 0x8575e(%rip), %xmm0 # 0x8e240 movups %xmm0, 0x378(%rdi) movaps 0x85760(%rip), %xmm0 # 0x8e250 movups %xmm0, 0x388(%rdi) movaps 0x85762(%rip), %xmm0 # 0x8e260 movups %xmm0, 0x398(%rdi) popq %rax retq
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImGui::StyleColorsLight(ImGuiStyle*)
void ImGui::StyleColorsLight(ImGuiStyle* dst) { ImGuiStyle* style = dst ? dst : &ImGui::GetStyle(); ImVec4* colors = style->Colors; colors[ImGuiCol_Text] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f); colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f); colors[ImGuiCol_WindowBg] = ImVec4(0.94f, 0.94f, 0.94f, 1.00f); colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); colors[ImGuiCol_PopupBg] = ImVec4(1.00f, 1.00f, 1.00f, 0.98f); colors[ImGuiCol_Border] = ImVec4(0.00f, 0.00f, 0.00f, 0.30f); colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); colors[ImGuiCol_FrameBg] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f); colors[ImGuiCol_FrameBgHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.40f); colors[ImGuiCol_FrameBgActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f); colors[ImGuiCol_TitleBg] = ImVec4(0.96f, 0.96f, 0.96f, 1.00f); colors[ImGuiCol_TitleBgActive] = ImVec4(0.82f, 0.82f, 0.82f, 1.00f); colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 1.00f, 1.00f, 0.51f); colors[ImGuiCol_MenuBarBg] = ImVec4(0.86f, 0.86f, 0.86f, 1.00f); colors[ImGuiCol_ScrollbarBg] = ImVec4(0.98f, 0.98f, 0.98f, 0.53f); colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.69f, 0.69f, 0.69f, 0.80f); colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.49f, 0.49f, 0.49f, 0.80f); colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.49f, 0.49f, 0.49f, 1.00f); colors[ImGuiCol_CheckMark] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); colors[ImGuiCol_SliderGrab] = ImVec4(0.26f, 0.59f, 0.98f, 0.78f); colors[ImGuiCol_SliderGrabActive] = ImVec4(0.46f, 0.54f, 0.80f, 0.60f); colors[ImGuiCol_Button] = ImVec4(0.26f, 0.59f, 0.98f, 0.40f); colors[ImGuiCol_ButtonHovered] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); colors[ImGuiCol_ButtonActive] = ImVec4(0.06f, 0.53f, 0.98f, 1.00f); colors[ImGuiCol_Header] = ImVec4(0.26f, 0.59f, 0.98f, 0.31f); colors[ImGuiCol_HeaderHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.80f); colors[ImGuiCol_HeaderActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f); colors[ImGuiCol_Separator] = ImVec4(0.39f, 0.39f, 0.39f, 1.00f); colors[ImGuiCol_SeparatorHovered] = ImVec4(0.14f, 0.44f, 0.80f, 0.78f); colors[ImGuiCol_SeparatorActive] = ImVec4(0.14f, 0.44f, 0.80f, 1.00f); colors[ImGuiCol_ResizeGrip] = ImVec4(0.80f, 0.80f, 0.80f, 0.56f); colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f); colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f); colors[ImGuiCol_Tab] = ImLerp(colors[ImGuiCol_Header], colors[ImGuiCol_TitleBgActive], 0.90f); colors[ImGuiCol_TabHovered] = colors[ImGuiCol_HeaderHovered]; colors[ImGuiCol_TabActive] = ImLerp(colors[ImGuiCol_HeaderActive], colors[ImGuiCol_TitleBgActive], 0.60f); colors[ImGuiCol_TabUnfocused] = ImLerp(colors[ImGuiCol_Tab], colors[ImGuiCol_TitleBg], 0.80f); colors[ImGuiCol_TabUnfocusedActive] = ImLerp(colors[ImGuiCol_TabActive], colors[ImGuiCol_TitleBg], 0.40f); colors[ImGuiCol_PlotLines] = ImVec4(0.39f, 0.39f, 0.39f, 1.00f); colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f); colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f); colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.45f, 0.00f, 1.00f); colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f); colors[ImGuiCol_DragDropTarget] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f); colors[ImGuiCol_NavHighlight] = colors[ImGuiCol_HeaderHovered]; colors[ImGuiCol_NavWindowingHighlight] = ImVec4(0.70f, 0.70f, 0.70f, 0.70f); colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.20f); colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f); }
pushq %rax testq %rdi, %rdi jne 0x8dac callq 0x1e7da movq %rax, %rdi movaps 0x856ed(%rip), %xmm0 # 0x8e4a0 movups %xmm0, 0xa8(%rdi) movaps 0x854bf(%rip), %xmm0 # 0x8e280 movups %xmm0, 0xb8(%rdi) movaps 0x856e1(%rip), %xmm0 # 0x8e4b0 movups %xmm0, 0xc8(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0xd8(%rdi) movaps 0x856d9(%rip), %xmm1 # 0x8e4c0 movups %xmm1, 0xe8(%rdi) movaps 0x856db(%rip), %xmm1 # 0x8e4d0 movups %xmm1, 0xf8(%rdi) movups %xmm0, 0x108(%rdi) movaps 0x85206(%rip), %xmm0 # 0x8e010 movups %xmm0, 0x118(%rdi) movaps 0x85258(%rip), %xmm1 # 0x8e070 movups %xmm1, 0x128(%rdi) movaps 0x8525a(%rip), %xmm0 # 0x8e080 movups %xmm0, 0x138(%rdi) movaps 0x856ac(%rip), %xmm2 # 0x8e4e0 movups %xmm2, 0x148(%rdi) movaps 0x856ae(%rip), %xmm2 # 0x8e4f0 movups %xmm2, 0x158(%rdi) movaps 0x856b0(%rip), %xmm2 # 0x8e500 movups %xmm2, 0x168(%rdi) movaps 0x856b2(%rip), %xmm2 # 0x8e510 movups %xmm2, 0x178(%rdi) movaps 0x856b4(%rip), %xmm2 # 0x8e520 movups %xmm2, 0x188(%rdi) movaps 0x856b6(%rip), %xmm2 # 0x8e530 movups %xmm2, 0x198(%rdi) movaps 0x856b8(%rip), %xmm2 # 0x8e540 movups %xmm2, 0x1a8(%rdi) movaps 0x856ba(%rip), %xmm2 # 0x8e550 movups %xmm2, 0x1b8(%rdi) movaps 0x8526c(%rip), %xmm2 # 0x8e110 movups %xmm2, 0x1c8(%rdi) movaps 0x856ae(%rip), %xmm3 # 0x8e560 movups %xmm3, 0x1d8(%rdi) movaps 0x856b0(%rip), %xmm3 # 0x8e570 movups %xmm3, 0x1e8(%rdi) movups %xmm1, 0x1f8(%rdi) movups %xmm2, 0x208(%rdi) movaps 0x85254(%rip), %xmm1 # 0x8e130 movups %xmm1, 0x218(%rdi) movaps 0x85256(%rip), %xmm1 # 0x8e140 movups %xmm1, 0x228(%rdi) movaps 0x85258(%rip), %xmm1 # 0x8e150 movups %xmm1, 0x238(%rdi) movups %xmm2, 0x248(%rdi) movaps 0x85673(%rip), %xmm1 # 0x8e580 movups %xmm1, 0x258(%rdi) movaps 0x85675(%rip), %xmm2 # 0x8e590 movups %xmm2, 0x268(%rdi) movaps 0x85677(%rip), %xmm2 # 0x8e5a0 movups %xmm2, 0x278(%rdi) movaps 0x85679(%rip), %xmm2 # 0x8e5b0 movups %xmm2, 0x288(%rdi) movups %xmm0, 0x298(%rdi) movaps 0x85244(%rip), %xmm0 # 0x8e190 movups %xmm0, 0x2a8(%rdi) movaps 0x85666(%rip), %xmm2 # 0x8e5c0 movups %xmm2, 0x2b8(%rdi) movups 0x238(%rdi), %xmm2 movups %xmm2, 0x2c8(%rdi) movaps 0x8565a(%rip), %xmm2 # 0x8e5d0 movups %xmm2, 0x2d8(%rdi) movaps 0x8565c(%rip), %xmm2 # 0x8e5e0 movups %xmm2, 0x2e8(%rdi) movaps 0x8565e(%rip), %xmm2 # 0x8e5f0 movups %xmm2, 0x2f8(%rdi) movups %xmm1, 0x308(%rdi) movaps 0x85249(%rip), %xmm1 # 0x8e1f0 movups %xmm1, 0x318(%rdi) movaps 0x8524b(%rip), %xmm1 # 0x8e200 movups %xmm1, 0x328(%rdi) movaps 0x8563d(%rip), %xmm1 # 0x8e600 movups %xmm1, 0x338(%rdi) movaps 0x8524f(%rip), %xmm1 # 0x8e220 movups %xmm1, 0x348(%rdi) movups %xmm0, 0x358(%rdi) movups 0x238(%rdi), %xmm0 movups %xmm0, 0x368(%rdi) movaps 0x8561c(%rip), %xmm0 # 0x8e610 movups %xmm0, 0x378(%rdi) movaps 0x8561e(%rip), %xmm0 # 0x8e620 movups %xmm0, 0x388(%rdi) movaps 0x85480(%rip), %xmm0 # 0x8e490 movups %xmm0, 0x398(%rdi) popq %rax retq nop
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImDrawListSharedData::ImDrawListSharedData()
ImDrawListSharedData::ImDrawListSharedData() { Font = NULL; FontSize = 0.0f; CurveTessellationTol = 0.0f; ClipRectFullscreen = ImVec4(-8192.0f, -8192.0f, +8192.0f, +8192.0f); // Const data for (int i = 0; i < IM_ARRAYSIZE(CircleVtx12); i++) { const float a = ((float)i * 2 * IM_PI) / (float)IM_ARRAYSIZE(CircleVtx12); CircleVtx12[i] = ImVec2(ImCos(a), ImSin(a)); } }
pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx xorl %r14d, %r14d movl $0x88, %edx xorl %esi, %esi callq 0x6290 movaps 0x855f9(%rip), %xmm0 # 0x8e630 movups %xmm0, 0x18(%rbx) xorps %xmm0, %xmm0 cvtsi2ss %r14d, %xmm0 addss %xmm0, %xmm0 mulss 0x857c1(%rip), %xmm0 # 0x8e810 divss 0x857bd(%rip), %xmm0 # 0x8e814 movss %xmm0, (%rsp) callq 0x65d0 movss %xmm0, 0x4(%rsp) movss (%rsp), %xmm0 callq 0x6050 movss 0x4(%rsp), %xmm1 movss %xmm1, 0x28(%rbx,%r14,8) movss %xmm0, 0x2c(%rbx,%r14,8) incq %r14 cmpq $0xc, %r14 jne 0x903b addq $0x8, %rsp popq %rbx popq %r14 retq
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImDrawList::AddDrawCmd()
void ImDrawList::AddDrawCmd() { ImDrawCmd draw_cmd; draw_cmd.ClipRect = GetCurrentClipRect(); draw_cmd.TextureId = GetCurrentTextureId(); IM_ASSERT(draw_cmd.ClipRect.x <= draw_cmd.ClipRect.z && draw_cmd.ClipRect.y <= draw_cmd.ClipRect.w); CmdBuffer.push_back(draw_cmd); }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movslq 0x60(%rdi), %rax movq 0x38(%rdi), %rcx movq 0x68(%rdi), %rdx movq %rax, %rsi shlq $0x4, %rsi addq $0x18, %rcx testq %rax, %rax leaq -0x10(%rdx,%rsi), %rax cmoveq %rcx, %rax movups (%rax), %xmm2 movslq 0x70(%rdi), %rax testq %rax, %rax je 0x96cd movq 0x78(%rbx), %rcx movq -0x8(%rcx,%rax,8), %r15 jmp 0x96d0 xorl %r15d, %r15d movaps %xmm2, %xmm0 unpckhpd %xmm2, %xmm0 # xmm0 = xmm0[1],xmm2[1] ucomiss %xmm2, %xmm0 jb 0x979e movaps %xmm2, %xmm0 shufps $0x55, %xmm2, %xmm0 # xmm0 = xmm0[1,1],xmm2[1,1] movaps %xmm2, %xmm1 shufps $0xff, %xmm2, %xmm1 # xmm1 = xmm1[3,3],xmm2[3,3] ucomiss %xmm0, %xmm1 jb 0x979e movl (%rbx), %eax cmpl 0x4(%rbx), %eax jne 0x9716 leal 0x1(%rax), %ebp testl %eax, %eax movaps %xmm2, (%rsp) je 0x971c movl %eax, %ecx shrl $0x1f, %ecx addl %eax, %ecx sarl %ecx addl %eax, %ecx jmp 0x9721 movq 0x8(%rbx), %r14 jmp 0x976b movl $0x8, %ecx cmpl %ebp, %ecx cmovgl %ecx, %ebp movslq %ebp, %rax shlq $0x4, %rax leaq (%rax,%rax,2), %rdi callq 0x19cda movq %rax, %r14 movq 0x8(%rbx), %rsi testq %rsi, %rsi je 0x975e movslq (%rbx), %rax shlq $0x4, %rax leaq (%rax,%rax,2), %rdx movq %r14, %rdi callq 0x6090 movq 0x8(%rbx), %rdi callq 0x19da4 movq %r14, 0x8(%rbx) movl %ebp, 0x4(%rbx) movl (%rbx), %eax movaps (%rsp), %xmm2 cltq leaq (%rax,%rax,2), %rax shlq $0x4, %rax movl $0x0, (%r14,%rax) movups %xmm2, 0x4(%r14,%rax) movq %r15, 0x18(%r14,%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x20(%r14,%rax) incl (%rbx) addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x8a4c8(%rip), %rdi # 0x93c6d leaq 0x8a51a(%rip), %rsi # 0x93cc6 leaq 0x8a573(%rip), %rcx # 0x93d26 movl $0x1a3, %edx # imm = 0x1A3 callq 0x61b0 nop
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImDrawList::UpdateClipRect()
void ImDrawList::UpdateClipRect() { // If current command is used with different settings we need to add a new command const ImVec4 curr_clip_rect = GetCurrentClipRect(); ImDrawCmd* curr_cmd = CmdBuffer.Size > 0 ? &CmdBuffer.Data[CmdBuffer.Size-1] : NULL; if (!curr_cmd || (curr_cmd->ElemCount != 0 && memcmp(&curr_cmd->ClipRect, &curr_clip_rect, sizeof(ImVec4)) != 0) || curr_cmd->UserCallback != NULL) { AddDrawCmd(); return; } // Try to merge with previous command if it matches, else use current command ImDrawCmd* prev_cmd = CmdBuffer.Size > 1 ? curr_cmd - 1 : NULL; if (curr_cmd->ElemCount == 0 && prev_cmd && memcmp(&prev_cmd->ClipRect, &curr_clip_rect, sizeof(ImVec4)) == 0 && prev_cmd->TextureId == GetCurrentTextureId() && prev_cmd->UserCallback == NULL) CmdBuffer.pop_back(); else curr_cmd->ClipRect = curr_clip_rect; }
movslq 0x60(%rdi), %rax movq 0x38(%rdi), %rcx movq 0x68(%rdi), %rdx movq %rax, %rsi shlq $0x4, %rsi addq $0x18, %rcx testq %rax, %rax leaq -0x10(%rdx,%rsi), %rax cmoveq %rcx, %rax movdqu (%rax), %xmm0 movdqa %xmm0, -0x18(%rsp) movslq (%rdi), %rcx testq %rcx, %rcx setle %r8b leaq (%rcx,%rcx,2), %rdx shlq $0x4, %rdx addq 0x8(%rdi), %rdx movq %rdx, %rsi addq $-0x30, %rsi sete %r9b orb %r8b, %r9b jne 0x9686 movl (%rsi), %esi testl %esi, %esi je 0x98ca movdqu -0x2c(%rdx), %xmm0 pcmpeqb -0x18(%rsp), %xmm0 pmovmskb %xmm0, %r8d cmpl $0xffff, %r8d # imm = 0xFFFF jne 0x9686 cmpq $0x0, -0x10(%rdx) jne 0x9686 cmpl $0x2, %ecx jb 0x991c testl %esi, %esi jne 0x991c movdqu -0x5c(%rdx), %xmm0 pcmpeqb -0x18(%rsp), %xmm0 pmovmskb %xmm0, %esi cmpl $0xffff, %esi # imm = 0xFFFF jne 0x991c movq -0x48(%rdx), %rsi movslq 0x70(%rdi), %r8 testq %r8, %r8 je 0x990d movq 0x78(%rdi), %r9 movq -0x8(%r9,%r8,8), %r8 jmp 0x9910 xorl %r8d, %r8d cmpq %r8, %rsi jne 0x991c cmpq $0x0, -0x40(%rdx) je 0x9924 movups (%rax), %xmm0 movups %xmm0, -0x2c(%rdx) retq decl %ecx movl %ecx, (%rdi) retq nop
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImDrawList::UpdateTextureID()
void ImDrawList::UpdateTextureID() { // If current command is used with different settings we need to add a new command const ImTextureID curr_texture_id = GetCurrentTextureId(); ImDrawCmd* curr_cmd = CmdBuffer.Size ? &CmdBuffer.back() : NULL; if (!curr_cmd || (curr_cmd->ElemCount != 0 && curr_cmd->TextureId != curr_texture_id) || curr_cmd->UserCallback != NULL) { AddDrawCmd(); return; } // Try to merge with previous command if it matches, else use current command ImDrawCmd* prev_cmd = CmdBuffer.Size > 1 ? curr_cmd - 1 : NULL; if (curr_cmd->ElemCount == 0 && prev_cmd && prev_cmd->TextureId == curr_texture_id && memcmp(&prev_cmd->ClipRect, &GetCurrentClipRect(), sizeof(ImVec4)) == 0 && prev_cmd->UserCallback == NULL) CmdBuffer.pop_back(); else curr_cmd->TextureId = curr_texture_id; }
movslq 0x70(%rdi), %rax testq %rax, %rax je 0x993e movq 0x78(%rdi), %rcx movq -0x8(%rcx,%rax,8), %rax jmp 0x9940 xorl %eax, %eax movl (%rdi), %ecx testq %rcx, %rcx je 0x9686 testl %ecx, %ecx jle 0x99e3 leaq (%rcx,%rcx,2), %rdx shlq $0x4, %rdx addq 0x8(%rdi), %rdx movq %rdx, %rsi addq $-0x30, %rsi je 0x9686 movl (%rsi), %esi testl %esi, %esi je 0x997c cmpq %rax, -0x18(%rdx) jne 0x9686 cmpq $0x0, -0x10(%rdx) jne 0x9686 cmpl $0x1, %ecx je 0x99d9 testl %esi, %esi jne 0x99d9 cmpq %rax, -0x48(%rdx) jne 0x99d9 movslq 0x60(%rdi), %rsi movq 0x38(%rdi), %r8 movq 0x68(%rdi), %r9 movq %rsi, %r10 shlq $0x4, %r10 addq $0x18, %r8 testq %rsi, %rsi leaq -0x10(%r9,%r10), %rsi cmoveq %r8, %rsi movdqu -0x5c(%rdx), %xmm0 movdqu (%rsi), %xmm1 pcmpeqb %xmm0, %xmm1 pmovmskb %xmm1, %esi cmpl $0xffff, %esi # imm = 0xFFFF jne 0x99d9 cmpq $0x0, -0x40(%rdx) je 0x99de movq %rax, -0x18(%rdx) retq decl %ecx movl %ecx, (%rdi) retq pushq %rax leaq 0x8aa5e(%rip), %rdi # 0x94449 leaq 0x8af83(%rip), %rsi # 0x94975 leaq 0x8b8db(%rip), %rcx # 0x952d4 movl $0x4e1, %edx # imm = 0x4E1 callq 0x61b0 nop
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImDrawList::PushClipRect(ImVec2, ImVec2, bool)
void ImDrawList::PushClipRect(ImVec2 cr_min, ImVec2 cr_max, bool intersect_with_current_clip_rect) { ImVec4 cr(cr_min.x, cr_min.y, cr_max.x, cr_max.y); if (intersect_with_current_clip_rect && _ClipRectStack.Size) { ImVec4 current = _ClipRectStack.Data[_ClipRectStack.Size-1]; if (cr.x < current.x) cr.x = current.x; if (cr.y < current.y) cr.y = current.y; if (cr.z > current.z) cr.z = current.z; if (cr.w > current.w) cr.w = current.w; } cr.z = ImMax(cr.x, cr.z); cr.w = ImMax(cr.y, cr.w); _ClipRectStack.push_back(cr); UpdateClipRect(); }
pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %rbx movaps %xmm1, %xmm5 shufps $0x55, %xmm1, %xmm5 # xmm5 = xmm5[1,1],xmm1[1,1] movl 0x60(%rdi), %eax testl %esi, %esi je 0x9a4f testl %eax, %eax je 0x9a7c movslq %eax, %rcx movq 0x68(%rbx), %rdx shlq $0x4, %rcx movss -0x8(%rdx,%rcx), %xmm3 movss -0x4(%rdx,%rcx), %xmm2 movsd -0x10(%rdx,%rcx), %xmm4 maxps %xmm0, %xmm4 minss %xmm1, %xmm3 ucomiss %xmm2, %xmm5 ja 0x9a58 movaps %xmm5, %xmm2 jmp 0x9a58 movaps %xmm5, %xmm2 movaps %xmm1, %xmm3 movaps %xmm0, %xmm4 cmpl 0x64(%rbx), %eax jne 0x9a71 testl %eax, %eax je 0x9a8e leal 0x1(%rax), %ebp movl %eax, %ecx shrl $0x1f, %ecx addl %eax, %ecx sarl %ecx addl %eax, %ecx jmp 0x9a98 movaps %xmm3, %xmm1 movaps %xmm2, %xmm5 movaps %xmm4, %xmm0 jmp 0x9a88 xorl %eax, %eax cmpl $0x0, 0x64(%rbx) je 0x9b4c movq 0x68(%rbx), %r14 jmp 0x9af4 movl $0x8, %ecx movl $0x1, %ebp movaps %xmm2, (%rsp) movaps %xmm3, 0x20(%rsp) movaps %xmm4, 0x10(%rsp) cmpl %ebp, %ecx cmovgl %ecx, %ebp movslq %ebp, %rdi shlq $0x4, %rdi callq 0x19cda movq %rax, %r14 movq 0x68(%rbx), %rsi testq %rsi, %rsi je 0x9adc movslq 0x60(%rbx), %rdx shlq $0x4, %rdx movq %r14, %rdi callq 0x6090 movq 0x68(%rbx), %rdi callq 0x19da4 movq %r14, 0x68(%rbx) movl %ebp, 0x64(%rbx) movl 0x60(%rbx), %eax movaps 0x20(%rsp), %xmm1 movaps 0x10(%rsp), %xmm0 movaps (%rsp), %xmm5 movaps %xmm0, %xmm2 shufps $0x55, %xmm0, %xmm2 # xmm2 = xmm2[1,1],xmm0[1,1] movaps %xmm5, %xmm3 cmpless %xmm2, %xmm3 andps %xmm3, %xmm2 andnps %xmm5, %xmm3 orps %xmm2, %xmm3 movaps %xmm1, %xmm4 cmpless %xmm0, %xmm4 movaps %xmm4, %xmm2 andps %xmm0, %xmm2 andnps %xmm1, %xmm4 orps %xmm2, %xmm4 cltq shlq $0x4, %rax movlps %xmm0, (%r14,%rax) movss %xmm4, 0x8(%r14,%rax) movss %xmm3, 0xc(%r14,%rax) incl 0x60(%rbx) movq %rbx, %rdi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x9850 movaps %xmm5, (%rsp) movaps %xmm0, 0x10(%rsp) movaps %xmm1, 0x20(%rsp) movl $0x8, %ecx movl $0x1, %ebp jmp 0x9aa6 nop
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImDrawList::PushTextureID(void*)
void ImDrawList::PushTextureID(ImTextureID texture_id) { _TextureIdStack.push_back(texture_id); UpdateTextureID(); }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movl 0x70(%rdi), %eax cmpl 0x74(%rdi), %eax jne 0x9bdb leal 0x1(%rax), %ebp testl %eax, %eax je 0x9be1 movl %eax, %ecx shrl $0x1f, %ecx addl %eax, %ecx sarl %ecx addl %eax, %ecx jmp 0x9be6 movq 0x78(%rbx), %r15 jmp 0x9c26 movl $0x8, %ecx cmpl %ebp, %ecx cmovgl %ecx, %ebp movslq %ebp, %rdi shlq $0x3, %rdi callq 0x19cda movq %rax, %r15 movq 0x78(%rbx), %rsi testq %rsi, %rsi je 0x9c1c movslq 0x70(%rbx), %rdx shlq $0x3, %rdx movq %r15, %rdi callq 0x6090 movq 0x78(%rbx), %rdi callq 0x19da4 movq %r15, 0x78(%rbx) movl %ebp, 0x74(%rbx) movl 0x70(%rbx), %eax cltq movq %r14, (%r15,%rax,8) incl 0x70(%rbx) movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x992a nop
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImDrawList::ChannelsSplit(int)
void ImDrawList::ChannelsSplit(int channels_count) { IM_ASSERT(_ChannelsCurrent == 0 && _ChannelsCount == 1); int old_channels_count = _Channels.Size; if (old_channels_count < channels_count) _Channels.resize(channels_count); _ChannelsCount = channels_count; // _Channels[] (24/32 bytes each) hold storage that we'll swap with this->_CmdBuffer/_IdxBuffer // The content of _Channels[0] at this point doesn't matter. We clear it to make state tidy in a debugger but we don't strictly need to. // When we switch to the next channel, we'll copy _CmdBuffer/_IdxBuffer into _Channels[0] and then _Channels[1] into _CmdBuffer/_IdxBuffer memset(&_Channels[0], 0, sizeof(ImDrawChannel)); for (int i = 1; i < channels_count; i++) { if (i >= old_channels_count) { IM_PLACEMENT_NEW(&_Channels[i]) ImDrawChannel(); } else { _Channels[i].CmdBuffer.resize(0); _Channels[i].IdxBuffer.resize(0); } if (_Channels[i].CmdBuffer.Size == 0) { ImDrawCmd draw_cmd; draw_cmd.ClipRect = _ClipRectStack.back(); draw_cmd.TextureId = _TextureIdStack.back(); _Channels[i].CmdBuffer.push_back(draw_cmd); } } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp cmpl $0x0, 0x90(%rdi) jne 0x9fdc movq %rdi, %rbx cmpl $0x1, 0x94(%rdi) jne 0x9fdc movl %esi, %ebp movl 0x98(%rbx), %r15d movl %r15d, %eax cmpl %esi, %r15d jge 0x9d2d movl 0x9c(%rbx), %eax cmpl %ebp, %eax jge 0x9d25 testl %eax, %eax je 0x9cd0 movl %eax, %r12d shrl $0x1f, %r12d addl %eax, %r12d sarl %r12d addl %eax, %r12d jmp 0x9cd6 movl $0x8, %r12d cmpl %ebp, %r12d cmovlel %ebp, %r12d movslq %r12d, %rdi shlq $0x5, %rdi callq 0x19cda movq %rax, %r14 movq 0xa0(%rbx), %rsi testq %rsi, %rsi je 0x9d17 movslq 0x98(%rbx), %rdx shlq $0x5, %rdx movq %r14, %rdi callq 0x6090 movq 0xa0(%rbx), %rdi callq 0x19da4 movq %r14, 0xa0(%rbx) movl %r12d, 0x9c(%rbx) movl %ebp, 0x98(%rbx) movl %ebp, %eax movl %ebp, 0x94(%rbx) testl %eax, %eax jle 0x9f87 movq 0xa0(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movups %xmm0, (%rax) cmpl $0x2, %ebp jl 0x9f78 movslq %r15d, %r12 movl %ebp, %esi movl $0x1, %r13d movl $0x38, %ebp movq %rsi, (%rsp) movq %r12, 0x10(%rsp) movslq 0x98(%rbx), %rax cmpq %r12, %r13 jge 0x9e4b cmpq %rax, %r13 jge 0x9f87 movq 0xa0(%rbx), %r15 cmpl $0x0, -0x14(%r15,%rbp) jns 0x9de2 xorl %edi, %edi callq 0x19cda movq %rax, %r14 movq -0x10(%r15,%rbp), %rsi testq %rsi, %rsi je 0x9dc9 movslq -0x18(%r15,%rbp), %rax shlq $0x4, %rax leaq (%rax,%rax,2), %rdx movq %r14, %rdi callq 0x6090 movq -0x10(%r15,%rbp), %rdi callq 0x19da4 movq %r14, -0x10(%r15,%rbp) movl $0x0, -0x14(%r15,%rbp) movslq 0x98(%rbx), %rax movq (%rsp), %rsi movl $0x0, -0x18(%r15,%rbp) cmpq %r13, %rax jle 0x9f87 movq 0xa0(%rbx), %r15 cmpl $0x0, -0x4(%r15,%rbp) jns 0x9e40 xorl %edi, %edi callq 0x19cda movq %rax, %r14 movq (%r15,%rbp), %rsi testq %rsi, %rsi je 0x9e2f movslq -0x8(%r15,%rbp), %rdx addq %rdx, %rdx movq %r14, %rdi callq 0x6090 movq (%r15,%rbp), %rdi callq 0x19da4 movq %r14, (%r15,%rbp) movl $0x0, -0x4(%r15,%rbp) movq (%rsp), %rsi movl $0x0, -0x8(%r15,%rbp) jmp 0x9e68 cmpq %rax, %r13 jge 0x9f87 movq 0xa0(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x8(%rax,%rbp) movups %xmm0, -0x18(%rax,%rbp) movslq 0x98(%rbx), %rax cmpq %rax, %r13 jge 0x9f87 movq 0xa0(%rbx), %r15 cmpl $0x0, -0x18(%r15,%rbp) jne 0x9f68 movslq 0x60(%rbx), %rax testq %rax, %rax jle 0x9fa6 movq 0x68(%rbx), %rcx shlq $0x4, %rax movl -0x10(%rcx,%rax), %r12d movl -0x4(%rcx,%rax), %edx movl %edx, 0x20(%rsp) movq -0xc(%rcx,%rax), %rax movq %rax, 0x18(%rsp) movslq 0x70(%rbx), %rax testq %rax, %rax jle 0x9fbd movq 0x78(%rbx), %rcx movq -0x8(%rcx,%rax,8), %rcx cmpl $0x0, -0x14(%r15,%rbp) je 0x9ede movq -0x10(%r15,%rbp), %r14 xorl %eax, %eax jmp 0x9f35 movq %rcx, 0x8(%rsp) movl $0x180, %edi # imm = 0x180 callq 0x19cda movq %rax, %r14 movq -0x10(%r15,%rbp), %rsi testq %rsi, %rsi je 0x9f19 movslq -0x18(%r15,%rbp), %rax shlq $0x4, %rax leaq (%rax,%rax,2), %rdx movq %r14, %rdi callq 0x6090 movq -0x10(%r15,%rbp), %rdi callq 0x19da4 movq %r14, -0x10(%r15,%rbp) movl $0x8, -0x14(%r15,%rbp) movslq -0x18(%r15,%rbp), %rax movq (%rsp), %rsi movq 0x8(%rsp), %rcx shlq $0x20, %r12 leaq (%rax,%rax,2), %rax shlq $0x4, %rax movq %r12, (%r14,%rax) movups 0x18(%rsp), %xmm0 movups %xmm0, 0x8(%r14,%rax) movq %rcx, 0x18(%r14,%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x20(%r14,%rax) incl -0x18(%r15,%rbp) movq 0x10(%rsp), %r12 incq %r13 addq $0x20, %rbp cmpq %r13, %rsi jne 0x9d6e addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x8a9de(%rip), %rdi # 0x9496c leaq 0x8a9e0(%rip), %rsi # 0x94975 leaq 0x8b2f8(%rip), %rcx # 0x95294 movl $0x4d7, %edx # imm = 0x4D7 callq 0x61b0 leaq 0x8a49c(%rip), %rdi # 0x94449 leaq 0x8a9c1(%rip), %rsi # 0x94975 leaq 0x8b348(%rip), %rcx # 0x95303 jmp 0x9fd2 leaq 0x8a485(%rip), %rdi # 0x94449 leaq 0x8a9aa(%rip), %rsi # 0x94975 leaq 0x8b35a(%rip), %rcx # 0x9532c movl $0x4e1, %edx # imm = 0x4E1 callq 0x61b0 leaq 0x89dd1(%rip), %rdi # 0x93db4 leaq 0x89cdc(%rip), %rsi # 0x93cc6 leaq 0x89df0(%rip), %rcx # 0x93de1 movl $0x20e, %edx # imm = 0x20E callq 0x61b0 nop
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImDrawList::ChannelsMerge()
void ImDrawList::ChannelsMerge() { // Note that we never use or rely on channels.Size because it is merely a buffer that we never shrink back to 0 to keep all sub-buffers ready for use. if (_ChannelsCount <= 1) return; ChannelsSetCurrent(0); if (CmdBuffer.Size && CmdBuffer.back().ElemCount == 0) CmdBuffer.pop_back(); int new_cmd_buffer_count = 0, new_idx_buffer_count = 0; for (int i = 1; i < _ChannelsCount; i++) { ImDrawChannel& ch = _Channels[i]; if (ch.CmdBuffer.Size && ch.CmdBuffer.back().ElemCount == 0) ch.CmdBuffer.pop_back(); new_cmd_buffer_count += ch.CmdBuffer.Size; new_idx_buffer_count += ch.IdxBuffer.Size; } CmdBuffer.resize(CmdBuffer.Size + new_cmd_buffer_count); IdxBuffer.resize(IdxBuffer.Size + new_idx_buffer_count); ImDrawCmd* cmd_write = CmdBuffer.Data + CmdBuffer.Size - new_cmd_buffer_count; _IdxWritePtr = IdxBuffer.Data + IdxBuffer.Size - new_idx_buffer_count; for (int i = 1; i < _ChannelsCount; i++) { ImDrawChannel& ch = _Channels[i]; if (int sz = ch.CmdBuffer.Size) { memcpy(cmd_write, ch.CmdBuffer.Data, sz * sizeof(ImDrawCmd)); cmd_write += sz; } if (int sz = ch.IdxBuffer.Size) { memcpy(_IdxWritePtr, ch.IdxBuffer.Data, sz * sizeof(ImDrawIdx)); _IdxWritePtr += sz; } } UpdateClipRect(); // We call this instead of AddDrawCmd(), so that empty channels won't produce an extra draw call. _ChannelsCount = 1; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax cmpl $0x2, 0x94(%rdi) jl 0xa292 movq %rdi, %rbx xorl %r15d, %r15d xorl %esi, %esi callq 0xa2e0 movl (%rbx), %eax movl $0x0, %r12d testq %rax, %rax je 0xa055 testl %eax, %eax jle 0xa2c0 movq 0x8(%rbx), %rcx leaq (%rax,%rax,2), %rdx shlq $0x4, %rdx cmpl $0x0, -0x30(%rcx,%rdx) je 0xa04e movl %eax, %r12d jmp 0xa055 leal -0x1(%rax), %r12d movl %r12d, (%rbx) movslq 0x94(%rbx), %rax movl $0x0, %ebp cmpq $0x2, %rax jl 0xa0db movl 0x98(%rbx), %esi movq 0xa0(%rbx), %rcx cmpl $0x2, %esi movl $0x1, %edx cmovgel %esi, %edx shlq $0x5, %rdx shlq $0x5, %rax xorl %ebp, %ebp movl $0x20, %esi xorl %r15d, %r15d cmpq %rsi, %rdx je 0xa2a1 movl (%rcx,%rsi), %edi testq %rdi, %rdi je 0xa0c6 testl %edi, %edi jle 0xa2c0 movq 0x8(%rcx,%rsi), %r8 leaq (%rdi,%rdi,2), %r9 shlq $0x4, %r9 cmpl $0x0, -0x30(%r8,%r9) jne 0xa0c8 decl %edi movl %edi, (%rcx,%rsi) jmp 0xa0c8 xorl %edi, %edi addl %edi, %ebp addl 0x10(%rcx,%rsi), %r15d addq $0x20, %rsi cmpq %rsi, %rax jne 0xa091 movl (%rbx), %r12d addl %ebp, %r12d movl 0x4(%rbx), %eax cmpl %r12d, %eax jge 0xa149 testl %eax, %eax je 0xa0fc movl %eax, %r13d shrl $0x1f, %r13d addl %eax, %r13d sarl %r13d addl %eax, %r13d jmp 0xa102 movl $0x8, %r13d cmpl %r12d, %r13d cmovlel %r12d, %r13d movslq %r13d, %rax shlq $0x4, %rax leaq (%rax,%rax,2), %rdi callq 0x19cda movq %rax, %r14 movq 0x8(%rbx), %rsi testq %rsi, %rsi je 0xa141 movslq (%rbx), %rax shlq $0x4, %rax leaq (%rax,%rax,2), %rdx movq %r14, %rdi callq 0x6090 movq 0x8(%rbx), %rdi callq 0x19da4 movq %r14, 0x8(%rbx) movl %r13d, 0x4(%rbx) movl %r12d, (%rbx) movslq 0x10(%rbx), %r13 movslq %r15d, %r15 addq %r15, %r13 movl 0x14(%rbx), %eax cmpl %r13d, %eax jge 0xa174 testl %eax, %eax je 0xa17a movl %eax, %r12d shrl $0x1f, %r12d addl %eax, %r12d sarl %r12d addl %eax, %r12d jmp 0xa180 movq 0x18(%rbx), %r14 jmp 0xa1c1 movl $0x8, %r12d cmpl %r13d, %r12d cmovlel %r13d, %r12d movslq %r12d, %rdi addq %rdi, %rdi callq 0x19cda movq %rax, %r14 movq 0x18(%rbx), %rsi testq %rsi, %rsi je 0xa1b6 movslq 0x10(%rbx), %rdx addq %rdx, %rdx movq %r14, %rdi callq 0x6090 movq 0x18(%rbx), %rdi callq 0x19da4 movq %r14, 0x18(%rbx) movl %r12d, 0x14(%rbx) movl (%rbx), %r12d movl %r13d, 0x10(%rbx) movq 0x8(%rbx), %rax leaq (%r14,%r13,2), %rcx addq %r15, %r15 subq %r15, %rcx movq %rcx, 0x58(%rbx) cmpl $0x2, 0x94(%rbx) jl 0xa280 movslq %r12d, %rcx leaq (%rcx,%rcx,2), %rcx shlq $0x4, %rcx addq %rcx, %rax movslq %ebp, %rcx negq %rcx leaq (%rcx,%rcx,2), %r14 shlq $0x4, %r14 addq %rax, %r14 movl $0x1, %r12d movl $0x38, %r13d movslq 0x98(%rbx), %rax cmpq %rax, %r12 jge 0xa2a1 movq 0xa0(%rbx), %rbp movslq -0x18(%rbp,%r13), %rax testq %rax, %rax je 0xa24b movq -0x10(%rbp,%r13), %rsi shlq $0x4, %rax leaq (%rax,%rax,2), %r15 movq %r14, %rdi movq %r15, %rdx callq 0x6090 addq %r15, %r14 movslq -0x8(%rbp,%r13), %r15 testq %r15, %r15 je 0xa26d movq 0x58(%rbx), %rdi movq (%rbp,%r13), %rsi addq %r15, %r15 movq %r15, %rdx callq 0x6090 addq %r15, 0x58(%rbx) incq %r12 movslq 0x94(%rbx), %rax addq $0x20, %r13 cmpq %rax, %r12 jl 0xa20f movq %rbx, %rdi callq 0x9850 movl $0x1, 0x94(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x8a6c4(%rip), %rdi # 0x9496c leaq 0x8a6c6(%rip), %rsi # 0x94975 leaq 0x8afde(%rip), %rcx # 0x95294 movl $0x4d7, %edx # imm = 0x4D7 callq 0x61b0 leaq 0x8a182(%rip), %rdi # 0x94449 leaq 0x8a6a7(%rip), %rsi # 0x94975 leaq 0x8afff(%rip), %rcx # 0x952d4 movl $0x4e1, %edx # imm = 0x4E1 callq 0x61b0 nop
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImDrawList::ChannelsSetCurrent(int)
void ImDrawList::ChannelsSetCurrent(int idx) { IM_ASSERT(idx < _ChannelsCount); if (_ChannelsCurrent == idx) return; memcpy(&_Channels.Data[_ChannelsCurrent].CmdBuffer, &CmdBuffer, sizeof(CmdBuffer)); // copy 12 bytes, four times memcpy(&_Channels.Data[_ChannelsCurrent].IdxBuffer, &IdxBuffer, sizeof(IdxBuffer)); _ChannelsCurrent = idx; memcpy(&CmdBuffer, &_Channels.Data[_ChannelsCurrent].CmdBuffer, sizeof(CmdBuffer)); memcpy(&IdxBuffer, &_Channels.Data[_ChannelsCurrent].IdxBuffer, sizeof(IdxBuffer)); _IdxWritePtr = IdxBuffer.Data + IdxBuffer.Size; }
cmpl %esi, 0x94(%rdi) jle 0xa354 movslq 0x90(%rdi), %rax cmpl %esi, %eax je 0xa353 movq 0xa0(%rdi), %rcx shlq $0x5, %rax movups (%rdi), %xmm0 movups %xmm0, (%rcx,%rax) movq 0xa0(%rdi), %rax movslq 0x90(%rdi), %rcx shlq $0x5, %rcx movups 0x10(%rdi), %xmm0 movups %xmm0, 0x10(%rax,%rcx) movl %esi, 0x90(%rdi) movq 0xa0(%rdi), %rax movslq %esi, %rcx shlq $0x5, %rcx movups (%rax,%rcx), %xmm0 movups %xmm0, (%rdi) movups 0x10(%rax,%rcx), %xmm0 movups %xmm0, 0x10(%rdi) movslq 0x10(%rdi), %rax addq %rax, %rax addq 0x18(%rdi), %rax movq %rax, 0x58(%rdi) retq pushq %rax leaq 0x89aa9(%rip), %rdi # 0x93e05 leaq 0x89963(%rip), %rsi # 0x93cc6 leaq 0x89ab0(%rip), %rcx # 0x93e1a movl $0x251, %edx # imm = 0x251 callq 0x61b0
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImDrawList::PrimRect(ImVec2 const&, ImVec2 const&, unsigned int)
void ImDrawList::PrimRect(const ImVec2& a, const ImVec2& c, ImU32 col) { ImVec2 b(c.x, a.y), d(a.x, c.y), uv(_Data->TexUvWhitePixel); ImDrawIdx idx = (ImDrawIdx)_VtxCurrentIdx; _IdxWritePtr[0] = idx; _IdxWritePtr[1] = (ImDrawIdx)(idx+1); _IdxWritePtr[2] = (ImDrawIdx)(idx+2); _IdxWritePtr[3] = idx; _IdxWritePtr[4] = (ImDrawIdx)(idx+2); _IdxWritePtr[5] = (ImDrawIdx)(idx+3); _VtxWritePtr[0].pos = a; _VtxWritePtr[0].uv = uv; _VtxWritePtr[0].col = col; _VtxWritePtr[1].pos = b; _VtxWritePtr[1].uv = uv; _VtxWritePtr[1].col = col; _VtxWritePtr[2].pos = c; _VtxWritePtr[2].uv = uv; _VtxWritePtr[2].col = col; _VtxWritePtr[3].pos = d; _VtxWritePtr[3].uv = uv; _VtxWritePtr[3].col = col; _VtxWritePtr += 4; _VtxCurrentIdx += 4; _IdxWritePtr += 6; }
pushq %rbp pushq %r14 pushq %rbx movl (%rsi), %eax movl 0x4(%rsi), %r10d movl (%rdx), %r11d movl 0x4(%rdx), %r8d movq 0x38(%rdi), %r9 movq (%r9), %r9 movl 0x48(%rdi), %ebx movq 0x58(%rdi), %r14 movw %bx, (%r14) leal 0x1(%rbx), %ebp movw %bp, 0x2(%r14) leal 0x2(%rbx), %ebp movw %bp, 0x4(%r14) movw %bx, 0x6(%r14) movw %bp, 0x8(%r14) addl $0x3, %ebx movw %bx, 0xa(%r14) movq 0x50(%rdi), %rbx movq (%rsi), %rsi movq %rsi, (%rbx) movq 0x50(%rdi), %rsi movq %r9, 0x8(%rsi) movq 0x50(%rdi), %rsi movl %ecx, 0x10(%rsi) movl %r11d, 0x14(%rsi) movl %r10d, 0x18(%rsi) movq 0x50(%rdi), %rsi movq %r9, 0x1c(%rsi) movq 0x50(%rdi), %rsi movl %ecx, 0x24(%rsi) movq (%rdx), %rdx movq %rdx, 0x28(%rsi) movq 0x50(%rdi), %rdx movq %r9, 0x30(%rdx) movq 0x50(%rdi), %rdx movl %ecx, 0x38(%rdx) movl %eax, 0x3c(%rdx) movl %r8d, 0x40(%rdx) movq 0x50(%rdi), %rax movq %r9, 0x44(%rax) movq 0x50(%rdi), %rax movl %ecx, 0x4c(%rax) addq $0x50, %rax movq %rax, 0x50(%rdi) addl $0x4, 0x48(%rdi) addq $0xc, 0x58(%rdi) popq %rbx popq %r14 popq %rbp retq nop
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImDrawList::PrimRectUV(ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, unsigned int)
void ImDrawList::PrimRectUV(const ImVec2& a, const ImVec2& c, const ImVec2& uv_a, const ImVec2& uv_c, ImU32 col) { ImVec2 b(c.x, a.y), d(a.x, c.y), uv_b(uv_c.x, uv_a.y), uv_d(uv_a.x, uv_c.y); ImDrawIdx idx = (ImDrawIdx)_VtxCurrentIdx; _IdxWritePtr[0] = idx; _IdxWritePtr[1] = (ImDrawIdx)(idx+1); _IdxWritePtr[2] = (ImDrawIdx)(idx+2); _IdxWritePtr[3] = idx; _IdxWritePtr[4] = (ImDrawIdx)(idx+2); _IdxWritePtr[5] = (ImDrawIdx)(idx+3); _VtxWritePtr[0].pos = a; _VtxWritePtr[0].uv = uv_a; _VtxWritePtr[0].col = col; _VtxWritePtr[1].pos = b; _VtxWritePtr[1].uv = uv_b; _VtxWritePtr[1].col = col; _VtxWritePtr[2].pos = c; _VtxWritePtr[2].uv = uv_c; _VtxWritePtr[2].col = col; _VtxWritePtr[3].pos = d; _VtxWritePtr[3].uv = uv_d; _VtxWritePtr[3].col = col; _VtxWritePtr += 4; _VtxCurrentIdx += 4; _IdxWritePtr += 6; }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl (%rsi), %eax movl %eax, -0x4(%rsp) movl 0x4(%rsi), %ebp movl (%rdx), %r15d movl 0x4(%rdx), %r11d movl (%rcx), %eax movl %eax, -0x8(%rsp) movl 0x4(%rcx), %r14d movl (%r8), %r12d movl 0x4(%r8), %ebx movl 0x48(%rdi), %r13d movq 0x58(%rdi), %rax movw %r13w, (%rax) leal 0x1(%r13), %r10d movw %r10w, 0x2(%rax) leal 0x2(%r13), %r10d movw %r10w, 0x4(%rax) movw %r13w, 0x6(%rax) movw %r10w, 0x8(%rax) addl $0x3, %r13d movw %r13w, 0xa(%rax) movq 0x50(%rdi), %rax movq (%rsi), %rsi movq %rsi, (%rax) movq 0x50(%rdi), %rax movq (%rcx), %rcx movq %rcx, 0x8(%rax) movq 0x50(%rdi), %rax movl %r9d, 0x10(%rax) movl %r15d, 0x14(%rax) movl %ebp, 0x18(%rax) movq 0x50(%rdi), %rax movl %r12d, 0x1c(%rax) movl %r14d, 0x20(%rax) movq 0x50(%rdi), %rax movl %r9d, 0x24(%rax) movq (%rdx), %rcx movq %rcx, 0x28(%rax) movq 0x50(%rdi), %rax movq (%r8), %rcx movq %rcx, 0x30(%rax) movq 0x50(%rdi), %rax movl %r9d, 0x38(%rax) movl -0x4(%rsp), %ecx movl %ecx, 0x3c(%rax) movl %r11d, 0x40(%rax) movq 0x50(%rdi), %rax movl -0x8(%rsp), %ecx movl %ecx, 0x44(%rax) movl %ebx, 0x48(%rax) movq 0x50(%rdi), %rax movl %r9d, 0x4c(%rax) addq $0x50, %rax movq %rax, 0x50(%rdi) addl $0x4, 0x48(%rdi) addq $0xc, 0x58(%rdi) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImDrawList::PrimQuadUV(ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, unsigned int)
void ImDrawList::PrimQuadUV(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, const ImVec2& uv_a, const ImVec2& uv_b, const ImVec2& uv_c, const ImVec2& uv_d, ImU32 col) { ImDrawIdx idx = (ImDrawIdx)_VtxCurrentIdx; _IdxWritePtr[0] = idx; _IdxWritePtr[1] = (ImDrawIdx)(idx+1); _IdxWritePtr[2] = (ImDrawIdx)(idx+2); _IdxWritePtr[3] = idx; _IdxWritePtr[4] = (ImDrawIdx)(idx+2); _IdxWritePtr[5] = (ImDrawIdx)(idx+3); _VtxWritePtr[0].pos = a; _VtxWritePtr[0].uv = uv_a; _VtxWritePtr[0].col = col; _VtxWritePtr[1].pos = b; _VtxWritePtr[1].uv = uv_b; _VtxWritePtr[1].col = col; _VtxWritePtr[2].pos = c; _VtxWritePtr[2].uv = uv_c; _VtxWritePtr[2].col = col; _VtxWritePtr[3].pos = d; _VtxWritePtr[3].uv = uv_d; _VtxWritePtr[3].col = col; _VtxWritePtr += 4; _VtxCurrentIdx += 4; _IdxWritePtr += 6; }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx movq 0x38(%rsp), %rax movq 0x30(%rsp), %r11 movq 0x28(%rsp), %rbx movl 0x40(%rsp), %r10d movl 0x48(%rdi), %r14d movq 0x58(%rdi), %r15 movw %r14w, (%r15) leal 0x1(%r14), %ebp movw %bp, 0x2(%r15) leal 0x2(%r14), %ebp movw %bp, 0x4(%r15) movw %r14w, 0x6(%r15) movw %bp, 0x8(%r15) addl $0x3, %r14d movw %r14w, 0xa(%r15) movq 0x50(%rdi), %r14 movq (%rsi), %rsi movq %rsi, (%r14) movq 0x50(%rdi), %rsi movq (%r9), %r9 movq %r9, 0x8(%rsi) movq 0x50(%rdi), %rsi movl %r10d, 0x10(%rsi) movq (%rdx), %rdx movq %rdx, 0x14(%rsi) movq 0x50(%rdi), %rdx movq (%rbx), %rsi movq %rsi, 0x1c(%rdx) movq 0x50(%rdi), %rdx movl %r10d, 0x24(%rdx) movq (%rcx), %rcx movq %rcx, 0x28(%rdx) movq 0x50(%rdi), %rcx movq (%r11), %rdx movq %rdx, 0x30(%rcx) movq 0x50(%rdi), %rcx movl %r10d, 0x38(%rcx) movq (%r8), %rdx movq %rdx, 0x3c(%rcx) movq 0x50(%rdi), %rcx movq (%rax), %rax movq %rax, 0x44(%rcx) movq 0x50(%rdi), %rax movl %r10d, 0x4c(%rax) addq $0x50, %rax movq %rax, 0x50(%rdi) addl $0x4, 0x48(%rdi) addq $0xc, 0x58(%rdi) popq %rbx popq %r14 popq %r15 popq %rbp retq
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImDrawList::PathArcToFast(ImVec2 const&, float, int, int)
void ImDrawList::PathArcToFast(const ImVec2& centre, float radius, int a_min_of_12, int a_max_of_12) { if (radius == 0.0f || a_min_of_12 > a_max_of_12) { _Path.push_back(centre); return; } _Path.reserve(_Path.Size + (a_max_of_12 - a_min_of_12 + 1)); for (int a = a_min_of_12; a <= a_max_of_12; a++) { const ImVec2& c = _Data->CircleVtx12[a % IM_ARRAYSIZE(_Data->CircleVtx12)]; _Path.push_back(ImVec2(centre.x + c.x * radius, centre.y + c.y * radius)); } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %ecx, %ebp movl %edx, %r15d movq %rsi, %r14 movq %rdi, %rbx xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 setp %al setne %dl orb %al, %dl subl %r15d, %ecx setge %sil movl 0x80(%rdi), %eax testb %sil, %dl jne 0xb1b4 cmpl 0x84(%rbx), %eax jne 0xb320 leal 0x1(%rax), %ebp testl %eax, %eax je 0xb329 movl %eax, %ecx shrl $0x1f, %ecx addl %eax, %ecx sarl %ecx addl %eax, %ecx jmp 0xb32e leal (%rcx,%rax), %r13d incl %r13d cmpl %r13d, 0x84(%rbx) jge 0xb214 movaps %xmm0, (%rsp) movslq %r13d, %rdi shlq $0x3, %rdi callq 0x19cda movq %rax, %r12 movq 0x88(%rbx), %rsi testq %rsi, %rsi je 0xb202 movslq 0x80(%rbx), %rdx shlq $0x3, %rdx movq %r12, %rdi callq 0x6090 movq 0x88(%rbx), %rdi callq 0x19da4 movq %r12, 0x88(%rbx) movl %r13d, 0x84(%rbx) movaps (%rsp), %xmm0 movl 0x80(%rbx), %r13d shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0] incl %ebp movaps %xmm0, (%rsp) movq 0x38(%rbx), %rax movslq %r15d, %rcx imulq $0x2aaaaaab, %rcx, %rdx # imm = 0x2AAAAAAB movq %rdx, %rsi shrq $0x3f, %rsi shrq $0x21, %rdx addl %esi, %edx shll $0x2, %edx leal (%rdx,%rdx,2), %edx subl %edx, %ecx movslq %ecx, %rcx movsd (%r14), %xmm2 movsd 0x28(%rax,%rcx,8), %xmm1 cmpl 0x84(%rbx), %r13d jne 0xb27e testl %r13d, %r13d movaps %xmm1, 0x20(%rsp) movaps %xmm2, 0x10(%rsp) je 0xb287 movl %r13d, %eax shrl $0x1f, %eax addl %r13d, %eax sarl %eax addl %r13d, %eax jmp 0xb28c movq 0x88(%rbx), %r12 jmp 0xb2f3 movl $0x8, %eax incl %r13d cmpl %r13d, %eax cmovgl %eax, %r13d movslq %r13d, %rdi shlq $0x3, %rdi callq 0x19cda movq %rax, %r12 movq 0x88(%rbx), %rsi testq %rsi, %rsi je 0xb2d0 movslq 0x80(%rbx), %rdx shlq $0x3, %rdx movq %r12, %rdi callq 0x6090 movq 0x88(%rbx), %rdi callq 0x19da4 movq %r12, 0x88(%rbx) movl %r13d, 0x84(%rbx) movl 0x80(%rbx), %r13d movaps (%rsp), %xmm0 movaps 0x20(%rsp), %xmm1 movaps 0x10(%rsp), %xmm2 mulps %xmm0, %xmm1 addps %xmm2, %xmm1 movslq %r13d, %rax movlps %xmm1, (%r12,%rax,8) movl 0x80(%rbx), %r13d incl %r13d movl %r13d, 0x80(%rbx) incl %r15d cmpl %r15d, %ebp jne 0xb225 jmp 0xb38f movq 0x88(%rbx), %r15 jmp 0xb380 movl $0x8, %ecx cmpl %ebp, %ecx cmovgl %ecx, %ebp movslq %ebp, %rdi shlq $0x3, %rdi callq 0x19cda movq %rax, %r15 movq 0x88(%rbx), %rsi testq %rsi, %rsi je 0xb36d movslq 0x80(%rbx), %rdx shlq $0x3, %rdx movq %r15, %rdi callq 0x6090 movq 0x88(%rbx), %rdi callq 0x19da4 movq %r15, 0x88(%rbx) movl %ebp, 0x84(%rbx) movl 0x80(%rbx), %eax cltq movq (%r14), %rcx movq %rcx, (%r15,%rax,8) incl 0x80(%rbx) addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImDrawList::PathRect(ImVec2 const&, ImVec2 const&, float, int)
void ImDrawList::PathRect(const ImVec2& a, const ImVec2& b, float rounding, int rounding_corners) { rounding = ImMin(rounding, ImFabs(b.x - a.x) * ( ((rounding_corners & ImDrawCornerFlags_Top) == ImDrawCornerFlags_Top) || ((rounding_corners & ImDrawCornerFlags_Bot) == ImDrawCornerFlags_Bot) ? 0.5f : 1.0f ) - 1.0f); rounding = ImMin(rounding, ImFabs(b.y - a.y) * ( ((rounding_corners & ImDrawCornerFlags_Left) == ImDrawCornerFlags_Left) || ((rounding_corners & ImDrawCornerFlags_Right) == ImDrawCornerFlags_Right) ? 0.5f : 1.0f ) - 1.0f); if (rounding <= 0.0f || rounding_corners == 0) { PathLineTo(a); PathLineTo(ImVec2(b.x, a.y)); PathLineTo(b); PathLineTo(ImVec2(a.x, b.y)); } else { const float rounding_tl = (rounding_corners & ImDrawCornerFlags_TopLeft) ? rounding : 0.0f; const float rounding_tr = (rounding_corners & ImDrawCornerFlags_TopRight) ? rounding : 0.0f; const float rounding_br = (rounding_corners & ImDrawCornerFlags_BotRight) ? rounding : 0.0f; const float rounding_bl = (rounding_corners & ImDrawCornerFlags_BotLeft) ? rounding : 0.0f; PathArcToFast(ImVec2(a.x + rounding_tl, a.y + rounding_tl), rounding_tl, 6, 9); PathArcToFast(ImVec2(b.x - rounding_tr, a.y + rounding_tr), rounding_tr, 9, 12); PathArcToFast(ImVec2(b.x - rounding_br, b.y - rounding_br), rounding_br, 0, 3); PathArcToFast(ImVec2(a.x + rounding_bl, b.y - rounding_bl), rounding_bl, 3, 6); } }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl %ecx, %eax notl %eax movss 0x82c87(%rip), %xmm1 # 0x8e820 movss 0x82c77(%rip), %xmm2 # 0x8e818 movaps %xmm1, %xmm4 testb $0xc, %al je 0xbbab movaps %xmm2, %xmm4 movaps %xmm1, %xmm3 testb $0x3, %al je 0xbbb5 movaps %xmm4, %xmm3 movaps %xmm1, %xmm4 testb $0xa, %al je 0xbbbf movaps %xmm2, %xmm4 testb $0x5, %al je 0xbbc6 movaps %xmm4, %xmm1 testl %ecx, %ecx je 0xbd34 movss (%r14), %xmm4 movsd (%r15), %xmm2 subss %xmm2, %xmm4 movaps 0x82a8d(%rip), %xmm5 # 0x8e670 andps %xmm5, %xmm4 movss 0x4(%r14), %xmm6 movaps %xmm2, %xmm7 shufps $0x55, %xmm2, %xmm7 # xmm7 = xmm7[1,1],xmm2[1,1] mulss %xmm3, %xmm4 movss 0x82c1d(%rip), %xmm3 # 0x8e81c addss %xmm3, %xmm4 subss %xmm7, %xmm6 minss %xmm4, %xmm0 andps %xmm5, %xmm6 mulss %xmm1, %xmm6 addss %xmm3, %xmm6 minss %xmm6, %xmm0 xorps %xmm3, %xmm3 ucomiss %xmm0, %xmm3 jae 0xbd34 xorps %xmm1, %xmm1 testb $0x1, %cl je 0xbc31 movaps %xmm0, %xmm1 xorps %xmm4, %xmm4 testb $0x2, %cl je 0xbc3c movaps %xmm0, %xmm4 movss %xmm4, 0xc(%rsp) xorps %xmm4, %xmm4 testb $0x8, %cl je 0xbc4d movaps %xmm0, %xmm4 movaps %xmm4, 0x10(%rsp) testb $0x4, %cl je 0xbc5a movaps %xmm0, %xmm3 movss %xmm3, 0x8(%rsp) movaps %xmm1, %xmm0 unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] addps %xmm0, %xmm2 movq %rsp, %r12 movlps %xmm2, (%r12) movq %rbx, %rdi movq %r12, %rsi movaps %xmm1, %xmm0 movl $0x6, %edx movl $0x9, %ecx callq 0xb154 movss (%r14), %xmm2 movss 0xc(%rsp), %xmm0 subss %xmm0, %xmm2 movss 0x4(%r15), %xmm1 addss %xmm0, %xmm1 movss %xmm2, (%r12) movss %xmm1, 0x4(%r12) movq %rsp, %r12 movq %rbx, %rdi movq %r12, %rsi movl $0x9, %edx movl $0xc, %ecx callq 0xb154 movsd (%r14), %xmm2 movaps 0x10(%rsp), %xmm0 movaps %xmm0, %xmm1 unpcklps %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] subps %xmm1, %xmm2 movlps %xmm2, (%r12) movq %rsp, %r12 movq %rbx, %rdi movq %r12, %rsi xorl %edx, %edx movl $0x3, %ecx callq 0xb154 movss (%r15), %xmm2 movss 0x8(%rsp), %xmm0 addss %xmm0, %xmm2 movss 0x4(%r14), %xmm1 subss %xmm0, %xmm1 movss %xmm2, (%r12) movss %xmm1, 0x4(%r12) movq %rsp, %rsi movq %rbx, %rdi movl $0x3, %edx movl $0x6, %ecx callq 0xb154 jmp 0xbfae movl 0x80(%rbx), %eax cmpl 0x84(%rbx), %eax jne 0xbd56 leal 0x1(%rax), %ebp testl %eax, %eax je 0xbd5f movl %eax, %ecx shrl $0x1f, %ecx addl %eax, %ecx sarl %ecx addl %eax, %ecx jmp 0xbd64 movq 0x88(%rbx), %r12 jmp 0xbdb6 movl $0x8, %ecx cmpl %ebp, %ecx cmovgl %ecx, %ebp movslq %ebp, %rdi shlq $0x3, %rdi callq 0x19cda movq %rax, %r12 movq 0x88(%rbx), %rsi testq %rsi, %rsi je 0xbda3 movslq 0x80(%rbx), %rdx shlq $0x3, %rdx movq %r12, %rdi callq 0x6090 movq 0x88(%rbx), %rdi callq 0x19da4 movq %r12, 0x88(%rbx) movl %ebp, 0x84(%rbx) movl 0x80(%rbx), %eax cltq movq (%r15), %rcx movq %rcx, (%r12,%rax,8) movl 0x80(%rbx), %r13d leal 0x1(%r13), %eax movl %eax, 0x80(%rbx) movl (%r14), %ebp movl 0x4(%r15), %ecx cmpl 0x84(%rbx), %eax jne 0xbdf8 movl %ecx, 0x10(%rsp) addl $0x2, %r13d testl %eax, %eax je 0xbe01 movl %eax, %ecx shrl $0x1f, %ecx addl %eax, %ecx sarl %ecx addl %eax, %ecx jmp 0xbe06 movq 0x88(%rbx), %r12 jmp 0xbe5f movl $0x8, %ecx cmpl %r13d, %ecx cmovgl %ecx, %r13d movslq %r13d, %rdi shlq $0x3, %rdi callq 0x19cda movq %rax, %r12 movq 0x88(%rbx), %rsi testq %rsi, %rsi je 0xbe47 movslq 0x80(%rbx), %rdx shlq $0x3, %rdx movq %r12, %rdi callq 0x6090 movq 0x88(%rbx), %rdi callq 0x19da4 movq %r12, 0x88(%rbx) movl %r13d, 0x84(%rbx) movl 0x80(%rbx), %eax movl 0x10(%rsp), %ecx cltq movl %ebp, (%r12,%rax,8) movl %ecx, 0x4(%r12,%rax,8) movl 0x80(%rbx), %r13d leal 0x1(%r13), %eax movl %eax, 0x80(%rbx) cmpl 0x84(%rbx), %eax jne 0xbe98 addl $0x2, %r13d testl %eax, %eax je 0xbea1 movl %eax, %ecx shrl $0x1f, %ecx addl %eax, %ecx sarl %ecx addl %eax, %ecx jmp 0xbea6 movq 0x88(%rbx), %r12 jmp 0xbefb movl $0x8, %ecx cmpl %r13d, %ecx cmovgl %ecx, %r13d movslq %r13d, %rdi shlq $0x3, %rdi callq 0x19cda movq %rax, %r12 movq 0x88(%rbx), %rsi testq %rsi, %rsi je 0xbee7 movslq 0x80(%rbx), %rdx shlq $0x3, %rdx movq %r12, %rdi callq 0x6090 movq 0x88(%rbx), %rdi callq 0x19da4 movq %r12, 0x88(%rbx) movl %r13d, 0x84(%rbx) movl 0x80(%rbx), %eax cltq movq (%r14), %rcx movq %rcx, (%r12,%rax,8) movl 0x80(%rbx), %r12d leal 0x1(%r12), %eax movl %eax, 0x80(%rbx) movl (%r15), %ebp movl 0x4(%r14), %r15d cmpl 0x84(%rbx), %eax jne 0xbf3a addl $0x2, %r12d testl %eax, %eax je 0xbf43 movl %eax, %ecx shrl $0x1f, %ecx addl %eax, %ecx sarl %ecx addl %eax, %ecx jmp 0xbf48 movq 0x88(%rbx), %r14 jmp 0xbf9d movl $0x8, %ecx cmpl %r12d, %ecx cmovgl %ecx, %r12d movslq %r12d, %rdi shlq $0x3, %rdi callq 0x19cda movq %rax, %r14 movq 0x88(%rbx), %rsi testq %rsi, %rsi je 0xbf89 movslq 0x80(%rbx), %rdx shlq $0x3, %rdx movq %r14, %rdi callq 0x6090 movq 0x88(%rbx), %rdi callq 0x19da4 movq %r14, 0x88(%rbx) movl %r12d, 0x84(%rbx) movl 0x80(%rbx), %eax cltq movl %ebp, (%r14,%rax,8) movl %r15d, 0x4(%r14,%rax,8) incl 0x80(%rbx) addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImFontAtlas::ImFontAtlas()
ImFontAtlas::ImFontAtlas() { Locked = false; Flags = ImFontAtlasFlags_None; TexID = (ImTextureID)NULL; TexDesiredWidth = 0; TexGlyphPadding = 1; TexPixelsAlpha8 = NULL; TexPixelsRGBA32 = NULL; TexWidth = TexHeight = 0; TexUvScale = ImVec2(0.0f, 0.0f); TexUvWhitePixel = ImVec2(0.0f, 0.0f); for (int n = 0; n < IM_ARRAYSIZE(CustomRectIds); n++) CustomRectIds[n] = -1; }
movb $0x0, (%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x4(%rdi) movups %xmm0, 0x40(%rdi) movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movl $0x1, 0x14(%rdi) movups %xmm0, 0x18(%rdi) movups %xmm0, 0x28(%rdi) movq $0x0, 0x38(%rdi) movl $0xffffffff, 0x70(%rdi) # imm = 0xFFFFFFFF retq nop
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
ImFontAtlas::AddCustomRectFontGlyph(ImFont*, unsigned short, int, int, float, ImVec2 const&)
int ImFontAtlas::AddCustomRectFontGlyph(ImFont* font, ImWchar id, int width, int height, float advance_x, const ImVec2& offset) { IM_ASSERT(font != NULL); IM_ASSERT(width > 0 && width <= 0xFFFF); IM_ASSERT(height > 0 && height <= 0xFFFF); CustomRect r; r.ID = id; r.Width = (unsigned short)width; r.Height = (unsigned short)height; r.GlyphAdvanceX = advance_x; r.GlyphOffset = offset; r.Font = font; CustomRects.push_back(r); return CustomRects.Size - 1; // Return index }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp testq %rsi, %rsi je 0xf418 movl %ecx, %r12d leal -0x1(%r12), %eax cmpl $0xffff, %eax # imm = 0xFFFF jae 0xf437 movl %r8d, %r15d leal -0x1(%r15), %eax cmpl $0xffff, %eax # imm = 0xFFFF jae 0xf456 movq %rsi, %r14 movq %rdi, %rbx movq (%r9), %rsi movl 0x50(%rdi), %eax cmpl 0x54(%rdi), %eax jne 0xf372 leal 0x1(%rax), %ebp testl %eax, %eax movss %xmm0, 0xc(%rsp) movl %edx, 0x8(%rsp) movq %rsi, 0x10(%rsp) je 0xf378 movl %eax, %ecx shrl $0x1f, %ecx addl %eax, %ecx sarl %ecx addl %eax, %ecx jmp 0xf37d movq 0x58(%rbx), %r13 jmp 0xf3cc movl $0x8, %ecx cmpl %ebp, %ecx cmovgl %ecx, %ebp movslq %ebp, %rdi shlq $0x5, %rdi callq 0x19cda movq %rax, %r13 movq 0x58(%rbx), %rsi testq %rsi, %rsi je 0xf3b3 movslq 0x50(%rbx), %rdx shlq $0x5, %rdx movq %r13, %rdi callq 0x6090 movq 0x58(%rbx), %rdi callq 0x19da4 movq %r13, 0x58(%rbx) movl %ebp, 0x54(%rbx) movl 0x50(%rbx), %eax movss 0xc(%rsp), %xmm0 movl 0x8(%rsp), %edx movq 0x10(%rsp), %rsi movzwl %dx, %ecx cltq shlq $0x5, %rax movl %ecx, (%r13,%rax) movw %r12w, 0x4(%r13,%rax) movw %r15w, 0x6(%r13,%rax) movl $0xffffffff, 0x8(%r13,%rax) # imm = 0xFFFFFFFF movss %xmm0, 0xc(%r13,%rax) movq %rsi, 0x10(%r13,%rax) movq %r14, 0x18(%r13,%rax) movl 0x50(%rbx), %eax leal 0x1(%rax), %ecx movl %ecx, 0x50(%rbx) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x84e79(%rip), %rdi # 0x94298 leaq 0x848a0(%rip), %rsi # 0x93cc6 leaq 0x84e7a(%rip), %rcx # 0x942a7 movl $0x692, %edx # imm = 0x692 callq 0x61b0 leaq 0x84e1e(%rip), %rdi # 0x9425c leaq 0x84881(%rip), %rsi # 0x93cc6 leaq 0x84e5b(%rip), %rcx # 0x942a7 movl $0x693, %edx # imm = 0x693 callq 0x61b0 leaq 0x84e1c(%rip), %rdi # 0x94279 leaq 0x84862(%rip), %rsi # 0x93cc6 leaq 0x84e3c(%rip), %rcx # 0x942a7 movl $0x694, %edx # imm = 0x694 callq 0x61b0 nop
/JohanSmet[P]lsim/src/gui/imgui/imgui_draw.cpp
stbtt__find_table(unsigned char*, unsigned int, char const*)
static stbtt_uint32 stbtt__find_table(stbtt_uint8 *data, stbtt_uint32 fontstart, const char *tag) { stbtt_int32 num_tables = ttUSHORT(data+fontstart+4); stbtt_uint32 tabledir = fontstart + 12; stbtt_int32 i; for (i=0; i < num_tables; ++i) { stbtt_uint32 loc = tabledir + 16*i; if (stbtt_tag(data+loc+0, tag)) return ttULONG(data+loc+8); } return 0; }
movl %esi, %eax movzwl 0x4(%rdi,%rax), %ecx rolw $0x8, %cx xorl %eax, %eax testw %cx, %cx je 0x160b1 movzwl %cx, %r8d movsbl (%rdx), %ecx movl %r8d, %r8d addl $0xc, %esi movl %esi, %esi movzbl (%rdi,%rsi), %r9d cmpl %ecx, %r9d jne 0x160a9 movzbl 0x1(%rdi,%rsi), %r9d movsbl 0x1(%rdx), %r10d cmpl %r10d, %r9d jne 0x160a9 movzbl 0x2(%rdi,%rsi), %r9d movsbl 0x2(%rdx), %r10d cmpl %r10d, %r9d jne 0x160a9 movzbl 0x3(%rdi,%rsi), %r9d movsbl 0x3(%rdx), %r10d cmpl %r10d, %r9d je 0x160b2 addl $0x10, %esi decq %r8 jne 0x1606d retq movl 0x8(%rdi,%rsi), %eax bswapl %eax retq
/JohanSmet[P]lsim/src/gui/imgui/imstb_truetype.h
stbtt__run_charstring(stbtt_fontinfo const*, int, stbtt__csctx*)
static int stbtt__run_charstring(const stbtt_fontinfo *info, int glyph_index, stbtt__csctx *c) { int in_header = 1, maskbits = 0, subr_stack_height = 0, sp = 0, v, i, b0; int has_subrs = 0, clear_stack; float s[48]; stbtt__buf subr_stack[10], subrs = info->subrs, b; float f; #define STBTT__CSERR(s) (0) // this currently ignores the initial width value, which isn't needed if we have hmtx b = stbtt__cff_index_get(info->charstrings, glyph_index); while (b.cursor < b.size) { i = 0; clear_stack = 1; b0 = stbtt__buf_get8(&b); switch (b0) { // @TODO implement hinting case 0x13: // hintmask case 0x14: // cntrmask if (in_header) maskbits += (sp / 2); // implicit "vstem" in_header = 0; stbtt__buf_skip(&b, (maskbits + 7) / 8); break; case 0x01: // hstem case 0x03: // vstem case 0x12: // hstemhm case 0x17: // vstemhm maskbits += (sp / 2); break; case 0x15: // rmoveto in_header = 0; if (sp < 2) return STBTT__CSERR("rmoveto stack"); stbtt__csctx_rmove_to(c, s[sp-2], s[sp-1]); break; case 0x04: // vmoveto in_header = 0; if (sp < 1) return STBTT__CSERR("vmoveto stack"); stbtt__csctx_rmove_to(c, 0, s[sp-1]); break; case 0x16: // hmoveto in_header = 0; if (sp < 1) return STBTT__CSERR("hmoveto stack"); stbtt__csctx_rmove_to(c, s[sp-1], 0); break; case 0x05: // rlineto if (sp < 2) return STBTT__CSERR("rlineto stack"); for (; i + 1 < sp; i += 2) stbtt__csctx_rline_to(c, s[i], s[i+1]); break; // hlineto/vlineto and vhcurveto/hvcurveto alternate horizontal and vertical // starting from a different place. case 0x07: // vlineto if (sp < 1) return STBTT__CSERR("vlineto stack"); goto vlineto; case 0x06: // hlineto if (sp < 1) return STBTT__CSERR("hlineto stack"); for (;;) { if (i >= sp) break; stbtt__csctx_rline_to(c, s[i], 0); i++; vlineto: if (i >= sp) break; stbtt__csctx_rline_to(c, 0, s[i]); i++; } break; case 0x1F: // hvcurveto if (sp < 4) return STBTT__CSERR("hvcurveto stack"); goto hvcurveto; case 0x1E: // vhcurveto if (sp < 4) return STBTT__CSERR("vhcurveto stack"); for (;;) { if (i + 3 >= sp) break; stbtt__csctx_rccurve_to(c, 0, s[i], s[i+1], s[i+2], s[i+3], (sp - i == 5) ? s[i + 4] : 0.0f); i += 4; hvcurveto: if (i + 3 >= sp) break; stbtt__csctx_rccurve_to(c, s[i], 0, s[i+1], s[i+2], (sp - i == 5) ? s[i+4] : 0.0f, s[i+3]); i += 4; } break; case 0x08: // rrcurveto if (sp < 6) return STBTT__CSERR("rcurveline stack"); for (; i + 5 < sp; i += 6) stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]); break; case 0x18: // rcurveline if (sp < 8) return STBTT__CSERR("rcurveline stack"); for (; i + 5 < sp - 2; i += 6) stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]); if (i + 1 >= sp) return STBTT__CSERR("rcurveline stack"); stbtt__csctx_rline_to(c, s[i], s[i+1]); break; case 0x19: // rlinecurve if (sp < 8) return STBTT__CSERR("rlinecurve stack"); for (; i + 1 < sp - 6; i += 2) stbtt__csctx_rline_to(c, s[i], s[i+1]); if (i + 5 >= sp) return STBTT__CSERR("rlinecurve stack"); stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]); break; case 0x1A: // vvcurveto case 0x1B: // hhcurveto if (sp < 4) return STBTT__CSERR("(vv|hh)curveto stack"); f = 0.0; if (sp & 1) { f = s[i]; i++; } for (; i + 3 < sp; i += 4) { if (b0 == 0x1B) stbtt__csctx_rccurve_to(c, s[i], f, s[i+1], s[i+2], s[i+3], 0.0); else stbtt__csctx_rccurve_to(c, f, s[i], s[i+1], s[i+2], 0.0, s[i+3]); f = 0.0; } break; case 0x0A: // callsubr if (!has_subrs) { if (info->fdselect.size) subrs = stbtt__cid_get_glyph_subrs(info, glyph_index); has_subrs = 1; } // fallthrough case 0x1D: // callgsubr if (sp < 1) return STBTT__CSERR("call(g|)subr stack"); v = (int) s[--sp]; if (subr_stack_height >= 10) return STBTT__CSERR("recursion limit"); subr_stack[subr_stack_height++] = b; b = stbtt__get_subr(b0 == 0x0A ? subrs : info->gsubrs, v); if (b.size == 0) return STBTT__CSERR("subr not found"); b.cursor = 0; clear_stack = 0; break; case 0x0B: // return if (subr_stack_height <= 0) return STBTT__CSERR("return outside subr"); b = subr_stack[--subr_stack_height]; clear_stack = 0; break; case 0x0E: // endchar stbtt__csctx_close_shape(c); return 1; case 0x0C: { // two-byte escape float dx1, dx2, dx3, dx4, dx5, dx6, dy1, dy2, dy3, dy4, dy5, dy6; float dx, dy; int b1 = stbtt__buf_get8(&b); switch (b1) { // @TODO These "flex" implementations ignore the flex-depth and resolution, // and always draw beziers. case 0x22: // hflex if (sp < 7) return STBTT__CSERR("hflex stack"); dx1 = s[0]; dx2 = s[1]; dy2 = s[2]; dx3 = s[3]; dx4 = s[4]; dx5 = s[5]; dx6 = s[6]; stbtt__csctx_rccurve_to(c, dx1, 0, dx2, dy2, dx3, 0); stbtt__csctx_rccurve_to(c, dx4, 0, dx5, -dy2, dx6, 0); break; case 0x23: // flex if (sp < 13) return STBTT__CSERR("flex stack"); dx1 = s[0]; dy1 = s[1]; dx2 = s[2]; dy2 = s[3]; dx3 = s[4]; dy3 = s[5]; dx4 = s[6]; dy4 = s[7]; dx5 = s[8]; dy5 = s[9]; dx6 = s[10]; dy6 = s[11]; //fd is s[12] stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3); stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6); break; case 0x24: // hflex1 if (sp < 9) return STBTT__CSERR("hflex1 stack"); dx1 = s[0]; dy1 = s[1]; dx2 = s[2]; dy2 = s[3]; dx3 = s[4]; dx4 = s[5]; dx5 = s[6]; dy5 = s[7]; dx6 = s[8]; stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, 0); stbtt__csctx_rccurve_to(c, dx4, 0, dx5, dy5, dx6, -(dy1+dy2+dy5)); break; case 0x25: // flex1 if (sp < 11) return STBTT__CSERR("flex1 stack"); dx1 = s[0]; dy1 = s[1]; dx2 = s[2]; dy2 = s[3]; dx3 = s[4]; dy3 = s[5]; dx4 = s[6]; dy4 = s[7]; dx5 = s[8]; dy5 = s[9]; dx6 = dy6 = s[10]; dx = dx1+dx2+dx3+dx4+dx5; dy = dy1+dy2+dy3+dy4+dy5; if (STBTT_fabs(dx) > STBTT_fabs(dy)) dy6 = -dy; else dx6 = -dx; stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3); stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6); break; default: return STBTT__CSERR("unimplemented"); } } break; default: if (b0 != 255 && b0 != 28 && (b0 < 32 || b0 > 254)) //-V560 return STBTT__CSERR("reserved operator"); // push immediate if (b0 == 255) { f = (float)(stbtt_int32)stbtt__buf_get32(&b) / 0x10000; } else { stbtt__buf_skip(&b, -1); f = (float)(stbtt_int16)stbtt__cff_int(&b); } if (sp >= 48) return STBTT__CSERR("push stack overflow"); s[sp++] = f; clear_stack = 0; break; } if (clear_stack) sp = 0; } return STBTT__CSERR("no endchar"); #undef STBTT__CSERR }
pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x218, %rsp # imm = 0x218 movq %rdx, %rbx movl %esi, %r14d movq %rdi, %r15 movq 0x70(%rdi), %r12 movq 0x78(%rdi), %rax movq %rax, 0x148(%rsp) movq 0x50(%rdi), %rdi movq 0x58(%r15), %rsi movl %r14d, %edx callq 0x161ea movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq %rdx, %rax shrq $0x20, %rax cmpl %eax, %edx jge 0x17486 movq %r12, 0x140(%rsp) movq %r14, 0x160(%rsp) leal 0x1(%r14), %ebp movq %r15, 0x38(%rsp) leaq 0x68(%r15), %rcx movq %rcx, 0x168(%rsp) xorl %r12d, %r12d movl $0x1, 0xc(%rsp) movq $0x0, 0x30(%rsp) movq $0x0, 0x28(%rsp) xorl %r13d, %r13d movl $0x0, 0x24(%rsp) movq %rbp, (%rsp) movq 0x10(%rsp), %rsi movslq %edx, %rdi leaq 0x1(%rdi), %rcx movl %ecx, 0x18(%rsp) movb (%rsi,%rdi), %r15b movzbl %r15b, %edi leal -0x1(%rdi), %r8d cmpl $0x1e, %r8d ja 0x16951 leaq 0x78054(%rip), %r9 # 0x8e8cc movslq (%r9,%r8,4), %rdi addq %r9, %rdi jmpq *%rdi movl %r13d, %eax shrl $0x1f, %eax addl %r13d, %eax sarl %eax movq 0x30(%rsp), %rcx addl %eax, %ecx movq %rcx, 0x30(%rsp) jmp 0x16efc cmpl $0x0, 0xc(%rsp) je 0x16ec8 movl %r13d, %edx shrl $0x1f, %edx addl %r13d, %edx sarl %edx movq 0x30(%rsp), %rsi addl %edx, %esi movq %rsi, %rdx jmp 0x16ecd cmpl $0x4, %r13d jl 0x17486 movl %r13d, %ebp andl $0x1, %ebp leal 0x3(%rbp), %eax cmpl %r13d, %eax jae 0x1746f xorps %xmm1, %xmm1 testl %ebp, %ebp je 0x168ee movss 0x80(%rsp), %xmm1 leal 0x3(%rbp), %eax movss 0x80(%rsp,%rbp,4), %xmm7 movss 0x84(%rsp,%rbp,4), %xmm2 movss 0x88(%rsp,%rbp,4), %xmm3 movss 0x80(%rsp,%rax,4), %xmm6 cmpb $0x1b, %r15b jne 0x16929 xorps %xmm5, %xmm5 movq %rbx, %rdi movaps %xmm7, %xmm0 movaps %xmm6, %xmm4 jmp 0x16938 xorps %xmm4, %xmm4 movq %rbx, %rdi movaps %xmm1, %xmm0 movaps %xmm7, %xmm1 movaps %xmm6, %xmm5 callq 0x17524 addq $0x4, %rbp leal 0x3(%rbp), %eax xorps %xmm1, %xmm1 cmpl %r13d, %eax jl 0x168ee jmp 0x1746f cmpl $0xff, %edi je 0x16991 cmpb $0x20, %r15b jb 0x17486 cmpb $-0x1, %r15b je 0x16991 testl %edx, %edx js 0x174ab cmpl %edx, %eax jl 0x174ab movl %edx, 0x18(%rsp) leaq 0x10(%rsp), %rdi callq 0x1660c cwtl xorps %xmm0, %xmm0 cvtsi2ss %eax, %xmm0 jmp 0x169c8 xorl %edx, %edx movl $0x4, %edi cmpl %eax, %ecx jge 0x169a8 movslq %ecx, %r8 incl %ecx movzbl (%rsi,%r8), %r8d jmp 0x169ab xorl %r8d, %r8d shll $0x8, %edx orl %r8d, %edx decl %edi jne 0x16998 movl %ecx, 0x18(%rsp) xorps %xmm0, %xmm0 cvtsi2ss %edx, %xmm0 mulss 0x77e8c(%rip), %xmm0 # 0x8e854 cmpl $0x2f, %r13d jg 0x17486 movslq %r13d, %rax incl %r13d movss %xmm0, 0x80(%rsp,%rax,4) jmp 0x17476 movl 0x24(%rsp), %r11d jmp 0x171e0 movl $0x1, %r11d cmpl $0x0, 0x24(%rsp) jne 0x171e0 movq 0x38(%rsp), %rax movl 0x9c(%rax), %eax testl %eax, %eax je 0x171e0 js 0x174ab movq 0x38(%rsp), %rcx movq 0x90(%rcx), %rcx movzbl (%rcx), %edx testl %edx, %edx je 0x17187 cmpl $0x3, %edx jne 0x16af2 xorl %esi, %esi movl $0x1, %edi movl $0x2, %edx cmpl %eax, %edi jge 0x16a56 movslq %edi, %r8 incl %edi movzbl (%rcx,%r8), %r8d jmp 0x16a59 xorl %r8d, %r8d shll $0x8, %esi orl %r8d, %esi decl %edx jne 0x16a46 xorl %r8d, %r8d movl $0x2, %edx cmpl %eax, %edi jge 0x16a7b movslq %edi, %r9 incl %edi movzbl (%rcx,%r9), %r9d jmp 0x16a7e xorl %r9d, %r9d shll $0x8, %r8d orl %r9d, %r8d decl %edx jne 0x16a6b testl %esi, %esi jle 0x16af2 xorl %r9d, %r9d cmpl %eax, %edi jge 0x16a9f movslq %edi, %rdx incl %edi movzbl (%rcx,%rdx), %edx jmp 0x16aa1 xorl %edx, %edx xorl %r10d, %r10d movl $0x2, %r11d cmpl %eax, %edi jge 0x16aba movslq %edi, %r14 incl %edi movzbl (%rcx,%r14), %ebp jmp 0x16abc xorl %ebp, %ebp shll $0x8, %r10d orl %ebp, %r10d decl %r11d jne 0x16aaa movq 0x160(%rsp), %r11 cmpl %r11d, %r8d setg %r8b cmpl %r11d, %r10d setle %r11b orb %r8b, %r11b je 0x17199 incl %r9d movl %r10d, %r8d cmpl %esi, %r9d jne 0x16a90 movl $0xffffffff, %edx # imm = 0xFFFFFFFF jmp 0x17199 xorl %ebp, %ebp cmpl $0x8, %r13d jl 0x17488 leal -0x6(%r13), %r15d movl $0x2, %eax movq %rax, %r14 movsd 0x78(%rsp,%rax,4), %xmm0 movsd 0x10(%rbx), %xmm1 addps %xmm0, %xmm1 cvttss2si %xmm1, %edx movlps %xmm1, 0x10(%rbx) shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] cvttss2si %xmm1, %ecx movq %rbx, %rdi movl $0x2, %esi xorl %r8d, %r8d xorl %r9d, %r9d pushq %r12 pushq %r12 callq 0x175b7 addq $0x10, %rsp leaq 0x2(%r14), %rax incq %r14 cmpq %r15, %r14 jb 0x16b11 leaq 0x3(%rax), %rcx cmpl %r13d, %ecx jge 0x17488 movss 0x78(%rsp,%rax,4), %xmm0 movss 0x7c(%rsp,%rax,4), %xmm1 movl %eax, %edx andl $-0x2, %edx movss 0x80(%rsp,%rdx,4), %xmm2 leal 0x1(%rax), %edx movss 0x80(%rsp,%rdx,4), %xmm3 addl $0x2, %eax andl $-0x2, %eax movss 0x80(%rsp,%rax,4), %xmm4 movl %ecx, %eax movss 0x80(%rsp,%rax,4), %xmm5 movq %rbx, %rdi callq 0x17524 jmp 0x1746f xorl %ebp, %ebp testl %r13d, %r13d jg 0x173ce jmp 0x17488 xorl %ebp, %ebp cmpl %eax, %ecx jge 0x17488 addl $0x2, %edx movl %edx, 0x18(%rsp) movzbl (%rsi,%rcx), %eax addl $-0x22, %eax cmpl $0x3, %eax ja 0x17488 leaq 0x77d5d(%rip), %rcx # 0x8e948 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax cmpl $0x7, %r13d jl 0x17488 movss 0x80(%rsp), %xmm0 movss 0x84(%rsp), %xmm2 movss 0x88(%rsp), %xmm3 movaps %xmm3, 0x40(%rsp) movss 0x8c(%rsp), %xmm4 movss 0x90(%rsp), %xmm1 movss %xmm1, 0x60(%rsp) movss 0x94(%rsp), %xmm1 movss %xmm1, 0x50(%rsp) movss 0x98(%rsp), %xmm1 movss %xmm1, 0x70(%rsp) xorps %xmm1, %xmm1 xorps %xmm5, %xmm5 movq %rbx, %rdi callq 0x17524 movaps 0x40(%rsp), %xmm3 xorps 0x779e2(%rip), %xmm3 # 0x8e650 xorps %xmm1, %xmm1 xorps %xmm5, %xmm5 movq %rbx, %rdi movss 0x60(%rsp), %xmm0 movss 0x50(%rsp), %xmm2 movss 0x70(%rsp), %xmm4 jmp 0x16ba9 xorl %ebp, %ebp testl %r13d, %r13d jg 0x17418 jmp 0x17488 cmpl $0x2, %r13d jl 0x17486 movl %r13d, %r15d movl $0x1, %ebp movsd 0x7c(%rsp,%rbp,4), %xmm0 movsd 0x10(%rbx), %xmm1 addps %xmm0, %xmm1 cvttss2si %xmm1, %edx movlps %xmm1, 0x10(%rbx) shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] cvttss2si %xmm1, %ecx xorl %r13d, %r13d movq %rbx, %rdi movl $0x2, %esi xorl %r8d, %r8d xorl %r9d, %r9d pushq %r13 pushq %r13 callq 0x175b7 addq $0x10, %rsp addq $0x2, %rbp cmpq %r15, %rbp jb 0x16cb0 jmp 0x17472 testl %r13d, %r13d jle 0x17486 decl %r13d movss 0x80(%rsp,%r13,4), %xmm1 xorps %xmm0, %xmm0 jmp 0x16ebe movq 0x28(%rsp), %rax testl %eax, %eax jle 0x17486 decl %eax movq %rax, 0x28(%rsp) shlq $0x4, %rax movups 0x170(%rsp,%rax), %xmm0 movaps %xmm0, 0x10(%rsp) jmp 0x17476 xorl %ebp, %ebp cmpl $0x8, %r13d jl 0x17488 movl %r13d, %r14d addq $-0xd, %r14 movq $-0x6, %r15 movss 0x98(%rsp,%r15,4), %xmm0 movss 0x9c(%rsp,%r15,4), %xmm1 movss 0xa0(%rsp,%r15,4), %xmm2 movss 0xa4(%rsp,%r15,4), %xmm3 movss 0xa8(%rsp,%r15,4), %xmm4 movss 0xac(%rsp,%r15,4), %xmm5 movq %rbx, %rdi callq 0x17524 addq $0x6, %r15 cmpq %r14, %r15 jl 0x16d5c leal 0x7(%r15), %eax cmpl %r13d, %eax jge 0x17488 movsd 0x98(%rsp,%r15,4), %xmm0 movsd 0x10(%rbx), %xmm1 addps %xmm0, %xmm1 cvttss2si %xmm1, %edx movlps %xmm1, 0x10(%rbx) shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] cvttss2si %xmm1, %ecx xorl %r13d, %r13d movq %rbx, %rdi movl $0x2, %esi xorl %r8d, %r8d xorl %r9d, %r9d pushq %r13 pushq %r13 callq 0x175b7 addq $0x10, %rsp jmp 0x17472 cmpl $0x6, %r13d jl 0x17486 movl %r13d, %r14d movl $0x5, %r15d movss 0x6c(%rsp,%r15,4), %xmm0 movss 0x70(%rsp,%r15,4), %xmm1 movss 0x74(%rsp,%r15,4), %xmm2 movss 0x78(%rsp,%r15,4), %xmm3 movss 0x7c(%rsp,%r15,4), %xmm4 movss 0x80(%rsp,%r15,4), %xmm5 movq %rbx, %rdi callq 0x17524 addq $0x6, %r15 cmpq %r14, %r15 jb 0x16e0e jmp 0x16efc cmpl $0x2, %r13d jl 0x17486 leal -0x2(%r13), %eax movss 0x80(%rsp,%rax,4), %xmm0 decl %r13d movss 0x80(%rsp,%r13,4), %xmm1 jmp 0x16ebe xorl %r15d, %r15d movl $0x0, %ebp cmpl $0x4, %r13d jge 0x1736a jmp 0x17488 xorl %r15d, %r15d movl $0x0, %ebp cmpl $0x4, %r13d jge 0x1730b jmp 0x17488 testl %r13d, %r13d jle 0x17486 decl %r13d movss 0x80(%rsp,%r13,4), %xmm0 xorps %xmm1, %xmm1 movq %rbx, %rdi callq 0x174ca jmp 0x16ef4 movq 0x30(%rsp), %rdx leal 0x7(%rdx), %esi movq %rdx, 0x30(%rsp) addl $0xe, %edx testl %esi, %esi cmovnsl %esi, %edx sarl $0x3, %edx addl %ecx, %edx js 0x174ab cmpl %edx, %eax jl 0x174ab movl %edx, 0x18(%rsp) movl $0x0, 0xc(%rsp) xorl %r13d, %r13d jmp 0x17476 cmpl $0x9, %r13d jl 0x17488 movss 0x80(%rsp), %xmm0 movss 0x84(%rsp), %xmm6 movaps %xmm6, 0x150(%rsp) movss 0x88(%rsp), %xmm2 movss 0x8c(%rsp), %xmm3 movss %xmm3, 0x20(%rsp) movss 0x90(%rsp), %xmm4 movss 0x94(%rsp), %xmm1 movss %xmm1, 0x70(%rsp) movss 0x98(%rsp), %xmm1 movss %xmm1, 0x60(%rsp) movss 0x9c(%rsp), %xmm1 movss %xmm1, 0x40(%rsp) movss 0xa0(%rsp), %xmm1 movss %xmm1, 0x50(%rsp) xorps %xmm5, %xmm5 movq %rbx, %rdi movaps %xmm6, %xmm1 callq 0x17524 movaps 0x150(%rsp), %xmm5 addss 0x20(%rsp), %xmm5 movss 0x40(%rsp), %xmm3 addss %xmm3, %xmm5 xorps 0x7769e(%rip), %xmm5 # 0x8e650 xorps %xmm1, %xmm1 movq %rbx, %rdi movss 0x70(%rsp), %xmm0 movss 0x60(%rsp), %xmm2 movss 0x50(%rsp), %xmm4 jmp 0x16ba9 cmpl $0xb, %r13d jl 0x17488 movss 0xa8(%rsp), %xmm1 movsd 0x80(%rsp), %xmm0 movsd 0x88(%rsp), %xmm2 movsd 0x90(%rsp), %xmm4 movsd 0x98(%rsp), %xmm6 movsd 0xa0(%rsp), %xmm5 movaps %xmm0, %xmm3 addps %xmm2, %xmm3 addps %xmm4, %xmm3 movaps %xmm6, 0x60(%rsp) addps %xmm6, %xmm3 movaps %xmm5, 0x70(%rsp) addps %xmm5, %xmm3 movaps %xmm3, %xmm5 andps 0x7763e(%rip), %xmm5 # 0x8e670 pshufd $0x55, %xmm5, %xmm6 # xmm6 = xmm5[1,1,1,1] ucomiss %xmm6, %xmm5 movaps %xmm1, %xmm7 ja 0x17049 movaps %xmm3, %xmm7 xorps 0x77607(%rip), %xmm7 # 0x8e650 movaps %xmm7, 0x40(%rsp) shufps $0x55, %xmm3, %xmm3 # xmm3 = xmm3[1,1,1,1] xorps 0x775f7(%rip), %xmm3 # 0x8e650 cmpltss %xmm5, %xmm6 andps %xmm6, %xmm3 andnps %xmm1, %xmm6 orps %xmm3, %xmm6 movaps %xmm6, 0x50(%rsp) movaps %xmm0, %xmm1 shufps $0x55, %xmm0, %xmm1 # xmm1 = xmm1[1,1],xmm0[1,1] movaps %xmm2, %xmm3 shufps $0x55, %xmm2, %xmm3 # xmm3 = xmm3[1,1],xmm2[1,1] movaps %xmm4, %xmm5 shufps $0x55, %xmm4, %xmm5 # xmm5 = xmm5[1,1],xmm4[1,1] movq %rbx, %rdi callq 0x17524 movaps 0x60(%rsp), %xmm0 movaps %xmm0, %xmm1 shufps $0x55, %xmm0, %xmm1 # xmm1 = xmm1[1,1],xmm0[1,1] movaps 0x70(%rsp), %xmm2 movaps %xmm2, %xmm3 shufps $0x55, %xmm2, %xmm3 # xmm3 = xmm3[1,1],xmm2[1,1] movq %rbx, %rdi movaps 0x40(%rsp), %xmm4 movaps 0x50(%rsp), %xmm5 jmp 0x16ba9 cmpl $0xd, %r13d jl 0x17488 movss 0x80(%rsp), %xmm0 movss 0x84(%rsp), %xmm1 movss 0x88(%rsp), %xmm2 movss 0x8c(%rsp), %xmm3 movss 0x90(%rsp), %xmm4 movss 0x94(%rsp), %xmm5 movss 0x98(%rsp), %xmm6 movss %xmm6, 0x70(%rsp) movss 0x9c(%rsp), %xmm6 movss %xmm6, 0x60(%rsp) movss 0xa0(%rsp), %xmm6 movss %xmm6, 0x50(%rsp) movss 0xa4(%rsp), %xmm6 movss %xmm6, 0x40(%rsp) movss 0xa8(%rsp), %xmm6 movss %xmm6, 0x150(%rsp) movss 0xac(%rsp), %xmm6 movss %xmm6, 0x20(%rsp) movq %rbx, %rdi callq 0x17524 movq %rbx, %rdi movss 0x70(%rsp), %xmm0 movss 0x60(%rsp), %xmm1 movss 0x50(%rsp), %xmm2 movss 0x40(%rsp), %xmm3 movss 0x150(%rsp), %xmm4 movss 0x20(%rsp), %xmm5 jmp 0x16ba9 cmpl %eax, %ebp ja 0x174ab xorl %edx, %edx cmpl %eax, %ebp jae 0x17199 movzbl (%rcx,%rbp), %edx movq 0x38(%rsp), %rax movq 0x40(%rax), %r14 movq 0x48(%rax), %rbp movq 0x80(%rax), %rdi movq 0x88(%rax), %rsi callq 0x161ea movq %rdx, %rcx movq %r14, %rdi movq %rbp, %rsi movq %rax, %rdx callq 0x164f1 movq %rax, 0x140(%rsp) movq %rdx, 0x148(%rsp) movl $0x1, %r11d xorl %ebp, %ebp testl %r13d, %r13d movq 0x28(%rsp), %rax jle 0x17488 cmpl $0x9, %eax jg 0x17488 decl %r13d cvttss2si 0x80(%rsp,%r13,4), %eax movq 0x28(%rsp), %rdx movslq %edx, %rcx shlq $0x4, %rcx movaps 0x10(%rsp), %xmm0 movups %xmm0, 0x170(%rsp,%rcx) leaq 0x148(%rsp), %rcx movq 0x140(%rsp), %rdi cmpb $0xa, %r15b je 0x17246 movq 0x38(%rsp), %rcx movq 0x60(%rcx), %rdi movq 0x168(%rsp), %rcx movq (%rcx), %r8 testq %r8, %r8 js 0x174ab incl %edx movq %rdx, 0x28(%rsp) movq %r8, %rdx shrq $0x20, %rdx xorl %esi, %esi movl $0x2, %r9d xorl %ecx, %ecx movq (%rsp), %rbp cmpl %edx, %esi jge 0x1727e movslq %esi, %r10 incl %esi movzbl (%rdi,%r10), %r10d jmp 0x17281 xorl %r10d, %r10d shll $0x8, %ecx orl %r10d, %ecx decl %r9d jne 0x1726e xorl %edx, %edx cmpl $0x4d8, %ecx # imm = 0x4D8 setge %dl shll $0xa, %edx orl $0x6b, %edx cmpl $0x846c, %ecx # imm = 0x846C movl $0x8000, %r9d # imm = 0x8000 cmovgel %r9d, %edx addl %eax, %edx sets %al cmpl %ecx, %edx setge %cl orb %al, %cl movl $0x0, %eax movl $0x0, %ecx jne 0x172e5 movabsq $0x7fffffff00000000, %rax # imm = 0x7FFFFFFF00000000 andq %rax, %r8 movl %esi, %esi orq %r8, %rsi movl %r11d, %r14d callq 0x161ea movl %r14d, %r11d movq %rdx, %rcx movq %rax, 0x10(%rsp) movq %rcx, 0x18(%rsp) shrq $0x20, %rcx je 0x17486 movl $0x0, 0x18(%rsp) movl %r11d, 0x24(%rsp) jmp 0x17476 leal 0x3(%r15), %eax cmpl %r13d, %eax jge 0x1746f movslq %r15d, %rcx movss 0x80(%rsp,%rcx,4), %xmm1 movss 0x84(%rsp,%rcx,4), %xmm2 movss 0x88(%rsp,%rcx,4), %xmm3 cltq movss 0x80(%rsp,%rax,4), %xmm4 movl %r13d, %eax subl %r15d, %eax addl $0x4, %r15d xorps %xmm5, %xmm5 cmpl $0x5, %eax jne 0x1735f movslq %r15d, %rax movss 0x80(%rsp,%rax,4), %xmm5 xorps %xmm0, %xmm0 movq %rbx, %rdi callq 0x17524 leal 0x3(%r15), %eax cmpl %r13d, %eax jge 0x1746f movslq %r15d, %rcx movss 0x80(%rsp,%rcx,4), %xmm0 movss 0x84(%rsp,%rcx,4), %xmm2 movss 0x88(%rsp,%rcx,4), %xmm3 movl %r13d, %ecx subl %r15d, %ecx addl $0x4, %r15d xorps %xmm4, %xmm4 cmpl $0x5, %ecx jne 0x173b3 movslq %r15d, %rcx movss 0x80(%rsp,%rcx,4), %xmm4 cltq movss 0x80(%rsp,%rax,4), %xmm5 xorps %xmm1, %xmm1 movq %rbx, %rdi callq 0x17524 jmp 0x1730b cmpl %r13d, %ebp jge 0x1746f movslq %ebp, %rax movsd 0x10(%rbx), %xmm0 movss 0x80(%rsp,%rax,4), %xmm1 addps %xmm0, %xmm1 cvttss2si %xmm1, %edx movlps %xmm1, 0x10(%rbx) shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] cvttss2si %xmm1, %ecx movq %rbx, %rdi movl $0x2, %esi xorl %r8d, %r8d xorl %r9d, %r9d pushq %r12 pushq %r12 callq 0x175b7 addq $0x10, %rsp incl %ebp cmpl %r13d, %ebp jge 0x1746f movslq %ebp, %rax movsd 0x10(%rbx), %xmm0 movd 0x80(%rsp,%rax,4), %xmm1 movq %xmm1, %xmm1 # xmm1 = xmm1[0],zero shufps $0xe2, 0x77206(%rip), %xmm1 # xmm1 = xmm1[2,0],mem[2,3] addps %xmm0, %xmm1 cvttss2si %xmm1, %edx movlps %xmm1, 0x10(%rbx) shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] cvttss2si %xmm1, %ecx movq %rbx, %rdi movl $0x2, %esi xorl %r8d, %r8d xorl %r9d, %r9d pushq %r12 pushq %r12 callq 0x175b7 addq $0x10, %rsp incl %ebp jmp 0x173ce xorl %r13d, %r13d movq (%rsp), %rbp movl 0x18(%rsp), %edx movl 0x1c(%rsp), %eax cmpl %eax, %edx jl 0x1684b xorl %ebp, %ebp movl %ebp, %eax addq $0x218, %rsp # imm = 0x218 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi callq 0x1757a movl $0x1, %ebp jmp 0x17488 leaq 0x7d3c0(%rip), %rdi # 0x94872 leaq 0x7d357(%rip), %rsi # 0x94810 leaq 0x7d3ca(%rip), %rcx # 0x9488a movl $0x46c, %edx # imm = 0x46C callq 0x61b0
/JohanSmet[P]lsim/src/gui/imgui/imstb_truetype.h
ImGuiIO::AddInputCharacter(unsigned short)
void ImGuiIO::AddInputCharacter(ImWchar c) { InputQueueCharacters.push_back(c); }
pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx movl 0x1540(%rdi), %eax cmpl 0x1544(%rdi), %eax jne 0x19367 leal 0x1(%rax), %r15d testl %eax, %eax je 0x19373 movl %eax, %ecx shrl $0x1f, %ecx addl %eax, %ecx sarl %ecx addl %eax, %ecx jmp 0x19378 movq 0x1548(%rbx), %r14 jmp 0x19404 movl $0x8, %ecx cmpl %r15d, %ecx cmovgl %ecx, %r15d movslq %r15d, %rdi addq %rdi, %rdi movq 0xb6884(%rip), %rax # 0xcfc10 testq %rax, %rax je 0x19397 incl 0x3b0(%rax) movq 0xb6882(%rip), %rsi # 0xcfc20 callq *0xb2194(%rip) # 0xcb538 movq %rax, %r14 movq 0x1548(%rbx), %rsi testq %rsi, %rsi je 0x193f0 movslq 0x1540(%rbx), %rdx addq %rdx, %rdx movq %r14, %rdi callq 0x6090 movq 0x1548(%rbx), %rdi testq %rdi, %rdi je 0x193e3 movq 0xb6838(%rip), %rax # 0xcfc10 testq %rax, %rax je 0x193e3 decl 0x3b0(%rax) movq 0xb6836(%rip), %rsi # 0xcfc20 callq *0xb2150(%rip) # 0xcb540 movq %r14, 0x1548(%rbx) movl %r15d, 0x1544(%rbx) movl 0x1540(%rbx), %eax cltq movw %bp, (%r14,%rax,2) incl 0x1540(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
/JohanSmet[P]lsim/src/gui/imgui/imgui.cpp
ImGui::DestroyContext(ImGuiContext*)
void ImGui::DestroyContext(ImGuiContext* ctx) { if (ctx == NULL) ctx = GImGui; Shutdown(ctx); if (GImGui == ctx) SetCurrentContext(NULL); IM_DELETE(ctx); }
pushq %rbx movq %rdi, %rbx testq %rdi, %rdi jne 0x1e2f2 movq 0xb191e(%rip), %rbx # 0xcfc10 movq %rbx, %rdi callq 0x1e317 cmpq %rbx, 0xb190f(%rip) # 0xcfc10 jne 0x1e30e movq $0x0, 0xb1902(%rip) # 0xcfc10 movq %rbx, %rdi popq %rbx jmp 0x31e2e
/JohanSmet[P]lsim/src/gui/imgui/imgui.cpp