name
stringlengths 1
473k
| code
stringlengths 7
647k
| asm
stringlengths 4
3.39M
| file
stringlengths 8
196
|
---|---|---|---|
testing::UnitTest::GetTestCase(int) const | inline E GetElementOr(const std::vector<E>& v, int i, E default_value) {
return (i < 0 || i >= static_cast<int>(v.size())) ? default_value
: v[static_cast<size_t>(i)];
} | testl %esi, %esi
js 0x47527
movq 0x40(%rdi), %rax
movq 0xd0(%rax), %rcx
movq 0xd8(%rax), %rdx
subq %rcx, %rdx
shrq $0x2, %rdx
cmpl %esi, %edx
jle 0x47527
movl %esi, %edx
cmpl $0x0, (%rcx,%rdx,4)
js 0x47527
movq 0xb8(%rax), %rax
movq (%rax,%rdx,8), %rax
retq
xorl %eax, %eax
retq
| /ckerr[P]buffy/extern/googletest/googletest/src/gtest-internal-inl.h |
testing::UnitTest::Run() | int UnitTest::Run() {
const bool in_death_test_child_process =
internal::GTEST_FLAG(internal_run_death_test).length() > 0;
// Google Test implements this protocol for catching that a test
// program exits before returning control to Google Test:
//
// 1. Upon start, Google Test creates a file whose absolute path
// is specified by the environment variable
// TEST_PREMATURE_EXIT_FILE.
// 2. When Google Test has finished its work, it deletes the file.
//
// This allows a test runner to set TEST_PREMATURE_EXIT_FILE before
// running a Google-Test-based test program and check the existence
// of the file at the end of the test execution to see if it has
// exited prematurely.
// If we are in the child process of a death test, don't
// create/delete the premature exit file, as doing so is unnecessary
// and will confuse the parent process. Otherwise, create/delete
// the file upon entering/leaving this function. If the program
// somehow exits before this function has a chance to return, the
// premature-exit file will be left undeleted, causing a test runner
// that understands the premature-exit-file protocol to report the
// test as having failed.
const internal::ScopedPrematureExitFile premature_exit_file(
in_death_test_child_process
? nullptr
: internal::posix::GetEnv("TEST_PREMATURE_EXIT_FILE"));
// Captures the value of GTEST_FLAG(catch_exceptions). This value will be
// used for the duration of the program.
impl()->set_catch_exceptions(GTEST_FLAG(catch_exceptions));
#if GTEST_OS_WINDOWS
// Either the user wants Google Test to catch exceptions thrown by the
// tests or this is executing in the context of death test child
// process. In either case the user does not want to see pop-up dialogs
// about crashes - they are expected.
if (impl()->catch_exceptions() || in_death_test_child_process) {
# if !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_WINDOWS_PHONE && !GTEST_OS_WINDOWS_RT
// SetErrorMode doesn't exist on CE.
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT |
SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX);
# endif // !GTEST_OS_WINDOWS_MOBILE
# if (defined(_MSC_VER) || GTEST_OS_WINDOWS_MINGW) && !GTEST_OS_WINDOWS_MOBILE
// Death test children can be terminated with _abort(). On Windows,
// _abort() can show a dialog with a warning message. This forces the
// abort message to go to stderr instead.
_set_error_mode(_OUT_TO_STDERR);
# endif
# if defined(_MSC_VER) && !GTEST_OS_WINDOWS_MOBILE
// In the debug version, Visual Studio pops up a separate dialog
// offering a choice to debug the aborted program. We need to suppress
// this dialog or it will pop up for every EXPECT/ASSERT_DEATH statement
// executed. Google Test will notify the user of any unexpected
// failure via stderr.
if (!GTEST_FLAG(break_on_failure))
_set_abort_behavior(
0x0, // Clear the following flags:
_WRITE_ABORT_MSG | _CALL_REPORTFAULT); // pop-up window, core dump.
// In debug mode, the Windows CRT can crash with an assertion over invalid
// input (e.g. passing an invalid file descriptor). The default handling
// for these assertions is to pop up a dialog and wait for user input.
// Instead ask the CRT to dump such assertions to stderr non-interactively.
if (!IsDebuggerPresent()) {
(void)_CrtSetReportMode(_CRT_ASSERT,
_CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
(void)_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
}
# endif
}
#endif // GTEST_OS_WINDOWS
return internal::HandleExceptionsInMethodIfSupported(
impl(),
&internal::UnitTestImpl::RunAllTests,
"auxiliary test code (environments or event listeners)") ? 0 : 1;
} | pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x43290(%rip) # 0x8a948
je 0x476be
xorl %esi, %esi
jmp 0x476cd
leaq 0x20f21(%rip), %rdi # 0x685e6
callq 0x10600
movq %rax, %rsi
movq %rsp, %rdi
callq 0x56478
movq 0x40(%rbx), %rdi
movb 0x43126(%rip), %al # 0x8a805
movb %al, 0x258(%rdi)
leaq 0x36(%rip), %rsi # 0x47722
leaq 0x20f0c(%rip), %rcx # 0x685ff
xorl %edx, %edx
callq 0x564e8
xorb $0x1, %al
movzbl %al, %ebx
movq %rsp, %rdi
callq 0x56662
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x56662
movq %rbx, %rdi
callq 0x108a0
| /ckerr[P]buffy/extern/googletest/googletest/src/gtest.cc |
testing::UnitTest::current_test_suite() const | GTEST_LOCK_EXCLUDED_(mutex_) {
internal::MutexLock lock(&mutex_);
return impl_->current_test_suite();
} | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0x58578
movq 0x40(%rbx), %rax
movq 0x168(%rax), %rbx
movq %r14, %rdi
callq 0x58616
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x2dd16
nop
| /ckerr[P]buffy/extern/googletest/googletest/src/gtest.cc |
testing::UnitTest::current_test_info() const | GTEST_LOCK_EXCLUDED_(mutex_) {
internal::MutexLock lock(&mutex_);
return impl_->current_test_info();
} | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq %r14, %rdi
callq 0x58578
movq 0x40(%rbx), %rax
movq 0x170(%rax), %rbx
movq %r14, %rdi
callq 0x58616
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x2dd16
nop
| /ckerr[P]buffy/extern/googletest/googletest/src/gtest.cc |
testing::UnitTest::PopGTestTrace() | GTEST_LOCK_EXCLUDED_(mutex_) {
internal::MutexLock lock(&mutex_);
impl_->gtest_trace_stack().pop_back();
} | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x58578
movl $0x248, %edi # imm = 0x248
addq 0x40(%r14), %rdi
callq 0x58f7a
movq 0x8(%rax), %rcx
leaq -0x30(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq -0x20(%rcx), %rdi
addq $-0x10, %rcx
cmpq %rcx, %rdi
je 0x47ea1
movq (%rcx), %rsi
incq %rsi
callq 0x10490
movq %rbx, %rdi
callq 0x58616
addq $0x8, %rsp
popq %rbx
popq %r14
retq
jmp 0x47ec6
movq %rax, %r14
movq %rbx, %rdi
callq 0x58616
movq %r14, %rdi
callq 0x108a0
movq %rax, %rdi
callq 0x2dd16
| /ckerr[P]buffy/extern/googletest/googletest/src/gtest.cc |
testing::internal::UnitTestImpl::GetTestSuite(char const*, char const*, void (*)(), void (*)()) | TestSuite* UnitTestImpl::GetTestSuite(
const char* test_suite_name, const char* type_param,
internal::SetUpTestSuiteFunc set_up_tc,
internal::TearDownTestSuiteFunc tear_down_tc) {
// Can we find a TestSuite with the given name?
const auto test_suite =
std::find_if(test_suites_.rbegin(), test_suites_.rend(),
TestSuiteNameIs(test_suite_name));
if (test_suite != test_suites_.rend()) return *test_suite;
// No. Let's create one.
auto* const new_test_suite =
new TestSuite(test_suite_name, type_param, set_up_tc, tear_down_tc);
// Is this a death test suite?
if (internal::UnitTestOptions::MatchesFilter(test_suite_name,
kDeathTestSuiteFilter)) {
// Yes. Inserts the test suite after the last death test suite
// defined so far. This only works when the test suites haven't
// been shuffled. Otherwise we may end up running a death test
// after a non-death test.
++last_death_test_suite_;
test_suites_.insert(test_suites_.begin() + last_death_test_suite_,
new_test_suite);
} else {
// No. Appends to the end of the list.
test_suites_.push_back(new_test_suite);
}
test_suite_indices_.push_back(static_cast<int>(test_suite_indices_.size()));
return new_test_suite;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %rbx
movq 0xc0(%rdi), %rax
movq %rax, 0x50(%rsp)
movq 0xb8(%rdi), %rax
movq %rax, 0x48(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x5424e
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0x3078a
movq %rbp, 0x40(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x48(%rsp), %rdx
leaq 0x58(%rsp), %rcx
callq 0x569d2
movq %r12, %rbp
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x488e4
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x10490
leaq 0xb8(%rbx), %r15
leaq 0x20(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x48907
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x10490
movq 0x30(%rsp), %rax
cmpq (%r15), %rax
je 0x4891f
movq 0x30(%rsp), %rax
movq -0x8(%rax), %rax
jmp 0x48a36
movq %r15, 0x38(%rsp)
movl $0x108, %edi # imm = 0x108
callq 0x10470
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq 0x40(%rsp), %rdx
movq %r13, %rcx
movq %rbp, %r8
callq 0x3d886
movq %r15, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0x5424e
leaq 0x1db7b(%rip), %rsi # 0x664e0
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x36d34
movl %eax, %r14d
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x4898a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x10490
testb %r14b, %r14b
movq 0x38(%rsp), %rdi
je 0x489c0
movslq 0x164(%rbx), %rax
leaq 0x1(%rax), %rcx
movl %ecx, 0x164(%rbx)
leaq 0x8(,%rax,8), %rsi
addq 0xb8(%rbx), %rsi
leaq 0x8(%rsp), %rdx
callq 0x56b66
jmp 0x489ec
movq 0xc0(%rbx), %rsi
cmpq 0xc8(%rbx), %rsi
je 0x489e2
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0xc0(%rbx)
jmp 0x489ec
leaq 0x8(%rsp), %rdx
callq 0x5dbca
movq 0xd8(%rbx), %rsi
movq %rsi, %rax
subq 0xd0(%rbx), %rax
shrq $0x2, %rax
movl %eax, 0x10(%rsp)
cmpq 0xe0(%rbx), %rsi
je 0x48a1d
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xd8(%rbx)
jmp 0x48a31
addq $0xd0, %rbx
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x5d32c
movq 0x8(%rsp), %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x48a90
movq %rax, %rbx
movl $0x108, %esi # imm = 0x108
movq %r15, %rdi
jmp 0x48a89
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x48a73
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x10490
jmp 0x48a73
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x48a93
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x10490
jmp 0x48a93
movq %rax, %rbx
movq %rbx, %rdi
callq 0x108a0
| /ckerr[P]buffy/extern/googletest/googletest/src/gtest.cc |
testing::internal::UnitTestImpl::UnshuffleTests() | void UnitTestImpl::UnshuffleTests() {
for (size_t i = 0; i < test_suites_.size(); i++) {
// Unshuffles the tests in each test suite.
test_suites_[i]->UnshuffleTests();
// Resets the index of each test suite.
test_suite_indices_[i] = static_cast<int>(i);
}
} | movq 0xb8(%rdi), %rax
movq 0xc0(%rdi), %rcx
subq %rax, %rcx
je 0x4929b
sarq $0x3, %rcx
movq 0xd0(%rdi), %rdx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %esi, %esi
movq (%rax,%rsi,8), %r8
movq 0x48(%r8), %rdi
movq 0x50(%r8), %r8
subq %rdi, %r8
je 0x49290
sarq $0x2, %r8
cmpq $0x1, %r8
adcq $0x0, %r8
xorl %r9d, %r9d
movl %r9d, (%rdi,%r9,4)
incq %r9
cmpq %r9, %r8
jne 0x49284
movl %esi, (%rdx,%rsi,4)
incq %rsi
cmpq %rcx, %rsi
jne 0x49264
retq
| /ckerr[P]buffy/extern/googletest/googletest/src/gtest.cc |
testing::internal::InDeathTestChild() | bool InDeathTestChild() {
# if GTEST_OS_WINDOWS || GTEST_OS_FUCHSIA
// On Windows and Fuchsia, death tests are thread-safe regardless of the value
// of the death_test_style flag.
return !GTEST_FLAG(internal_run_death_test).empty();
# else
if (GTEST_FLAG(death_test_style) == "threadsafe")
return !GTEST_FLAG(internal_run_death_test).empty();
else
return g_in_fast_death_test_child;
#endif
} | pushq %rax
leaq 0x40f8e(%rip), %rdi # 0x8a960
leaq 0x1eee4(%rip), %rsi # 0x688bd
callq 0x328de
xorl %ecx, %ecx
cmpq $0x0, 0x40f60(%rip) # 0x8a948
setne %cl
testl %eax, %eax
movzbl 0x40f8d(%rip), %eax # 0x8a981
cmovel %ecx, %eax
andb $0x1, %al
popq %rcx
retq
nop
| /ckerr[P]buffy/extern/googletest/googletest/src/gtest-death-test.cc |
testing::internal::DeathTestAbort(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | static void DeathTestAbort(const std::string& message) {
// On a POSIX system, this function may be called from a threadsafe-style
// death test child process, which operates on a very small stack. Use
// the heap for any additional non-minuscule memory requirements.
const InternalRunDeathTestFlag* const flag =
GetUnitTestImpl()->internal_run_death_test_flag();
if (flag != nullptr) {
FILE* parent = posix::FDOpen(flag->write_fd(), "w");
fputc(kDeathTestInternalError, parent);
fprintf(parent, "%s", message.c_str());
fflush(parent);
_exit(1);
} else {
fprintf(stderr, "%s", message.c_str());
fflush(stderr);
posix::Abort();
}
} | pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3435e
movq 0x40e2a(%rip), %rax # 0x8a930
movq 0x238(%rax), %rax
testq %rax, %rax
jne 0x49b31
movq 0x404af(%rip), %r14 # 0x89fc8
movq (%r14), %rsi
movq (%rbx), %rdi
callq 0x10540
movq (%r14), %rdi
callq 0x105a0
callq 0x556f1
movl 0x28(%rax), %edi
leaq 0x1ec44(%rip), %rsi # 0x6877f
callq 0x5ad1c
movq %rax, %r14
movl $0x49, %edi
movq %rax, %rsi
callq 0x10620
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x10540
movq %r14, %rdi
callq 0x105a0
movl $0x1, %edi
callq 0x10840
nop
| /ckerr[P]buffy/extern/googletest/googletest/src/gtest-death-test.cc |
testing::internal::DeathTestImpl::ReadAndInterpretStatusByte() | void DeathTestImpl::ReadAndInterpretStatusByte() {
char flag;
int bytes_read;
// The read() here blocks until data is available (signifying the
// failure of the death test) or until the pipe is closed (signifying
// its success), so it's okay to call this in the parent before
// the child process has exited.
do {
bytes_read = posix::Read(read_fd(), &flag, 1);
} while (bytes_read == -1 && errno == EINTR);
if (bytes_read == 0) {
set_outcome(DIED);
} else if (bytes_read == 1) {
switch (flag) {
case kDeathTestReturned:
set_outcome(RETURNED);
break;
case kDeathTestThrew:
set_outcome(THREW);
break;
case kDeathTestLived:
set_outcome(LIVED);
break;
case kDeathTestInternalError:
FailFromInternalError(read_fd()); // Does not return.
break;
default:
GTEST_LOG_(FATAL) << "Death test child process reported "
<< "unexpected status byte ("
<< static_cast<unsigned int>(flag) << ")";
}
} else {
GTEST_LOG_(FATAL) << "Read from death test child process failed: "
<< GetLastErrnoDescription();
}
GTEST_DEATH_TEST_CHECK_SYSCALL_(posix::Close(read_fd()));
set_read_fd(-1);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp # imm = 0x1F8
movq %rdi, %rbx
leaq 0x7(%rsp), %r14
movl 0x34(%rbx), %edi
movl $0x1, %edx
movq %r14, %rsi
callq 0x10730
movq %rax, %r15
cmpl $-0x1, %r15d
jne 0x49c8d
callq 0x10060
cmpl $0x4, (%rax)
je 0x49c59
leaq 0x34(%rbx), %r13
testl %r15d, %r15d
je 0x49cd0
cmpl $0x1, %r15d
je 0x49c9c
jmp 0x49ce3
testl %r15d, %r15d
je 0x49ccc
cmpl $0x1, %r15d
jne 0x49cdc
leaq 0x34(%rbx), %r13
movzbl 0x7(%rsp), %r14d
cmpl $0x51, %r14d
jg 0x49e02
cmpl $0x49, %r14d
je 0x49ea4
cmpl $0x4c, %r14d
jne 0x49e1e
movl $0x2, 0x30(%rbx)
jmp 0x49d6a
leaq 0x34(%rbx), %r13
movl $0x1, 0x30(%rbx)
jmp 0x49d6a
addq $0x34, %rbx
movq %rbx, %r13
leaq 0x1ec1c(%rip), %rdx # 0x68906
leaq 0x8(%rsp), %rdi
movl $0x3, %esi
movl $0x1f0, %ecx # imm = 0x1F0
callq 0x515a8
movq 0x402e3(%rip), %rdi # 0x89fe8
leaq 0x1ecb2(%rip), %rsi # 0x689be
movl $0x2b, %edx
callq 0x10560
leaq 0xf0(%rsp), %rdi
callq 0x49a3b
movq 0xf0(%rsp), %rsi
movq 0xf8(%rsp), %rdx
movq 0x402ae(%rip), %rdi # 0x89fe8
callq 0x10560
leaq 0x100(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x49d60
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x10490
leaq 0x8(%rsp), %rdi
callq 0x516ea
movl (%r13), %edi
callq 0x10970
cmpl $-0x1, %eax
jne 0x49de8
callq 0x10060
cmpl $0x4, (%rax)
je 0x49d6a
leaq 0xe0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1ec55(%rip), %rsi # 0x689ea
leaq 0x1ec61(%rip), %rdx # 0x689fd
leaq 0xd0(%rsp), %rdi
callq 0x2e262
leaq 0x1eb56(%rip), %rsi # 0x68906
leaq 0xd0(%rsp), %rdi
callq 0x2e96e
leaq 0xc0(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x4a036
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x4a049
movl $0xffffffff, (%r13) # imm = 0xFFFFFFFF
addq $0x1f8, %rsp # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x54, %r14d
je 0x49fb0
cmpl $0x52, %r14d
jne 0x49e1e
movl $0x3, 0x30(%rbx)
jmp 0x49d6a
leaq 0x1eae1(%rip), %rdx # 0x68906
leaq 0xf0(%rsp), %rdi
movl $0x3, %esi
movl $0x1eb, %ecx # imm = 0x1EB
callq 0x515a8
movq 0x401a5(%rip), %rdi # 0x89fe8
leaq 0x1eb38(%rip), %rsi # 0x68982
movl $0x22, %edx
callq 0x10560
movq 0x4018d(%rip), %rdi # 0x89fe8
leaq 0x1eb43(%rip), %rsi # 0x689a5
movl $0x18, %edx
callq 0x10560
movsbq %r14b, %rax
movl %eax, %esi
movq 0x4016f(%rip), %rdi # 0x89fe8
callq 0x102e0
leaq 0x17bc4(%rip), %rsi # 0x61a49
movl $0x1, %edx
movq %rax, %rdi
callq 0x10560
leaq 0xf0(%rsp), %rdi
callq 0x516ea
jmp 0x49d6a
movl (%r13), %ebp
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
callq 0x37e78
movq (%rbx), %rbx
leaq 0x10(%rbx), %r14
leaq 0xf0(%rsp), %r15
movl $0xff, %edx
movl %ebp, %edi
movq %r15, %rsi
callq 0x10730
movq %rax, %r12
testl %r12d, %r12d
jle 0x49f06
andl $0x7fffffff, %r12d # imm = 0x7FFFFFFF
movb $0x0, 0xf0(%rsp,%r12)
movq %r15, %rdi
callq 0x101b0
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x10560
jmp 0x49ec7
cmpl $-0x1, %r12d
jne 0x49f16
callq 0x10060
cmpl $0x4, (%rax)
je 0x49ec7
testl %r12d, %r12d
je 0x49fbc
callq 0x10060
movl (%rax), %ebp
leaq 0x1e9d9(%rip), %rdx # 0x68906
leaq 0x28(%rsp), %rdi
movl $0x3, %esi
movl $0x16b, %ecx # imm = 0x16B
callq 0x515a8
movq 0x400a0(%rip), %rdi # 0x89fe8
leaq 0x1f670(%rip), %rsi # 0x695bf
movl $0x29, %edx
callq 0x10560
leaq 0x8(%rsp), %rdi
callq 0x49a3b
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x40074(%rip), %rdi # 0x89fe8
callq 0x10560
movq %rax, %r14
leaq 0x1fc20(%rip), %rsi # 0x69ba3
movl $0x2, %edx
movq %rax, %rdi
callq 0x10560
movq %r14, %rdi
movl %ebp, %esi
callq 0x10880
leaq 0x1ee1a(%rip), %rsi # 0x68dbb
movl $0x1, %edx
movq %rax, %rdi
callq 0x10560
jmp 0x49ffa
movl $0x4, 0x30(%rbx)
jmp 0x49d6a
leaq 0x1e943(%rip), %rdx # 0x68906
leaq 0x28(%rsp), %rdi
movl $0x3, %esi
movl $0x168, %ecx # imm = 0x168
callq 0x515a8
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x380ed
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x3fff3(%rip), %rdi # 0x89fe8
callq 0x10560
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4a015
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x10490
leaq 0x28(%rsp), %rdi
callq 0x516ea
testq %rbx, %rbx
je 0x49d6a
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
jmp 0x49d6a
movq %rdx, 0xb0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xc0(%rsp)
movq 0x8(%rax), %rdx
leaq 0xb0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1e98f(%rip), %rsi # 0x689fe
callq 0x2e96e
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x4a097
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x4a0a4
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x8c(%rsp), %rsi
movl $0x1f3, (%rsi) # imm = 0x1F3
leaq 0x68(%rsp), %rdi
callq 0x56350
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %r8
movq 0x70(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r12, %rcx
je 0x4a0f6
movq 0x58(%rsp), %rsi
leaq 0x78(%rsp), %r13
cmpq %rsi, %rax
jbe 0x4a116
movl $0xf, %esi
cmpq %r13, 0x68(%rsp)
je 0x4a111
movq 0x78(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x4a127
movq 0x68(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x2e9b4
jmp 0x4a135
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2ebfa
leaq 0x38(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
jne 0x4a152
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
jmp 0x4a15f
movq %rsi, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1e31d(%rip), %rsi # 0x684a0
leaq 0x28(%rsp), %rdi
callq 0x2e96e
leaq 0xa0(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x4a1b1
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x4a1c4
movq %rdx, 0x90(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa0(%rsp)
movq 0x8(%rax), %rdx
leaq 0x90(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1e81c(%rip), %rsi # 0x68a06
callq 0x2e96e
leaq 0x18(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x4a214
movups (%rcx), %xmm0
leaq 0x18(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x4a221
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1e9d7(%rip), %rsi # 0x68c1b
callq 0x2e96e
leaq 0x100(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x4a274
movups (%rcx), %xmm0
leaq 0x100(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x4a287
movq %rdx, 0xf0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x100(%rsp)
movq 0x8(%rax), %rdx
leaq 0xf0(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x49af3
jmp 0x4a30b
jmp 0x4a2b6
jmp 0x4a3f9
jmp 0x4a2b6
movq %rax, %r14
jmp 0x4a329
jmp 0x4a3f9
movq %rax, %r14
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x4a2ed
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x10490
jmp 0x4a2ed
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4a33b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x10490
jmp 0x4a33b
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4a329
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x10490
leaq 0x28(%rsp), %rdi
callq 0x516ea
jmp 0x4a3fc
movq %rax, %r14
movq 0x90(%rsp), %rdi
cmpq %rbp, %rdi
je 0x4a3a4
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x10490
jmp 0x4a3a4
movq %rax, %r14
leaq 0xf0(%rsp), %rdi
jmp 0x4a397
movq %rax, %r14
leaq 0x100(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4a392
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x10490
jmp 0x4a392
jmp 0x4a38f
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x516ea
jmp 0x4a453
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4a3c4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x10490
jmp 0x4a3c4
movq %rax, %r14
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x4a3e0
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x10490
jmp 0x4a3e0
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x4a40f
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x10490
jmp 0x4a40f
movq %rax, %r14
testq %rbx, %rbx
je 0x4a453
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
jmp 0x4a453
movq %rax, %r14
movq 0xb0(%rsp), %rdi
cmpq %r15, %rdi
je 0x4a431
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x10490
jmp 0x4a431
movq %rax, %r14
movq 0xd0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4a453
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x10490
jmp 0x4a453
movq %rax, %r14
movq %r14, %rdi
callq 0x108a0
nop
| /ckerr[P]buffy/extern/googletest/googletest/src/gtest-death-test.cc |
testing::internal::DeathTestImpl::Passed(bool) | bool DeathTestImpl::Passed(bool status_ok) {
if (!spawned())
return false;
const std::string error_message = GetErrorLogs();
bool success = false;
Message buffer;
buffer << "Death test: " << statement() << "\n";
switch (outcome()) {
case LIVED:
buffer << " Result: failed to die.\n"
<< " Error msg:\n" << FormatDeathTestOutput(error_message);
break;
case THREW:
buffer << " Result: threw an exception.\n"
<< " Error msg:\n" << FormatDeathTestOutput(error_message);
break;
case RETURNED:
buffer << " Result: illegal return in test statement.\n"
<< " Error msg:\n" << FormatDeathTestOutput(error_message);
break;
case DIED:
if (status_ok) {
if (matcher_.Matches(error_message)) {
success = true;
} else {
std::ostringstream stream;
matcher_.DescribeTo(&stream);
buffer << " Result: died but not with expected error.\n"
<< " Expected: " << stream.str() << "\n"
<< "Actual msg:\n"
<< FormatDeathTestOutput(error_message);
}
} else {
buffer << " Result: died but not with expected exit code:\n"
<< " " << ExitSummary(status()) << "\n"
<< "Actual msg:\n" << FormatDeathTestOutput(error_message);
}
break;
case IN_PROGRESS:
default:
GTEST_LOG_(FATAL)
<< "DeathTest::Passed somehow called before conclusion of test";
}
DeathTest::set_last_death_test_message(buffer.GetString());
return success;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1e8, %rsp # imm = 0x1E8
cmpb $0x1, 0x28(%rdi)
jne 0x4a92d
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %rax
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq *0x30(%rax)
leaq 0x28(%rsp), %rdi
callq 0x37e78
movq 0x28(%rsp), %rbx
addq $0x10, %rbx
leaq 0x1e13c(%rip), %rsi # 0x68a46
movl $0xc, %edx
movq %rbx, %rdi
callq 0x10560
movq 0x8(%r14), %r15
testq %r15, %r15
je 0x4a934
movq %r15, %rdi
callq 0x101b0
movq %rax, %rdx
jmp 0x4a940
xorl %ebp, %ebp
jmp 0x4add5
movl $0x6, %edx
leaq 0x18cdb(%rip), %r15 # 0x6361b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x10560
leaq 0x1d7d4(%rip), %rsi # 0x68126
movl $0x1, %edx
movq %rbx, %rdi
callq 0x10560
movl 0x30(%r14), %eax
decl %eax
cmpl $0x3, %eax
ja 0x4aba6
leaq 0x1b9b3(%rip), %rcx # 0x66328
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testb %bpl, %bpl
je 0x4abe8
leaq 0x70(%rsp), %rdx
movq $0x0, 0x8(%rdx)
leaq 0x3f1a5(%rip), %rax # 0x89b40
movq %rax, (%rdx)
movq 0x18(%r14), %rdi
movq (%rdi), %rax
leaq 0x30(%rsp), %rsi
callq *0x20(%rax)
movb $0x1, %bpl
testb %al, %al
jne 0x4ad68
leaq 0x70(%rsp), %rdi
callq 0x106c0
movq 0x18(%r14), %rdi
movq (%rdi), %rax
leaq 0x70(%rsp), %rsi
callq *0x10(%rax)
leaq 0x1e0f4(%rip), %rsi # 0x68acc
movl $0x2e, %edx
movq %rbx, %rdi
callq 0x10560
leaq 0x1e10f(%rip), %rsi # 0x68afb
movl $0xc, %edx
movq %rbx, %rdi
callq 0x10560
leaq 0x78(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x10350
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x10560
leaq 0x1d705(%rip), %rsi # 0x68126
movl $0x1, %edx
movq %rbx, %rdi
callq 0x10560
leaq 0x1e0d3(%rip), %rsi # 0x68b08
movl $0xc, %edx
movq %rbx, %rdi
callq 0x10560
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4af2b
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq %rbx, %rdi
callq 0x10560
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4aa7e
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x10490
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4aa99
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x10490
movq 0x3f508(%rip), %rsi # 0x89fa8
leaq 0x70(%rsp), %rdi
callq 0x10240
leaq 0xe0(%rsp), %rdi
callq 0x10140
jmp 0x4ad66
leaq 0x1dfda(%rip), %rsi # 0x68a9d
movl $0x2e, %edx
movq %rbx, %rdi
callq 0x10560
leaq 0x1df98(%rip), %rsi # 0x68a6f
movl $0xc, %edx
movq %rbx, %rdi
callq 0x10560
leaq 0x70(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4af2b
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq %rbx, %rdi
callq 0x10560
jmp 0x4ad45
leaq 0x1df6b(%rip), %rsi # 0x68a7c
movl $0x20, %edx
movq %rbx, %rdi
callq 0x10560
leaq 0x1df4a(%rip), %rsi # 0x68a6f
movl $0xc, %edx
movq %rbx, %rdi
callq 0x10560
leaq 0x70(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4af2b
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq %rbx, %rdi
callq 0x10560
jmp 0x4ad45
leaq 0x1def4(%rip), %rsi # 0x68a53
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x10560
leaq 0x1defc(%rip), %rsi # 0x68a6f
movl $0xc, %edx
movq %rbx, %rdi
callq 0x10560
leaq 0x70(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4af2b
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq %rbx, %rdi
callq 0x10560
jmp 0x4ad45
leaq 0x1dd59(%rip), %rdx # 0x68906
leaq 0x70(%rsp), %rdi
movl $0x3, %esi
movl $0x265, %ecx # imm = 0x265
callq 0x515a8
movq 0x3f420(%rip), %rdi # 0x89fe8
leaq 0x1df86(%rip), %rsi # 0x68b55
movl $0x3a, %edx
callq 0x10560
leaq 0x70(%rsp), %rdi
callq 0x516ea
jmp 0x4ad66
leaq 0x1df26(%rip), %rsi # 0x68b15
movl $0x32, %edx
movq %rbx, %rdi
callq 0x10560
leaq 0x1df45(%rip), %rsi # 0x68b48
movl $0xc, %edx
movq %rbx, %rdi
callq 0x10560
movl 0x2c(%r14), %r14d
leaq 0x8(%rsp), %rdi
callq 0x37e78
movl %r14d, %ebp
andl $0x7f, %r14d
je 0x4ac66
movl %r14d, %eax
shll $0x18, %eax
addl $0x1000000, %eax # imm = 0x1000000
cmpl $0x2000000, %eax # imm = 0x2000000
jl 0x4ac90
movl %r14d, %r15d
movq 0x8(%rsp), %r14
addq $0x10, %r14
leaq 0x1e9c4(%rip), %rsi # 0x69610
movl $0x15, %edx
movq %r14, %rdi
callq 0x10560
movq %r14, %rdi
movl %r15d, %esi
callq 0x10880
jmp 0x4ac90
movq 0x8(%rsp), %r14
addq $0x10, %r14
leaq 0x1e981(%rip), %rsi # 0x695f7
movl $0x18, %edx
movq %r14, %rdi
callq 0x10560
movl %ebp, %eax
movzbl %ah, %esi
movq %r14, %rdi
callq 0x10880
testb %bpl, %bpl
jns 0x4acaf
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
leaq 0x1e981(%rip), %rsi # 0x69626
movl $0xe, %edx
callq 0x10560
movq 0x8(%rsp), %r14
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x380ed
testq %r14, %r14
je 0x4accf
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq %rbx, %rdi
callq 0x10560
leaq 0x1d43e(%rip), %rsi # 0x68126
movl $0x1, %edx
movq %rbx, %rdi
callq 0x10560
leaq 0x1de0c(%rip), %rsi # 0x68b08
movl $0xc, %edx
movq %rbx, %rdi
callq 0x10560
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4af2b
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x10560
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4ad45
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x10490
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4ad66
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x10490
xorl %ebp, %ebp
movq 0x28(%rsp), %rbx
leaq 0x70(%rsp), %rdi
movq %rbx, %rsi
callq 0x380ed
leaq 0x3fc07(%rip), %rdi # 0x8a988
leaq 0x70(%rsp), %rsi
callq 0x5b212
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4adac
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x10490
testq %rbx, %rbx
je 0x4adba
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4add5
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x10490
movl %ebp, %eax
addq $0x1e8, %rsp # imm = 0x1E8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4aea6
jmp 0x4aea6
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4ae49
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x10490
jmp 0x4ae49
jmp 0x4ae46
jmp 0x4ae66
jmp 0x4aeec
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4aec0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x10490
jmp 0x4aec0
jmp 0x4aebd
jmp 0x4aeec
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4ae69
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x10490
jmp 0x4ae69
movq %rax, %rbx
movq 0x3f138(%rip), %rsi # 0x89fa8
leaq 0x70(%rsp), %rdi
callq 0x10240
leaq 0xe0(%rsp), %rdi
callq 0x10140
jmp 0x4aeef
jmp 0x4aebd
jmp 0x4aebd
jmp 0x4aebd
jmp 0x4aeec
jmp 0x4aeec
jmp 0x4aeec
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x516ea
jmp 0x4aeef
jmp 0x4aeec
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x4aeef
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x4aeef
jmp 0x4aebd
movq %rax, %rbx
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4aeef
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x10490
jmp 0x4aeef
jmp 0x4aeec
movq %rax, %rbx
jmp 0x4af08
jmp 0x4aeec
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x4aeff
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x28(%rsp)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4af23
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x10490
movq %rbx, %rdi
callq 0x108a0
| /ckerr[P]buffy/extern/googletest/googletest/src/gtest-death-test.cc |
bfy_buffer_remove_ntoh_u64 | uint64_t
bfy_buffer_remove_ntoh_u64(struct bfy_buffer* buf) {
uint64_t val = 0;
size_t const len = bfy_buffer_remove(buf, sizeof(val), &val);
if (len == sizeof(val)) {
val = ntoh64(val);
} else {
errno = ENOMSG;
}
return val;
} | pushq %rax
movq %rsp, %rcx
movq $0x0, (%rcx)
movl $0x8, %edx
xorl %esi, %esi
callq 0x5f552
cmpq $0x8, %rax
jne 0x5f987
movq (%rsp), %rax
bswapq %rax
movq %rax, (%rsp)
jmp 0x5f992
callq 0x10060
movl $0x2a, (%rax)
movq (%rsp), %rax
popq %rcx
retq
| /ckerr[P]buffy/src/buffer.c |
bfy_buffer_make_contiguous | void*
bfy_buffer_make_contiguous(bfy_buffer* buf, size_t wanted) {
struct bfy_pos const pos = buffer_get_pos(buf, wanted);
// if the first page already holds wanted, then we're done
if ((pos.page_idx == 0) || (pos.page_idx == 1 && pos.page_pos == 0)) {
return buffer_read_begin(buf);
}
bfy_buffer_mute_change_events(buf);
// if we have enough space, use it
struct bfy_iovec space = bfy_buffer_peek_space(buf);
if (space.iov_len >= pos.content_pos) {
size_t const n_copied = buffer_copyout(buf, buffer_get_pos(buf, 0), pos, space.iov_base);
bfy_buffer_commit_space(buf, n_copied);
bfy_buffer_drain(buf, n_copied);
} else {
// make some new free space, use it, and prepend it
int8_t* data = allocator.malloc(pos.content_pos);
size_t const n_moved = buffer_remove(buf, buffer_get_pos(buf, 0), pos, data);
struct bfy_page const newpage = {
.data = data,
.size = n_moved,
.write_pos = n_moved
};
buffer_prepend_pages(buf, &newpage, 1);
}
bfy_buffer_unmute_change_events(buf);
return buffer_read_begin(buf);
} | pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rsi, %rdx
movq %rdi, %rbx
leaq 0x38(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5e59a
movq (%r14), %rax
testq %rax, %rax
je 0x5fb32
cmpq $0x1, %rax
jne 0x5f9dc
cmpq $0x0, 0x40(%rsp)
je 0x5fb32
incl 0x84(%rbx)
movq 0x38(%rbx), %rcx
movq %rbx, %rax
testq %rcx, %rcx
je 0x5f9fa
imulq $0x38, 0x40(%rbx), %rax
addq %rcx, %rax
addq $-0x38, %rax
movq 0x8(%rax), %rcx
movq 0x18(%rax), %rsi
subq %rsi, %rcx
movq 0x48(%rsp), %rdi
cmpq %rdi, %rcx
jae 0x5fac4
callq *0x2aad7(%rip) # 0x8a4f0
movq %rax, %r15
xorl %r13d, %r13d
leaq 0x70(%rsp), %r14
movq %r13, 0x10(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movq 0x48(%rsp), %rax
movq %rax, 0x28(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movaps (%r14), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5f43b
movq %rax, %r12
movq 0x48(%rsp), %rax
movq %rax, 0x28(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movaps (%r14), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5f020
movq %r15, (%r14)
movq %r12, 0x8(%r14)
movq %r13, 0x10(%r14)
movq %r12, 0x18(%r14)
movl $0x0, 0x20(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movl $0x1, %ecx
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x5ffa0
jmp 0x5fb22
addq (%rax), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x28(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x50(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x5f43b
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5ea31
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x5efae
decl 0x84(%rbx)
jne 0x5fb32
movq %rbx, %rdi
callq 0x5e4d4
movq 0x38(%rbx), %rcx
testq %rcx, %rcx
cmoveq %rbx, %rcx
movq (%rcx), %rax
addq 0x10(%rcx), %rax
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| /ckerr[P]buffy/src/buffer.c |
buffer_insert_pages | static int
buffer_insert_pages(bfy_buffer* buf, size_t pos,
struct bfy_page const* new_pages,
size_t new_len) {
if (new_len == 0 || new_pages == NULL) {
return 0;
}
// if we have nothing, use buf->page
if (new_len == 1 && buf->pages == NULL && buf->page.data == NULL) {
buf->page = *new_pages;
buffer_record_content_added(buf, page_get_content_len(new_pages));
return 0;
}
// ensure we have enough space in buf->pages
size_t n_pages_alloc = buffer_count_pages(buf) + new_len;
size_t const pagesize = sizeof(struct bfy_page);
if (n_pages_alloc > buf->n_pages_alloc) {
n_pages_alloc = pick_capacity(16, n_pages_alloc);
void* pages = allocator.realloc(buf->pages, pagesize * n_pages_alloc);
if (pages != NULL) {
buf->pages = pages;
buf->n_pages_alloc = n_pages_alloc;
}
}
if (buf->pages == NULL) {
return -1;
}
// if we had 1 page and are inserting more, handle the special case
// of moving the single buf->page into the multipage array
if (buf->n_pages == 0 && buf->page.data != NULL) {
buf->n_pages = 1;
*buf->pages = buf->page;
buf->page = InitPage;
}
// insert new_pages into buf->pages
pos = size_t_min(pos, buf->n_pages);
if (buf->n_pages > pos) {
memmove(buf->pages + pos + new_len, buf->pages + pos, pagesize * (buf->n_pages - pos));
}
memcpy(buf->pages + pos, new_pages, pagesize * new_len);
buf->n_pages += new_len;
// record the new content
size_t new_content_len = 0;
for (size_t i = 0; i < new_len; ++i) {
new_content_len += page_get_content_len(new_pages + i);
}
buffer_record_content_added(buf, new_content_len);
return 0;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
testq %rcx, %rcx
sete %al
testq %rdx, %rdx
sete %cl
xorl %r13d, %r13d
orb %al, %cl
jne 0x6014c
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
cmpq $0x1, %r15
jne 0x5ffe5
cmpq $0x0, 0x38(%rbx)
jne 0x5ffe5
cmpq $0x0, (%rbx)
je 0x6010a
leaq 0x38(%rbx), %r13
movq 0x38(%rbx), %rdi
movq %rbx, %rax
movq %r13, %rcx
testq %rdi, %rdi
je 0x60003
imulq $0x38, 0x40(%rbx), %rcx
addq %rdi, %rcx
movq %rdi, %rax
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $0x6db6db6db6db6db7, %rax # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
addq %r15, %rax
cmpq 0x48(%rbx), %rax
jbe 0x60048
movl $0x10, %ecx
movq %rcx, %rbp
addq %rcx, %rcx
cmpq %rax, %rbp
jb 0x60026
imulq $0x38, %rbp, %rsi
callq *0x2a4cd(%rip) # 0x8a508
testq %rax, %rax
je 0x60048
movq %rax, 0x38(%rbx)
movq %rbp, 0x48(%rbx)
movq (%r13), %rax
testq %rax, %rax
je 0x600fe
cmpq $0x0, 0x40(%rbx)
jne 0x6009e
cmpq $0x0, (%rbx)
je 0x6009e
movq $0x1, 0x40(%rbx)
movq 0x30(%rbx), %rcx
movq %rcx, 0x30(%rax)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movq $0x0, 0x30(%rbx)
movq 0x40(%rbx), %rax
cmpq %rax, %r12
cmovaeq %rax, %r12
jae 0x600c6
imulq $0x38, %r12, %rsi
addq (%r13), %rsi
imulq $0x38, %r15, %rdi
addq %rsi, %rdi
subq %r12, %rax
imulq $0x38, %rax, %rdx
callq 0x10830
imulq $0x38, %r12, %rdi
addq 0x38(%rbx), %rdi
imulq $0x38, %r15, %rdx
movq %r14, %rsi
callq 0x103b0
addq %r15, 0x40(%rbx)
xorl %r13d, %r13d
testq %r15, %r15
je 0x60106
addq $0x18, %r14
xorl %eax, %eax
addq (%r14), %rax
subq -0x8(%r14), %rax
addq $0x38, %r14
decq %r15
jne 0x600ec
jmp 0x60133
movl $0xffffffff, %r13d # imm = 0xFFFFFFFF
jmp 0x6014c
xorl %eax, %eax
jmp 0x60133
movq 0x30(%r14), %rax
movq %rax, 0x30(%rbx)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq 0x18(%r14), %rax
subq 0x10(%r14), %rax
addq %rax, 0x50(%rbx)
cmpl $0x0, 0x84(%rbx)
jne 0x6014c
addq %rax, 0x70(%rbx)
movq %rbx, %rdi
callq 0x5e4d4
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /ckerr[P]buffy/src/buffer.c |
page_release | static void
page_release(struct bfy_page* page) {
if (page->unref_cb != NULL) {
page->unref_cb(page->data, page->size, page->unref_arg);
}
if (page_can_realloc(page)) {
page_realloc(page, 0);
}
*page = InitPage;
} | pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x60178
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movq 0x30(%rbx), %rdx
callq *%rax
testb $0x3, 0x20(%rbx)
jne 0x60188
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5ff0d
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq $0x0, 0x30(%rbx)
popq %rbx
retq
| /ckerr[P]buffy/src/buffer.c |
iter_advance_n_bytes | static bool
iter_advance_n_bytes(struct bfy_iter* const iter, size_t n) {
while (iter->io.iov_len < n) { // make sure we're on the right page
n -= iter->io.iov_len;
if (!iter_next_page(iter)) {
return false;
}
}
iter->io = iov_drain(iter->io, n);
iter->cur.page_pos += n;
iter->cur.content_pos += n;
return true;
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %r14, %r15
movq 0x28(%rbx), %r12
movq %r12, %rax
subq %r14, %rax
jae 0x601d1
movq %r15, %r14
subq %r12, %r14
movq %rbx, %rdi
callq 0x5e7c0
testb %al, %al
jne 0x601ae
jmp 0x601e1
addq %r15, 0x20(%rbx)
movq %rax, 0x28(%rbx)
addq %r15, 0x10(%rbx)
addq %r15, 0x18(%rbx)
cmpq %r15, %r12
setae %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| /ckerr[P]buffy/src/buffer.c |
linkedList<transaction*>::operator=(linkedList<transaction*>&) | linkedList<T> & linkedList<T>::operator=( linkedList<T> &rhs)
{
// linkedList *tmp = new linkedList;
this->clear(); // the function at the start of this review
// if (rhs.isEmpty()) {
// // short cut, since the other list is empty
// linkedList<T> tmp = new linkedList<T>();
// this = tmp;
// return *this;
// }
for ( auto item : rhs) {
this->insert_last(item);
}
this->size = rhs.size; //peritto
return *this;
} | pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4b44
movq 0x8(%rbx), %rbx
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x3c7e
jmp 0x6017
| /DimitrisGan[P]transactionBitCoinSystem/mylinkedList.h |
pipeline_2P_SP(unsigned long, unsigned int) | void pipeline_2P_SP(size_t L, unsigned w) {
tf::Executor executor(w);
const size_t maxN = 100;
std::vector<int> source(maxN);
std::iota(source.begin(), source.end(), 0);
std::vector<std::array<int, 2>> mybuffer(L);
for(size_t N = 0; N <= maxN; N++) {
tf::Taskflow taskflow;
size_t j1 = 0;
std::atomic<size_t> j2 = 0;
std::mutex mutex;
std::vector<int> collection;
size_t cnt = 1;
tf::Pipeline pl(L,
tf::Pipe{tf::PipeType::SERIAL, [N, &source, &j1, &mybuffer, L](auto& pf) mutable {
if(j1 == N) {
pf.stop();
return;
}
REQUIRE(j1 == source[j1]);
REQUIRE(pf.token() % L == pf.line());
//*(pf.output()) = source[j1] + 1;
mybuffer[pf.line()][pf.pipe()] = source[j1] + 1;
j1++;
}},
tf::Pipe{tf::PipeType::PARALLEL,
[N, &collection, &mutex, &j2, &mybuffer, L](auto& pf) mutable {
REQUIRE(j2++ < N);
{
std::scoped_lock<std::mutex> lock(mutex);
REQUIRE(pf.token() % L == pf.line());
collection.push_back(mybuffer[pf.line()][pf.pipe() - 1]);
}
}}
);
auto pipeline = taskflow.composed_of(pl).name("module_of_pipeline");
auto test = taskflow.emplace([&](){
REQUIRE(j1 == N);
REQUIRE(j2 == N);
std::sort(collection.begin(), collection.end());
for(size_t i = 0; i < N; i++) {
REQUIRE(collection[i] == i + 1);
}
REQUIRE(pl.num_tokens() == cnt * N);
}).name("test");
pipeline.precede(test);
executor.run_n(taskflow, 3, [&]() mutable {
j1 = j2 = 0;
collection.clear();
for(size_t i = 0; i < mybuffer.size(); ++i){
for(size_t j = 0; j < mybuffer[0].size(); ++j){
mybuffer[i][j] = 0;
}
}
cnt++;
}).get();
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x508, %rsp # imm = 0x508
movq %rdi, %rbx
movl %esi, %esi
pxor %xmm0, %xmm0
leaq 0x2c0(%rsp), %rdx
movdqa %xmm0, (%rdx)
leaq 0x3d0(%rsp), %rdi
callq 0x569ca
movq 0x2c8(%rsp), %rdi
testq %rdi, %rdi
je 0x1e166
callq 0x5ac28
movq %rbx, 0x48(%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0xc0(%rsp)
movq $0x0, 0xd0(%rsp)
movl $0x190, %edi # imm = 0x190
callq 0x74a0
movq %rax, %rbx
movq %rax, 0xc0(%rsp)
movq %rax, 0xc8(%rsp)
movq %rax, %r15
addq $0x190, %r15 # imm = 0x190
movq %r15, 0xd0(%rsp)
xorl %r14d, %r14d
movl $0x190, %edx # imm = 0x190
movq %rax, %rdi
xorl %esi, %esi
callq 0x7250
movq %r15, 0xc8(%rsp)
movdqa 0x4c20b(%rip), %xmm0 # 0x6a3e0
movdqa 0x4c213(%rip), %xmm1 # 0x6a3f0
movdqu %xmm0, (%rbx,%r14,4)
addq $0x4, %r14
paddd %xmm1, %xmm0
cmpq $0x64, %r14
jne 0x1e1dd
leaq 0xe8(%rsp), %rdi
leaq 0x120(%rsp), %rbx
movq 0x48(%rsp), %r15
movq %r15, %rsi
movq %rbx, %rdx
callq 0x56fce
leaq 0x88(%rsp), %rax
movq $0x0, (%rax)
movl $0x90, %ecx
leaq (%rbx,%rcx), %rax
movq %rax, 0x108(%rsp)
movq %r15, %rax
shlq $0x4, %rax
movq %rax, 0xe0(%rsp)
leaq 0x1c8(%rsp), %r13
leaq 0x1(%r15), %rax
movq %rax, 0x100(%rsp)
leaq 0x3d0(%rsp), %rax
addq %rax, %rcx
movq %rcx, 0xb0(%rsp)
leaq 0x38(%rsp), %r12
xorl %r14d, %r14d
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
leaq 0x328(%rsp), %rcx
movq %rcx, 0x2d8(%rsp)
leaq 0x2e0(%rsp), %rax
movq %r14, 0x20(%rax)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x10(%rax)
movdqu %xmm0, (%rax)
leaq 0x318(%rsp), %rax
movq %rax, 0x308(%rsp)
movq %r14, 0x310(%rsp)
movb $0x0, 0x318(%rsp)
movq %r14, 0x60(%rcx)
movdqu %xmm0, 0x50(%rcx)
movdqu %xmm0, 0x40(%rcx)
movdqu %xmm0, 0x30(%rcx)
movdqu %xmm0, 0x20(%rcx)
movdqu %xmm0, 0x10(%rcx)
movdqu %xmm0, (%rcx)
leaq 0x340(%rsp), %rdi
xorl %esi, %esi
callq 0x6090a
movq %r15, %rax
shrq $0x3b, %rax
movb $0x0, 0x398(%rsp)
movq %r14, 0x80(%rsp)
movq %r14, 0x78(%rsp)
movq %r14, 0x3c0(%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x3b0(%rsp)
movdqa %xmm0, 0x3a0(%rsp)
movq %r14, 0xa0(%rsp)
movdqa %xmm0, 0x90(%rsp)
movq $0x1, 0xb8(%rsp)
movq 0x88(%rsp), %rax
movdqa %xmm0, 0x120(%rsp)
movq %r14, 0x130(%rsp)
movl $0x1, 0x140(%rsp)
movq %rax, 0x148(%rsp)
leaq 0x90(%rsp), %rcx
movq %rcx, 0x150(%rsp)
leaq 0x3a0(%rsp), %rcx
movq %rcx, 0x158(%rsp)
leaq 0x78(%rsp), %rcx
movq %rcx, 0x160(%rsp)
leaq 0xe8(%rsp), %rcx
movq %rcx, 0x168(%rsp)
movq %r15, 0x170(%rsp)
movl $0x2, 0x178(%rsp)
movq %rax, 0x180(%rsp)
leaq 0xc0(%rsp), %rax
movq %rax, 0x188(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, 0x190(%rsp)
movq %rcx, 0x198(%rsp)
movq %r15, 0x1a0(%rsp)
movabsq $0x100000002, %rax # imm = 0x100000002
movq %rax, 0x1a8(%rsp)
jne 0x1f1f1
movq 0x108(%rsp), %rax
movdqu %xmm0, (%rax)
movq $0x0, 0x10(%rax)
testq %r15, %r15
je 0x1e440
movq 0xe0(%rsp), %rbx
movq %rbx, %rdi
callq 0x74a0
jmp 0x1e44a
xorl %eax, %eax
movq 0xe0(%rsp), %rbx
leaq (%rax,%rbx), %r15
movq %rax, 0x1b0(%rsp)
movq %rax, 0x1b8(%rsp)
movq %r15, 0x1c0(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x1e47d
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x7250
jmp 0x1e480
movq %rax, %r15
movq %r15, 0x1b8(%rsp)
movq %r13, %rdi
movq 0x100(%rsp), %rsi
movq %rsp, %rbx
movq %rbx, %rdx
callq 0x63cbc
leaq 0x1e0(%rsp), %rdi
movq 0x48(%rsp), %r15
movq %r15, %rsi
movq %rbx, %rdx
callq 0x63d30
leaq 0x1f8(%rsp), %rdi
pxor %xmm0, %xmm0
movdqu %xmm0, 0x40(%rdi)
movdqu %xmm0, 0x30(%rdi)
movdqu %xmm0, 0x20(%rdi)
movdqu %xmm0, 0x10(%rdi)
movdqu %xmm0, (%rdi)
xorl %esi, %esi
callq 0x640ee
leaq 0x278(%rsp), %rax
movq %rax, 0x248(%rsp)
movl $0x1, %ecx
movq %rcx, 0x250(%rsp)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x90(%r13)
movl $0x3f800000, %edx # imm = 0x3F800000
movl %edx, 0x268(%rsp)
movdqu %xmm0, 0xa8(%r13)
leaq 0x2b0(%rsp), %rax
movq %rax, 0x280(%rsp)
movq %rcx, 0x288(%rsp)
movdqu %xmm0, 0xc8(%r13)
movl %edx, 0x2a0(%rsp)
movdqu %xmm0, 0xe0(%r13)
movq $0x0, 0xf0(%r13)
testq %r15, %r15
jne 0x1e579
movl $0x22e, %esi # imm = 0x22E
leaq 0x50860(%rip), %rdi # 0x6edcd
leaq 0x508bf(%rip), %rdx # 0x6ee33
callq 0x63de2
cmpl $0x2, 0x178(%rsp)
je 0x1e59b
movl $0x232, %esi # imm = 0x232
leaq 0x5083e(%rip), %rdi # 0x6edcd
leaq 0x508b9(%rip), %rdx # 0x6ee4f
callq 0x63f47
movq $0x0, 0x138(%rsp)
movq 0x1e0(%rsp), %rax
cmpq %rax, 0x1e8(%rsp)
je 0x1e601
movl $0x28, %r15d
xorl %r13d, %r13d
leaq (%rax,%r15), %rdi
movq %r14, -0x20(%rax,%r15)
movq %r13, -0x28(%rax,%r15)
movq %r14, -0x8(%rax,%r15)
callq 0x60c4a
incq %r13
movq 0x1e0(%rsp), %rax
movq 0x1e8(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
imulq %rbp, %rcx
addq $0x60, %r15
cmpq %rcx, %r13
jb 0x1e5c2
leaq 0x248(%rsp), %rdi
callq 0x60cba
leaq 0x280(%rsp), %rdi
callq 0x60bb0
movq 0x1b0(%rsp), %rax
movq $0x0, (%rax)
movq 0x1e8(%rsp), %rax
subq 0x1e0(%rsp), %rax
sarq $0x5, %rax
imulq %rbp, %rax
cmpq $0x2, %rax
jb 0x1e68a
movl $0x1, %eax
movl $0x18, %ecx
movq 0x1b0(%rsp), %rdx
movslq 0x1ac(%rsp), %rsi
movq %rsi, (%rdx,%rcx)
incq %rax
movq 0x1e8(%rsp), %rdx
subq 0x1e0(%rsp), %rdx
sarq $0x5, %rdx
imulq %rbp, %rdx
addq $0x10, %rcx
cmpq %rdx, %rax
jb 0x1e652
movq 0x1b0(%rsp), %rax
movq $0x1, 0x8(%rax)
movq 0x1e8(%rsp), %rax
subq 0x1e0(%rsp), %rax
sarq $0x5, %rax
imulq %rbp, %rax
cmpq $0x2, %rax
leaq 0x120(%rsp), %r13
jb 0x1e705
movl $0x1, %eax
movl $0x10, %ecx
movq 0x1b0(%rsp), %rdx
movslq 0x1a8(%rsp), %rsi
decq %rsi
movq %rsi, (%rdx,%rcx)
incq %rax
movq 0x1e8(%rsp), %rdx
subq 0x1e0(%rsp), %rdx
sarq $0x5, %rdx
imulq %rbp, %rdx
addq $0x10, %rcx
cmpq %rdx, %rax
jb 0x1e6ca
movl $0xd8, %edi
callq 0x74a0
movq %r14, (%rax)
leaq 0x18(%rax), %rcx
movq %rcx, 0x8(%rax)
movq %r14, 0x10(%rax)
movb $0x0, 0x18(%rax)
leaq 0x60(%rax), %rcx
pxor %xmm0, %xmm0
movdqu %xmm0, 0x28(%rax)
movdqu %xmm0, 0x38(%rax)
movq %rcx, 0x48(%rax)
movq %rcx, 0x50(%rax)
movq %rax, %rcx
subq $-0x80, %rcx
movq %rcx, 0x58(%rax)
movdqu %xmm0, 0x80(%rax)
movdqu %xmm0, 0x90(%rax)
movq %r13, 0x88(%rax)
leaq 0x1b77b(%rip), %rcx # 0x39ee0
movq %rcx, 0xa0(%rax)
leaq 0x1b79d(%rip), %rcx # 0x39f10
movq %rcx, 0x98(%rax)
movb $0x4, 0xc0(%rax)
movdqu %xmm0, 0xc8(%rax)
movq %rax, (%rsp)
movq %r13, %rdi
movq %rsp, %rsi
callq 0x64266
movq (%rsp), %rsi
testq %rsi, %rsi
movq %rsp, %rbx
je 0x1e7ac
movq %rbx, %rdi
callq 0x5b5f2
movq 0x128(%rsp), %rax
movq -0x8(%rax), %r15
leaq 0x10(%rsp), %rbp
movq %rbp, (%rsp)
movl $0x646e6f63, 0x10(%rsp) # imm = 0x646E6F63
movq $0x4, 0x8(%rsp)
movb $0x0, 0x14(%rsp)
leaq 0x8(%r15), %rdi
movq %rbx, %rsi
callq 0x7240
movq 0x1c8(%rsp), %rax
movq %r15, (%rax)
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x1e804
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74c0
movq 0x1e8(%rsp), %rax
cmpq 0x1e0(%rsp), %rax
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
je 0x1ead0
xorl %r15d, %r15d
movl $0xd8, %edi
callq 0x74a0
movq %r14, (%rax)
leaq 0x18(%rax), %rcx
movq %rcx, 0x8(%rax)
movq %r14, 0x10(%rax)
movb $0x0, 0x18(%rax)
leaq 0x60(%rax), %rcx
pxor %xmm0, %xmm0
movdqu %xmm0, 0x28(%rax)
movdqu %xmm0, 0x38(%rax)
movq %rcx, 0x48(%rax)
movq %rcx, 0x50(%rax)
movq %rax, %rcx
subq $-0x80, %rcx
movq %rcx, 0x58(%rax)
movq %r14, 0x80(%rax)
movdqu %xmm0, 0x98(%rax)
movq %r13, 0x88(%rax)
movq %r15, 0x90(%rax)
leaq 0x1b6a9(%rip), %rcx # 0x39f36
movq %rcx, 0xa0(%rax)
leaq 0x1bb3f(%rip), %rcx # 0x3a3da
movq %rcx, 0x98(%rax)
movb $0x2, 0xc0(%rax)
movdqu %xmm0, 0xc8(%rax)
movq %rax, (%rsp)
movq %r13, %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x64266
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x1e8d4
movq %rbx, %rdi
callq 0x5b5f2
movq 0x128(%rsp), %rax
movq -0x8(%rax), %r13
movq %r12, 0x28(%rsp)
movb $0x2d, 0x2(%r12)
movw $0x7472, (%r12) # imm = 0x7472
movq $0x3, 0x30(%rsp)
movb $0x0, 0x3b(%rsp)
movl $0x1, %esi
cmpq $0xa, %r15
jb 0x1e95a
movl $0x4, %esi
movq %r15, %rcx
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
cmpq $0x63, %rcx
jbe 0x1e953
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0x1e958
cmpq $0x2710, %rcx # imm = 0x2710
jb 0x1e95a
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0x1e91d
addl $-0x3, %esi
jmp 0x1e95a
addl $-0x2, %esi
jmp 0x1e95a
decl %esi
movl %esi, %esi
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x50(%rsp), %rdi
xorl %edx, %edx
callq 0x7570
movq 0x50(%rsp), %rdi
movl 0x58(%rsp), %esi
movq %r15, %rdx
callq 0x5e789
movq 0x28(%rsp), %rcx
movl $0xf, %esi
cmpq %r12, %rcx
je 0x1e997
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %r8
movq 0x58(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
jbe 0x1e9c5
movl $0xf, %esi
leaq 0x60(%rsp), %rdi
cmpq %rdi, 0x50(%rsp)
je 0x1e9c0
movq 0x60(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x1e9d6
movq 0x50(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x7150
jmp 0x1e9e4
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7540
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x1ea07
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1ea0f
movdqu (%rcx), %xmm0
movdqu %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x8(%r13), %rdi
movq %rsp, %rsi
callq 0x7240
movq 0x1c8(%rsp), %rax
movq %r13, 0x8(%rax,%r15,8)
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1ea60
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74c0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
leaq 0x120(%rsp), %r13
je 0x1ea84
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74c0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ea9b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x74c0
incq %r15
movq 0x1c8(%rsp), %rdi
leaq (%rdi,%r15,8), %rsi
callq 0x56d42
movq 0x1e8(%rsp), %rax
subq 0x1e0(%rsp), %rax
sarq $0x5, %rax
imulq %rbp, %rax
cmpq %rax, %r15
jb 0x1e827
movq 0x2d8(%rsp), %r15
movl $0xd8, %edi
callq 0x74a0
movq %r14, (%rax)
leaq 0x18(%rax), %rcx
movq %rcx, 0x8(%rax)
movq %r14, 0x10(%rax)
movb $0x0, 0x18(%rax)
leaq 0x60(%rax), %rcx
pxor %xmm0, %xmm0
movdqu %xmm0, 0x28(%rax)
movdqu %xmm0, 0x38(%rax)
movq %rcx, 0x48(%rax)
movq %rcx, 0x50(%rax)
movq %rax, %rcx
subq $-0x80, %rcx
movq %rcx, 0x58(%rax)
movq %r14, 0x80(%rax)
movq %r13, 0x88(%rax)
movb $0x6, 0xc0(%rax)
movdqu %xmm0, 0xc8(%rax)
movq %rax, (%rsp)
movq %r15, %rdi
movq %rsp, %rsi
callq 0x64266
movq (%rsp), %rsi
testq %rsi, %rsi
leaq 0x10(%rsp), %r13
movq %rsp, %rbp
je 0x1eb5f
movq %rbp, %rdi
callq 0x5b5f2
movq 0x8(%r15), %rax
movq -0x8(%rax), %r15
movq %r13, (%rsp)
movq %rbp, %rdi
leaq 0x4c1fa(%rip), %rsi # 0x6ad6f
leaq 0x4c205(%rip), %rdx # 0x6ad81
callq 0x61a5a
leaq 0x8(%r15), %rdi
movq %rbp, %rsi
callq 0x7240
movq %r15, 0x118(%rsp)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x1ebab
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74c0
movq 0x2d8(%rsp), %r15
movl $0xd8, %edi
callq 0x74a0
movq %rax, %r13
movq %r14, (%rax)
addq $0x18, %rax
movq %rax, 0x8(%r13)
movq %r14, 0x10(%r13)
movb $0x0, 0x18(%r13)
leaq 0x60(%r13), %rax
pxor %xmm0, %xmm0
movdqu %xmm0, 0x28(%r13)
movdqu %xmm0, 0x38(%r13)
movq %rax, 0x48(%r13)
movq %rax, 0x50(%r13)
movq %r13, %rax
subq $-0x80, %rax
movq %rax, 0x58(%r13)
movdqu %xmm0, 0x80(%r13)
movdqu %xmm0, 0x90(%r13)
movq %r14, 0xa0(%r13)
movl $0x30, %edi
callq 0x74a0
leaq 0x80(%rsp), %rcx
movq %rcx, (%rax)
leaq 0x88(%rsp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x78(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x90(%rsp), %rcx
movq %rcx, 0x18(%rax)
leaq 0x120(%rsp), %rcx
movq %rcx, 0x20(%rax)
leaq 0xb8(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq %rax, 0x88(%r13)
leaq 0x1be60(%rip), %rax # 0x3aad0
movq %rax, 0xa0(%r13)
leaq 0x1c4aa(%rip), %rax # 0x3b128
movq %rax, 0x98(%r13)
movb $0x1, 0xc0(%r13)
pxor %xmm0, %xmm0
movdqu %xmm0, 0xc8(%r13)
movq %r13, (%rsp)
movq %r15, %rdi
movq %rsp, %rsi
callq 0x64266
movq (%rsp), %rsi
testq %rsi, %rsi
leaq 0x10(%rsp), %r13
movq %rsp, %rbp
je 0x1ecc2
movq %rbp, %rdi
callq 0x5b5f2
movq 0x8(%r15), %rax
movq -0x8(%rax), %r15
movq %r13, (%rsp)
movq %rbp, %rdi
leaq 0x4ec2f(%rip), %rsi # 0x6d907
leaq 0x4ec2c(%rip), %rdx # 0x6d90b
callq 0x61a5a
leaq 0x120(%rsp), %rbx
leaq 0x8(%r15), %rdi
movq %rbp, %rsi
callq 0x7240
movq %r15, 0x110(%rsp)
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
movabsq $-0x5555555555555555, %rbp # imm = 0xAAAAAAAAAAAAAAAB
je 0x1ed25
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74c0
leaq 0x118(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x56d42
movq 0xb0(%rsp), %r15
movq %r15, %rdi
callq 0x76f0
testl %eax, %eax
jne 0x1f1fd
incq 0x488(%rsp)
movq %r15, %rdi
callq 0x7370
movq 0x328(%rsp), %rax
cmpq 0x330(%rsp), %rax
je 0x1eec5
movq $0x0, 0x28(%rsp)
movl $0x88, %edi
callq 0x74a0
movq %rax, %r15
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r15)
leaq 0x68f25(%rip), %rax # 0x87cc8
movq %rax, (%r15)
leaq 0x2d8(%rsp), %rax
movq %rax, 0x10(%r15)
leaq 0x18(%r15), %r13
movq %r13, %rdi
callq 0x61132
pxor %xmm0, %xmm0
movdqu %xmm0, 0x30(%r15)
movdqu %xmm0, 0x40(%r15)
movq $0x2, 0x30(%r15)
leaq 0x1c3bf(%rip), %rax # 0x3b19c
movq %rax, 0x48(%r15)
leaq 0x1c3bc(%rip), %rax # 0x3b1a4
movq %rax, 0x40(%r15)
movdqu %xmm0, 0x50(%r15)
movdqu %xmm0, 0x60(%r15)
movl $0x28, %edi
callq 0x74a0
movq %r15, %rcx
addq $0x10, %rcx
leaq 0x80(%rsp), %rdx
movq %rdx, (%rax)
leaq 0x78(%rsp), %rdx
movq %rdx, 0x8(%rax)
leaq 0x90(%rsp), %rdx
movq %rdx, 0x10(%rax)
leaq 0xe8(%rsp), %rdx
movq %rdx, 0x18(%rax)
leaq 0xb8(%rsp), %rdx
movq %rdx, 0x20(%rax)
movq %rax, 0x50(%r15)
leaq 0x1c37e(%rip), %rax # 0x3b1ca
movq %rax, 0x68(%r15)
leaq 0x1c3cb(%rip), %rax # 0x3b222
movq %rax, 0x60(%r15)
movq %r14, 0x70(%r15)
movl $0x0, 0x78(%r15)
movq %r14, 0x80(%r15)
movq %r15, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x6133a
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
testq %rcx, %rcx
movq 0x48(%rsp), %r15
leaq 0x120(%rsp), %rbx
leaq 0x1c8(%rsp), %r13
je 0x1efc4
movq 0x690ec(%rip), %rdx # 0x87fa0
cmpb $0x0, (%rdx)
je 0x1efc0
incl 0xc(%rcx)
jmp 0x1efc4
xorl %eax, %eax
xchgq %rax, 0x78(%rsp)
movq $0x0, 0x80(%rsp)
movq 0x90(%rsp), %rax
cmpq %rax, 0x98(%rsp)
je 0x1eef2
movq %rax, 0x98(%rsp)
movq 0xe8(%rsp), %rdi
movq 0xf0(%rsp), %rdx
subq %rdi, %rdx
leaq 0x28(%rsp), %r15
je 0x1ef23
sarq $0x3, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x7250
incq 0xb8(%rsp)
movq %r15, %rdi
callq 0x61132
leaq 0x28(%rsp), %rdi
callq 0x59e76
movq 0xb0(%rsp), %rdi
callq 0x76f0
testl %eax, %eax
movq 0x48(%rsp), %r15
jne 0x1f20b
decq 0x488(%rsp)
jne 0x1ef6e
leaq 0x430(%rsp), %rdi
callq 0x7800
movq 0xb0(%rsp), %rdi
callq 0x7370
leaq 0x50(%rsp), %rdi
leaq 0x28(%rsp), %r13
movq %r13, %rsi
callq 0x6133a
movdqa 0x50(%rsp), %xmm0
movdqa %xmm0, (%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x50(%rsp)
leaq 0x10(%rsp), %rax
movdqa %xmm0, (%rax)
movq %r13, %rdi
callq 0x611e2
leaq 0x1c8(%rsp), %r13
jmp 0x1f08e
lock
incl 0xc(%rcx)
movdqa 0x50(%rsp), %xmm0
movdqa %xmm0, (%rsp)
movq %rax, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
leaq 0x2e0(%rsp), %rdi
callq 0x76f0
testl %eax, %eax
jne 0x1f204
leaq 0x340(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x617dc
movq 0x388(%rsp), %rax
movq %rax, %rcx
subq 0x368(%rsp), %rcx
shrq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
shlq $0x5, %rcx
movq 0x370(%rsp), %rax
subq 0x378(%rsp), %rax
movq 0x360(%rsp), %rdx
sarq $0x4, %rax
subq 0x350(%rsp), %rdx
sarq $0x4, %rdx
addq %rax, %rdx
addq %rcx, %rdx
cmpq $0x1, %rdx
jne 0x1f072
movq %fs:-0x8, %rsi
movq 0x28(%rsp), %rdx
leaq 0x3d0(%rsp), %rdi
callq 0x59d36
leaq 0x2e0(%rsp), %rdi
callq 0x7370
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1f08e
callq 0x5ac28
movq %rsp, %rdi
callq 0x56dac
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1f0cc
movq 0x68ef9(%rip), %rax # 0x87fa0
cmpb $0x0, (%rax)
je 0x1f0b7
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x1f0c1
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x1f0cc
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1f0db
callq 0x5ac28
leaq 0x280(%rsp), %rdi
callq 0x60b8a
leaq 0x248(%rsp), %rdi
callq 0x60c94
leaq 0x1f8(%rsp), %rdi
callq 0x60d30
leaq 0x1e0(%rsp), %rdi
callq 0x60b48
movq 0x1c8(%rsp), %rdi
testq %rdi, %rdi
je 0x1f12c
movq 0x1d8(%rsp), %rsi
subq %rdi, %rsi
callq 0x74c0
movq 0x1b0(%rsp), %rdi
testq %rdi, %rdi
je 0x1f149
movq 0x1c0(%rsp), %rsi
subq %rdi, %rsi
callq 0x74c0
movq %rbx, %rdi
callq 0x5b872
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x1f16e
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x74c0
leaq 0x2d8(%rsp), %rdi
callq 0x56e40
movq 0x88(%rsp), %rax
incq %rax
movq %rax, 0x88(%rsp)
cmpq $0x65, %rax
jb 0x1e279
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x1f1b5
movq 0xf8(%rsp), %rsi
subq %rdi, %rsi
callq 0x74c0
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x1f1d2
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x74c0
leaq 0x3d0(%rsp), %rdi
callq 0x56e72
addq $0x508, %rsp # imm = 0x508
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4e15e(%rip), %rdi # 0x6d356
callq 0x7220
movl %eax, %edi
callq 0x72c0
movl %eax, %edi
callq 0x72c0
movl %eax, %edi
callq 0x72c0
movq %rax, %rbx
jmp 0x1f4e0
movq %rax, %rbx
jmp 0x1f4fd
movq %rax, %rbx
movq 0x2c8(%rsp), %rdi
testq %rdi, %rdi
je 0x1f50a
callq 0x5ac28
jmp 0x1f50a
jmp 0x1f244
jmp 0x1f244
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x611e2
jmp 0x1f31a
movq %rax, %rbx
jmp 0x1f266
movq %rax, %rbx
movq %r13, %rdi
callq 0x611e2
movl $0x88, %esi
movq %r15, %rdi
jmp 0x1f30c
movq %rax, %rbx
jmp 0x1f29a
movq %rax, %rbx
jmp 0x1f292
jmp 0x1f386
movq %rax, %rbx
leaq 0x2e0(%rsp), %rdi
callq 0x7370
movq %rsp, %rdi
callq 0x56df6
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1f31a
callq 0x5ac28
jmp 0x1f31a
movq %rax, %rbx
movq %rsp, %rdi
callq 0x56df6
jmp 0x1f31a
jmp 0x1f317
jmp 0x1f2db
jmp 0x1f317
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
jne 0x1f304
jmp 0x1f31a
jmp 0x1f317
movq %rax, %rbx
movl $0xd8, %esi
movq %r13, %rdi
jmp 0x1f30c
movq %rax, %rbx
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x1f31a
movq %rsp, %rdi
callq 0x5b5f2
jmp 0x1f31a
jmp 0x1f317
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1f31a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74c0
jmp 0x1f31a
jmp 0x1f317
jmp 0x1f317
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
callq 0x1f512
jmp 0x1f499
movq %rax, %rbx
leaq 0x328(%rsp), %rdi
callq 0x5b872
movq 0x308(%rsp), %rdi
leaq 0x318(%rsp), %rax
cmpq %rax, %rdi
je 0x1f4c3
movq 0x318(%rsp), %rsi
incq %rsi
callq 0x74c0
jmp 0x1f4c3
jmp 0x1f3ad
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x1f41e
movq 0x10(%rsp), %rsi
jmp 0x1f411
movq %rax, %rbx
jmp 0x1f48c
movq %rax, %rbx
jmp 0x1f46f
movq %rax, %rbx
jmp 0x1f452
movq %rax, %rbx
jmp 0x1f445
jmp 0x1f41b
movq %rax, %rbx
jmp 0x1f3e1
movq %rax, %rbx
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x1f41e
movq %rsp, %rdi
callq 0x5b5f2
jmp 0x1f41e
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1f3e1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x74c0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x1f402
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x74c0
jmp 0x1f402
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x1f41e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x74c0
jmp 0x1f41e
movq %rax, %rbx
leaq 0x280(%rsp), %rdi
callq 0x60b8a
leaq 0x248(%rsp), %rdi
callq 0x60c94
leaq 0x1f8(%rsp), %rdi
callq 0x60d30
leaq 0x1e0(%rsp), %rdi
callq 0x60b48
movq 0x1c8(%rsp), %rdi
testq %rdi, %rdi
je 0x1f46f
movq 0x1d8(%rsp), %rsi
subq %rdi, %rsi
callq 0x74c0
movq 0x1b0(%rsp), %rdi
testq %rdi, %rdi
je 0x1f48c
movq 0x1c0(%rsp), %rsi
subq %rdi, %rsi
callq 0x74c0
leaq 0x120(%rsp), %rdi
callq 0x5b872
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x1f4b6
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x74c0
leaq 0x2d8(%rsp), %rdi
callq 0x56e40
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x1f4e0
movq 0xf8(%rsp), %rsi
subq %rdi, %rsi
callq 0x74c0
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x1f4fd
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x74c0
leaq 0x3d0(%rsp), %rdi
callq 0x56e72
movq %rbx, %rdi
callq 0x7860
| /taskflow[P]taskflow/unittests/test_pipelines.cpp |
doctest::(anonymous namespace)::(anonymous namespace)::hexEscapeChar(std::ostream&, unsigned char) | void hexEscapeChar(std::ostream& os, unsigned char c) {
std::ios_base::fmtflags f(os.flags());
os << "\\x"
<< std::uppercase << std::hex << std::setfill('0') << std::setw(2)
<< static_cast<int>(c);
os.flags(f);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %r15d
leaq 0x3ab6c(%rip), %rsi # 0x6d848
movl $0x2, %edx
callq 0x7550
movq (%rbx), %rax
movq -0x18(%rax), %rcx
orl $0x4000, 0x18(%rbx,%rcx) # imm = 0x4000
movq -0x18(%rax), %rcx
movl 0x18(%rbx,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r14
cmpb $0x0, 0xe1(%rbx,%rax)
jne 0x32d35
movq %r14, %rdi
movl $0x20, %esi
callq 0x7480
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
movb $0x30, 0xe0(%r14)
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x10(%rbx,%rax)
movzbl %bpl, %esi
movq %rbx, %rdi
callq 0x7830
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl %r15d, 0x18(%rbx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| /taskflow[P]taskflow/3rd-party/doctest/doctest.h |
void tf::SmallVectorImpl<tf::Node*>::append<tf::Node**>(tf::Node**, tf::Node**) | void append(in_iter in_start, in_iter in_end) {
size_type NumInputs = std::distance(in_start, in_end);
// Grow allocated space if needed.
if (NumInputs > size_type(this->capacity_ptr()-this->end()))
this->grow(this->size()+NumInputs);
// Copy the new elements over.
this->uninitialized_copy(in_start, in_end, this->end());
this->setEnd(this->end() + NumInputs);
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %r14
subq %rsi, %r14
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rax
subq %rdx, %rax
cmpq %rax, %r14
jbe 0x5b29e
addq %r14, %rdx
subq (%rbx), %rdx
andq $-0x8, %rdx
leaq 0x18(%rbx), %rsi
movl $0x8, %ecx
movq %rbx, %rdi
callq 0x5adaa
cmpq %r12, %r15
je 0x5b2b2
movq 0x8(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x73a0
addq %r14, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| /taskflow[P]taskflow/taskflow/core/../utility/small_vector.hpp |
void tf::SmallVectorImpl<tf::Node*>::append<std::move_iterator<tf::Node**>>(std::move_iterator<tf::Node**>, std::move_iterator<tf::Node**>) | void append(in_iter in_start, in_iter in_end) {
size_type NumInputs = std::distance(in_start, in_end);
// Grow allocated space if needed.
if (NumInputs > size_type(this->capacity_ptr()-this->end()))
this->grow(this->size()+NumInputs);
// Copy the new elements over.
this->uninitialized_copy(in_start, in_end, this->end());
this->setEnd(this->end() + NumInputs);
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq %rdx, %r14
subq %rsi, %r14
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rax
subq %rdx, %rax
cmpq %rax, %r14
jbe 0x5b304
addq %r14, %rdx
subq (%rbx), %rdx
andq $-0x8, %rdx
leaq 0x18(%rbx), %rsi
movl $0x8, %ecx
movq %rbx, %rdi
callq 0x5adaa
cmpq %r15, %r12
je 0x5b318
movq 0x8(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x7780
addq %r14, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| /taskflow[P]taskflow/taskflow/core/../utility/small_vector.hpp |
main | int main()
{
int m,N,R,now;
std::cin >> N >> R;
if(N < 0){
std::cout << "-";
N = -N;
}
m = 0;
while (N) //转换进制,先求余在,在除,最后倒序输出
{
now = N % R;
if(now <= 9)
{
num[m++] = '0' + now; //'0'表示把数字转换成char类型的数字
}else
{
num[m++] = 'A' + now - 10; //把now转换成大写字母
}
N /= R;
}
if(m == 0)
{
std::cout << 0;
}
for (int i = m ; i > 0; i--) { //进制转换以后要倒序输出,才是转换后的结果。
std::cout << num[i] << std::endl;
}
return 0;
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x2e04(%rip), %rdi # 0x3fe0
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x1040
leaq 0xc(%rsp), %rsi
movq %rax, %rdi
callq 0x1040
movl (%rbx), %eax
testl %eax, %eax
jns 0x1219
movq 0x2dcd(%rip), %rdi # 0x3fd0
leaq 0xdfa(%rip), %rsi # 0x2004
callq 0x1060
xorl %eax, %eax
subl 0x8(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %ecx
xorl %r14d, %r14d
pushq $0x30
popq %rsi
pushq $0x37
popq %rdi
leaq 0x2e53(%rip), %r15 # 0x4080
testl %eax, %eax
je 0x124e
cltd
idivl %ecx
cmpl $0xa, %edx
movl %edi, %r8d
cmovll %esi, %r8d
addb %dl, %r8b
movb %r8b, (%r14,%r15)
incq %r14
movl %eax, 0x8(%rsp)
jmp 0x122d
testq %r14, %r14
jne 0x1261
movq 0x2d76(%rip), %rdi # 0x3fd0
xorl %esi, %esi
callq 0x1090
movq 0x2d68(%rip), %rbx # 0x3fd0
testq %r14, %r14
jle 0x1287
movsbl (%r14,%r15), %esi
movq %rbx, %rdi
callq 0x1070
movq %rax, %rdi
callq 0x1030
decq %r14
jmp 0x1268
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| /joiln[P]Bilibili_lanqiao_codes_1/question_7.cpp |
MX_EQ | uint8_t MX_EQ(uint32_t **a, uint32_t a_rows, uint32_t a_cols,
uint32_t **b, uint32_t b_rows, uint32_t b_cols)
{
if (a_rows != b_rows)
return 0;
if (a_cols != b_cols)
return 0;
for (uint32_t i = 0; i < a_rows; i++)
for (uint32_t j = 0; j < a_cols; j++)
if (a[i][j] != b[i][j])
return 0;
return 1;
} | xorl %esi, %r8d
xorl %edx, %r9d
orl %r8d, %r9d
jne 0x1a81
movl %esi, %eax
movl %edx, %edx
xorl %esi, %esi
cmpq %rax, %rsi
je 0x1a84
xorl %r8d, %r8d
cmpq %r8, %rdx
je 0x1a7c
movq (%rdi,%rsi,8), %r9
movl (%r9,%r8,4), %r9d
movq (%rcx,%rsi,8), %r10
leaq 0x1(%r8), %r11
cmpl (%r10,%r8,4), %r9d
movq %r11, %r8
je 0x1a5c
jmp 0x1a84
incq %rsi
jmp 0x1a54
xorl %eax, %eax
retq
cmpq %rax, %rsi
setae %al
retq
| /Warchant[P]reed-solomon_syndrome_gf256/test.h |
HermiteSpline<5u, 2u>::walk(double, void (*)(Eigen::Matrix<double, 2, 1, 0, 2, 1>, HermiteSpline<5u, 2u>&, double, UnitBoundedPolynomial<5u, 2u>&, void*), void*) | void HermiteSpline<Order, Dims>::walk(const double deltatau, void (*fn)(VectorNd, HermiteSpline<Order, Dims>&, double, UnitBoundedPolynomial<Order, Dims>&, void *), void *payload)
{
double tau = 0.0;
int m = 0;
while (m < children.size())
{
double reltau = tau / children[m].length;
VectorNd pt = children[m].interpolate(reltau);
fn(pt, *this, reltau, children[m], payload);
tau += deltatau;
if (tau > children[m].length)
{
tau = 0.0;
m++;
}
}
} | subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movsd %xmm0, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x28(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x60(%rsp)
movl $0x0, 0x5c(%rsp)
movq 0x28(%rsp), %rdi
movslq 0x5c(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0xe390
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jae 0x17894
movq 0x28(%rsp), %rdi
movsd 0x60(%rsp), %xmm0
movsd %xmm0, (%rsp)
movslq 0x5c(%rsp), %rsi
callq 0x17720
movsd (%rsp), %xmm0
movq 0x28(%rsp), %rdi
divsd 0x60(%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
movslq 0x5c(%rsp), %rsi
callq 0x17720
movq %rax, %rsi
movsd 0x50(%rsp), %xmm0
leaq 0x40(%rsp), %rdi
callq 0x170b0
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc8e0
movq 0x28(%rsp), %rdi
movsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movslq 0x5c(%rsp), %rsi
callq 0x17720
movsd 0x8(%rsp), %xmm0
movq 0x28(%rsp), %rsi
movq %rax, %rdx
movq 0x10(%rsp), %rax
movq 0x68(%rsp), %rcx
leaq 0x30(%rsp), %rdi
callq *%rax
movq 0x28(%rsp), %rdi
movsd 0x78(%rsp), %xmm0
addsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
movsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movslq 0x5c(%rsp), %rsi
callq 0x17720
movsd 0x18(%rsp), %xmm0
ucomisd 0x60(%rax), %xmm0
jbe 0x1788f
xorps %xmm0, %xmm0
movsd %xmm0, 0x60(%rsp)
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x1777d
addq $0x88, %rsp
retq
nopl (%rax)
| /janhuenermann[P]quintic-spline-solver/src/spline.cpp |
UnitBoundedPolynomial1<3u>::interpolate(double) const | double UnitBoundedPolynomial1<Order>::interpolate(double t) const
{
double y = 0.0, tt = 1;
for (int k = 0; k <= Order; ++k)
{
y += coeffs[k] * tt;
tt *= t;
}
return y;
} | movq %rdi, -0x8(%rsp)
movsd %xmm0, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x30(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rsp)
movsd 0x7584a(%rip), %xmm0 # 0x91010
movsd %xmm0, -0x20(%rsp)
movl $0x0, -0x24(%rsp)
cmpl $0x3, -0x24(%rsp)
ja 0x1b823
movq -0x30(%rsp), %rax
movslq -0x24(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd -0x20(%rsp), %xmm2
movsd -0x18(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rsp)
movsd -0x10(%rsp), %xmm0
mulsd -0x20(%rsp), %xmm0
movsd %xmm0, -0x20(%rsp)
movl -0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rsp)
jmp 0x1b7d4
movsd -0x18(%rsp), %xmm0
retq
nopw (%rax,%rax)
| /janhuenermann[P]quintic-spline-solver/src/spline.cpp |
HermiteSpline<3u, 1u>::interpolate(double) | typename HermiteSpline<Order, Dims>::VectorNd HermiteSpline<Order, Dims>::interpolate(double s)
{
int m = 0;
double s_ = s;
while (s_ > children[m].length && m < children.size())
{
s_ -= children[m].length;
}
if (s_ >= 1.0)
{
s_ = 1.0;
}
return children[m].interpolate(s_ / children[m].length);
} | subq $0x68, %rsp
movq %rdi, 0x28(%rsp)
movq %rdi, %rax
movq %rax, 0x30(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movsd %xmm0, 0x50(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x38(%rsp)
movl $0x0, 0x4c(%rsp)
movsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x38(%rsp), %rdi
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movslq 0x4c(%rsp), %rsi
callq 0x1bed0
movsd 0x18(%rsp), %xmm0
movq %rax, %rcx
xorl %eax, %eax
ucomisd 0x20(%rcx), %xmm0
movb %al, 0x27(%rsp)
jbe 0x1be26
movq 0x38(%rsp), %rdi
movslq 0x4c(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x1bef0
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
setb %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x1be30
jmp 0x1be59
movq 0x38(%rsp), %rdi
movslq 0x4c(%rsp), %rsi
callq 0x1bed0
movsd 0x20(%rax), %xmm1
movsd 0x40(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
jmp 0x1bdcf
movsd 0x40(%rsp), %xmm0
movsd 0x751a9(%rip), %xmm1 # 0x91010
ucomisd %xmm1, %xmm0
jb 0x1be7b
movsd 0x7519b(%rip), %xmm0 # 0x91010
movsd %xmm0, 0x40(%rsp)
movq 0x38(%rsp), %rdi
movslq 0x4c(%rsp), %rsi
callq 0x1bed0
movq 0x38(%rsp), %rdi
movq %rax, 0x8(%rsp)
movsd 0x40(%rsp), %xmm0
movsd %xmm0, (%rsp)
movslq 0x4c(%rsp), %rsi
callq 0x1bed0
movsd (%rsp), %xmm0
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
divsd 0x20(%rax), %xmm0
callq 0x1b700
movq 0x30(%rsp), %rax
addq $0x68, %rsp
retq
nopl (%rax)
| /janhuenermann[P]quintic-spline-solver/src/spline.cpp |
UnitBoundedPolynomial<3u, 2u>::walk(double, void (*)(Eigen::Matrix<double, 2, 1, 0, 2, 1>, double, UnitBoundedPolynomial<3u, 2u> const&, void*), void*, double, double) const | void UnitBoundedPolynomial<Order, Dims>::walk(const double deltatau, void (*fn)(VectorNd, double, const UnitBoundedPolynomial<Order, Dims>&, void *), void *payload, double a, double b) const
{
double tau = a;
while (tau <= b)
{
if (b - tau < deltatau)
{
tau = b;
}
fn(interpolate(tau), tau, *this, payload);
tau += deltatau;
}
} | subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movsd %xmm0, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movsd %xmm1, 0x30(%rsp)
movsd %xmm2, 0x28(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm1
movsd 0x28(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x1d3b1
movsd 0x28(%rsp), %xmm1
subsd 0x20(%rsp), %xmm1
movsd 0x48(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1d361
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x8(%rsp), %rsi
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
movsd 0x20(%rsp), %xmm0
leaq 0x10(%rsp), %rdi
callq 0x1d1b0
movq 0x8(%rsp), %rsi
movq (%rsp), %rax
movsd 0x20(%rsp), %xmm0
movq 0x38(%rsp), %rdx
leaq 0x10(%rsp), %rdi
callq *%rax
movsd 0x48(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x1d32b
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
| /janhuenermann[P]quintic-spline-solver/src/spline.cpp |
HermiteSpline<3u, 2u>::walk(double, void (*)(Eigen::Matrix<double, 2, 1, 0, 2, 1>, HermiteSpline<3u, 2u>&, double, UnitBoundedPolynomial<3u, 2u>&, void*), void*) | void HermiteSpline<Order, Dims>::walk(const double deltatau, void (*fn)(VectorNd, HermiteSpline<Order, Dims>&, double, UnitBoundedPolynomial<Order, Dims>&, void *), void *payload)
{
double tau = 0.0;
int m = 0;
while (m < children.size())
{
double reltau = tau / children[m].length;
VectorNd pt = children[m].interpolate(reltau);
fn(pt, *this, reltau, children[m], payload);
tau += deltatau;
if (tau > children[m].length)
{
tau = 0.0;
m++;
}
}
} | subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movsd %xmm0, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x28(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x60(%rsp)
movl $0x0, 0x5c(%rsp)
movq 0x28(%rsp), %rdi
movslq 0x5c(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x100b0
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
jae 0x1d9b4
movq 0x28(%rsp), %rdi
movsd 0x60(%rsp), %xmm0
movsd %xmm0, (%rsp)
movslq 0x5c(%rsp), %rsi
callq 0x1d840
movsd (%rsp), %xmm0
movq 0x28(%rsp), %rdi
divsd 0x40(%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
movslq 0x5c(%rsp), %rsi
callq 0x1d840
movq %rax, %rsi
movsd 0x50(%rsp), %xmm0
leaq 0x40(%rsp), %rdi
callq 0x1d1b0
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xc8e0
movq 0x28(%rsp), %rdi
movsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movslq 0x5c(%rsp), %rsi
callq 0x1d840
movsd 0x8(%rsp), %xmm0
movq 0x28(%rsp), %rsi
movq %rax, %rdx
movq 0x10(%rsp), %rax
movq 0x68(%rsp), %rcx
leaq 0x30(%rsp), %rdi
callq *%rax
movq 0x28(%rsp), %rdi
movsd 0x78(%rsp), %xmm0
addsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
movsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movslq 0x5c(%rsp), %rsi
callq 0x1d840
movsd 0x18(%rsp), %xmm0
ucomisd 0x40(%rax), %xmm0
jbe 0x1d9af
xorps %xmm0, %xmm0
movsd %xmm0, 0x60(%rsp)
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x1d89d
addq $0x88, %rsp
retq
nopl (%rax)
| /janhuenermann[P]quintic-spline-solver/src/spline.cpp |
main | int main(void)
{
bool tests_ok = true;
size_t index;
size_t miniscript_ref_max = sizeof(g_miniscript_ref_test_table) / sizeof(struct wally_miniscript_ref_test);
size_t miniscript_max = sizeof(g_miniscript_test_table) / sizeof(struct wally_miniscript_test);
size_t miniscript_tr_max = sizeof(g_miniscript_taproot_test_table) / sizeof(struct wally_miniscript_taproot_test);
size_t desc_max = sizeof(g_descriptor_test_table) / sizeof(struct wally_descriptor_test);
size_t desc_depth_max = sizeof(g_descriptor_depth_test_table) / sizeof(struct wally_descriptor_depth_test);
size_t addr_max = sizeof(g_descriptor_address_test_table) / sizeof(struct wally_descriptor_address_test);
size_t addr_list_max = sizeof(g_descriptor_addresses_test_table) / sizeof(struct wally_descriptor_address_list_test);
size_t desc_err_max = sizeof(g_descriptor_err_test_table) / sizeof(struct wally_descriptor_err_test);
size_t addr_err_max = sizeof(g_address_err_test_table) / sizeof(struct wally_descriptor_err_test);
for (index = 0; index < miniscript_ref_max; ++index) {
if (!check_parse_miniscript(
g_miniscript_ref_test_table[index].miniscript,
g_miniscript_ref_test_table[index].miniscript,
g_miniscript_ref_test_table[index].scriptpubkey,
NULL, NULL, 0, 0)) {
printf("[%s] test failed!\n", g_miniscript_ref_test_table[index].miniscript);
tests_ok = false;
}
}
for (index = 0; index < miniscript_max; ++index) {
if (!check_parse_miniscript(
g_miniscript_test_table[index].name,
g_miniscript_test_table[index].descriptor,
g_miniscript_test_table[index].scriptpubkey,
NULL, NULL, 0, 0)) {
printf("[%s] test failed!\n", g_miniscript_test_table[index].name);
tests_ok = false;
}
}
for (index = 0; index < miniscript_tr_max; ++index) {
if (!check_parse_miniscript(
g_miniscript_taproot_test_table[index].miniscript,
g_miniscript_taproot_test_table[index].miniscript,
g_miniscript_taproot_test_table[index].scriptpubkey,
NULL, NULL, 0,
g_miniscript_taproot_test_table[index].flags)) {
printf("[%s] test failed!\n", g_miniscript_taproot_test_table[index].miniscript);
tests_ok = false;
}
}
for (index = 0; index < desc_max; ++index) {
if (!check_descriptor_to_scriptpubkey(
g_descriptor_test_table[index].name,
g_descriptor_test_table[index].descriptor,
g_descriptor_test_table[index].scriptpubkey,
g_descriptor_test_table[index].bip32_index,
g_descriptor_test_table[index].checksum)) {
printf("[%s] test failed!\n", g_descriptor_test_table[index].name);
tests_ok = false;
}
}
for (index = 0; index < desc_depth_max; ++index) {
if (!check_descriptor_to_scriptpubkey_depth(
g_descriptor_depth_test_table[index].name,
g_descriptor_depth_test_table[index].descriptor,
g_descriptor_depth_test_table[index].depth,
g_descriptor_depth_test_table[index].index,
g_descriptor_depth_test_table[index].scriptpubkey)) {
printf("[%s] keylist test failed!\n", g_descriptor_depth_test_table[index].name);
tests_ok = false;
}
}
for (index = 0; index < addr_max; ++index) {
if (!check_descriptor_to_address(
g_descriptor_address_test_table[index].name,
g_descriptor_address_test_table[index].descriptor,
g_descriptor_address_test_table[index].bip32_index,
g_descriptor_address_test_table[index].network,
g_descriptor_address_test_table[index].address)) {
printf("[%s] test failed!\n", g_descriptor_address_test_table[index].name);
tests_ok = false;
}
}
for (index = 0; index < addr_list_max; ++index) {
if (!check_descriptor_to_addresses(
g_descriptor_addresses_test_table[index].name,
g_descriptor_addresses_test_table[index].descriptor,
g_descriptor_addresses_test_table[index].start_index,
g_descriptor_addresses_test_table[index].end_index,
g_descriptor_addresses_test_table[index].network,
g_descriptor_addresses_test_table[index].address_list,
g_descriptor_addresses_test_table[index].address_list_num)) {
printf("[%s] test failed!\n", g_descriptor_addresses_test_table[index].name);
tests_ok = false;
}
}
for (index = 0; index < desc_err_max; ++index) {
if (!check_descriptor_scriptpubkey_error(
g_descriptor_err_test_table[index].name,
g_descriptor_err_test_table[index].descriptor,
g_descriptor_err_test_table[index].network)) {
printf("[%s] test failed!\n", g_descriptor_err_test_table[index].name);
tests_ok = false;
}
}
for (index = 0; index < addr_err_max; ++index) {
if (!check_descriptor_address_error(
g_address_err_test_table[index].name,
g_address_err_test_table[index].descriptor,
g_address_err_test_table[index].network)) {
printf("[%s] test failed!\n", g_address_err_test_table[index].name);
tests_ok = false;
}
}
return tests_ok ? 0 : 1;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp # imm = 0x248
movb $0x1, %r12b
xorl %r14d, %r14d
leaq 0x79746(%rip), %r15 # 0x800c0
leaq 0x5c2f7(%rip), %rbx # 0x62c78
movq (%r14,%r15), %rdi
movq 0x8(%r14,%r15), %rdx
movq %rdi, %rsi
xorl %ecx, %ecx
callq 0x7160
testb %al, %al
jne 0x69a9
movq (%r14,%r15), %rsi
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5090
addq $0x10, %r14
cmpq $0x1d0, %r14 # imm = 0x1D0
jne 0x6981
xorl %r14d, %r14d
leaq 0x798d0(%rip), %r15 # 0x80290
leaq 0x5c2b1(%rip), %rbx # 0x62c78
movq (%r14,%r15), %rdi
movq 0x8(%r14,%r15), %rsi
movq 0x10(%r14,%r15), %rdx
xorl %ecx, %ecx
callq 0x7160
testb %al, %al
jne 0x69f1
movq (%r14,%r15), %rsi
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5090
addq $0x28, %r14
cmpq $0x258, %r14 # imm = 0x258
jne 0x69c7
xorl %r14d, %r14d
leaq 0x79ae8(%rip), %r15 # 0x804f0
leaq 0x5c269(%rip), %rbx # 0x62c78
movq (%r14,%r15), %rdi
movq 0x8(%r14,%r15), %rdx
movl 0x10(%r14,%r15), %ecx
movq %rdi, %rsi
callq 0x7160
testb %al, %al
jne 0x6a3a
movq (%r14,%r15), %rsi
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5090
addq $0x18, %r14
cmpq $0x48, %r14
jne 0x6a0f
xorl %r15d, %r15d
leaq 0x79af2(%rip), %rbx # 0x80540
xorl %ebp, %ebp
movl %r12d, 0xc(%rsp)
movq (%rbp,%rbx), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rbp,%rbx), %r12
movq 0x10(%rbp,%rbx), %r14
movq 0x18(%rbp,%rbx), %rax
movq 0x20(%rbp,%rbx), %rcx
movq %rcx, 0x20(%rsp)
movq %r15, 0x18(%rsp)
movq %r15, (%rsp)
movq %r15, 0x30(%rsp)
movl $0x0, %r8d
testq %rax, %rax
je 0x6a94
movl (%rax), %r8d
movl $0xb, %ecx
movq %r12, %rdi
leaq 0x78b3d(%rip), %rsi # 0x7f5e0
leaq 0x78b96(%rip), %rdx # 0x7f640
xorl %r9d, %r9d
leaq 0x18(%rsp), %rax
pushq %rax
pushq $0x208 # imm = 0x208
leaq 0x50(%rsp), %r13
pushq %r13
pushq %r15
pushq %r15
pushq %r15
callq 0x7845
addq $0x30, %rsp
testl %eax, %eax
je 0x6adb
leaq 0x5c23f(%rip), %rdi # 0x62d18
jmp 0x6af6
movq 0x18(%rsp), %rsi
movq %r13, %rdi
movq %rsp, %rdx
callq 0xb870
testl %eax, %eax
je 0x6b2b
leaq 0x5c1da(%rip), %rdi # 0x62cd0
movl %eax, %esi
xorl %eax, %eax
callq 0x5090
movq (%rbp,%rbx), %rsi
xorl %r12d, %r12d
leaq 0x5c16a(%rip), %rdi # 0x62c78
xorl %eax, %eax
callq 0x5090
addq $0x28, %rbp
cmpq $0x4d8, %rbp # imm = 0x4D8
jne 0x6a50
jmp 0x6bfe
movl $0xb, %ecx
movq %r12, %rdi
leaq 0x78aa6(%rip), %rsi # 0x7f5e0
leaq 0x78aff(%rip), %rdx # 0x7f640
xorl %r8d, %r8d
leaq 0x30(%rsp), %r9
callq 0x7d7e
testl %eax, %eax
je 0x6b64
leaq 0x5c1e8(%rip), %rdi # 0x62d41
movl %eax, %esi
xorl %eax, %eax
callq 0x5090
jmp 0x6bd5
movq (%rsp), %r13
movq %r13, %rdi
callq 0x5070
leaq 0x1(%rax), %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x5050
testl %eax, %eax
je 0x6b97
leaq 0x5c1e0(%rip), %rdi # 0x62d6a
movq 0x10(%rsp), %rsi
movq %r12, %rdx
movq %r13, %rcx
jmp 0x6bc4
movq 0x30(%rsp), %r14
movl $0x9, %edx
movq %r14, %rdi
movq 0x20(%rsp), %rsi
callq 0x5050
testl %eax, %eax
je 0x6be3
leaq 0x5c1cf(%rip), %rdi # 0x62d88
movq 0x10(%rsp), %rsi
movq %r12, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x5090
movq 0x30(%rsp), %rdi
callq 0xba5e
movq (%rsp), %rdi
callq 0xba5e
jmp 0x6aff
movq %r14, %rdi
callq 0xba5e
movq (%rsp), %rdi
callq 0xba5e
movl 0xc(%rsp), %r12d
jmp 0x6b15
movl %r12d, %ebx
xorl %r14d, %r14d
leaq 0x79e15(%rip), %rcx # 0x80a20
movq (%r14,%rcx), %rbp
movq 0x8(%r14,%rcx), %r12
movl 0x10(%r14,%rcx), %eax
movl 0x14(%r14,%rcx), %r10d
movq 0x18(%r14,%rcx), %r15
xorl %ecx, %ecx
movq %rcx, 0x18(%rsp)
movq %rcx, (%rsp)
movl $0xb, %ecx
movq %r12, %rdi
leaq 0x789a3(%rip), %rsi # 0x7f5e0
leaq 0x789fc(%rip), %rdx # 0x7f640
xorl %r8d, %r8d
xorl %r9d, %r9d
leaq 0x18(%rsp), %r11
pushq %r11
pushq $0x208 # imm = 0x208
leaq 0x50(%rsp), %r13
pushq %r13
pushq $0x0
pushq %r10
pushq %rax
callq 0x7845
addq $0x30, %rsp
testl %eax, %eax
je 0x6c78
leaq 0x5c0a2(%rip), %rdi # 0x62d18
jmp 0x6c9d
movq %r15, 0x10(%rsp)
movq %rbp, 0x20(%rsp)
movq 0x18(%rsp), %rsi
movq %r13, %rdi
movq %rsp, %rdx
callq 0xb870
testl %eax, %eax
je 0x6cd4
leaq 0x5c033(%rip), %rdi # 0x62cd0
movl %eax, %esi
xorl %eax, %eax
callq 0x5090
leaq 0x79d73(%rip), %rax # 0x80a20
movq (%r14,%rax), %rsi
xorl %ebx, %ebx
leaq 0x5bfd1(%rip), %rdi # 0x62c8b
xorl %eax, %eax
callq 0x5090
addq $0x20, %r14
cmpq $0xe0, %r14
jne 0x6c04
jmp 0x6d23
movq (%rsp), %r13
movq %r13, %rdi
callq 0x5070
leaq 0x1(%rax), %rdx
movq %r13, %rdi
movq 0x10(%rsp), %rsi
callq 0x5050
testl %eax, %eax
je 0x6d19
leaq 0x5c06e(%rip), %rdi # 0x62d6a
movq 0x20(%rsp), %rsi
movq %r12, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x5090
movq (%rsp), %rdi
callq 0xba5e
jmp 0x6ca6
movq %r13, %rdi
callq 0xba5e
jmp 0x6cc1
leaq 0x79dd6(%rip), %r13 # 0x80b00
xorl %r14d, %r14d
leaq 0x40(%rsp), %rbp
movq (%r14,%r13), %r15
movq 0x8(%r14,%r13), %rdi
movl 0x10(%r14,%r13), %r8d
movl 0x14(%r14,%r13), %r9d
movq 0x18(%r14,%r13), %r12
movq $0x0, 0x40(%rsp)
movl $0xb, %ecx
leaq 0x78881(%rip), %rsi # 0x7f5e0
leaq 0x788da(%rip), %rdx # 0x7f640
pushq %rbp
pushq $0x0
callq 0x796d
addq $0x10, %rsp
testl %eax, %eax
je 0x6d88
leaq 0x5c180(%rip), %rdi # 0x62efd
movl %eax, %esi
xorl %eax, %eax
callq 0x5090
jmp 0x6dce
movq 0x40(%rsp), %rbp
movq %r12, %rdi
callq 0x5070
leaq 0x1(%rax), %rdx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x5050
testl %eax, %eax
je 0x6df5
leaq 0x5c172(%rip), %rdi # 0x62f21
movq %r15, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x5090
movq 0x40(%rsp), %rdi
callq 0xba5e
leaq 0x40(%rsp), %rbp
movq (%r14,%r13), %rsi
xorl %ebx, %ebx
leaq 0x5be9d(%rip), %rdi # 0x62c78
xorl %eax, %eax
callq 0x5090
addq $0x20, %r14
cmpq $0x3c0, %r14 # imm = 0x3C0
jne 0x6d32
jmp 0x6e04
movq %rbp, %rdi
callq 0xba5e
leaq 0x40(%rsp), %rbp
jmp 0x6de2
movb $0x1, %r14b
leaq 0x7a0b2(%rip), %r13 # 0x80ec0
xorl %eax, %eax
movl %ebx, 0xc(%rsp)
imulq $0x118, %rax, %rax # imm = 0x118
leaq (%rax,%r13), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax,%r13), %r15
movq 0x8(%rax,%r13), %rdi
movl 0x10(%rax,%r13), %ebx
movl 0x14(%rax,%r13), %r9d
movl 0x18(%rax,%r13), %r10d
movq 0x20(%rax,%r13), %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
subq $0x8, %rsp
movl $0xb, %ecx
leaq 0x78787(%rip), %rsi # 0x7f5e0
leaq 0x787e0(%rip), %rdx # 0x7f640
movl %ebx, %r8d
pushq %rbp
pushq $0x0
pushq %r10
callq 0x7b54
addq $0x20, %rsp
testl %eax, %eax
je 0x6ea8
leaq 0x5c0c5(%rip), %rdi # 0x62f41
movl %eax, %esi
xorl %eax, %eax
callq 0x5090
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movl $0x0, 0xc(%rsp)
leaq 0x5bddc(%rip), %rdi # 0x62c78
xorl %eax, %eax
callq 0x5090
jmp 0x6fa8
movq %rbx, 0x38(%rsp)
movq 0x48(%rsp), %rdx
cmpq %r12, %rdx
jne 0x6f8c
testq %r12, %r12
je 0x6fa0
movq %r15, 0x20(%rsp)
movl %r14d, 0x2c(%rsp)
movb $0x1, %r14b
xorl %ebx, %ebx
movq %r12, %r15
movq 0x10(%rsp), %rax
movq 0x28(%rax,%rbx,8), %r13
movq 0x40(%rsp), %rax
leaq (%rbx,%rbx,2), %rcx
movq 0x8(%rax,%rcx,8), %rbp
movl (%rax,%rcx,8), %r12d
movq %r13, %rdi
callq 0x5070
leaq 0x1(%rax), %rdx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x5050
testl %eax, %eax
je 0x6f2b
xorl %r14d, %r14d
leaq 0x5c079(%rip), %rdi # 0x62f90
movq 0x20(%rsp), %rsi
movl %ebx, %edx
movq %rbp, %rcx
movq %r13, %r8
xorl %eax, %eax
callq 0x5090
movq 0x38(%rsp), %rax
leal (%rbx,%rax), %r8d
cmpl %r8d, %r12d
jne 0x6f45
incl %ebx
movq %r15, %r12
cmpq %rbx, %r15
ja 0x6ed3
jmp 0x6fc2
xorl %r14d, %r14d
leaq 0x5c065(%rip), %rdi # 0x62fb4
movq 0x20(%rsp), %rsi
movl %ebx, %edx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x5090
incl %ebx
movq %r15, %r12
cmpq %rbx, %r15
ja 0x6ed3
leaq 0x40(%rsp), %rbp
movq %rbp, %rdi
callq 0x730a
movl 0x2c(%rsp), %r14d
leaq 0x79f39(%rip), %r13 # 0x80ec0
jmp 0x6e85
leaq 0x5bfd4(%rip), %rdi # 0x62f67
movq %r15, %rsi
movq %r12, %rcx
xorl %eax, %eax
callq 0x5090
movq %rbp, %rdi
callq 0x730a
movl $0x1, %eax
xorl %r12d, %r12d
testb $0x1, %r14b
movl $0x0, %r14d
jne 0x6e14
jmp 0x6fe7
leaq 0x40(%rsp), %rbp
movq %rbp, %rdi
callq 0x730a
testb $0x1, %r14b
movl 0x2c(%rsp), %r14d
leaq 0x79ee1(%rip), %r13 # 0x80ec0
je 0x6e85
jmp 0x6fa8
movl 0xc(%rsp), %r14d
leaq 0x7a0fd(%rip), %rbp # 0x810f0
leaq 0x78646(%rip), %r15 # 0x7f640
xorl %r13d, %r13d
movq (%r13,%rbp), %rbx
movq 0x8(%r13,%rbp), %rdi
movl 0x10(%r13,%rbp), %r9d
movq $0x0, 0x18(%rsp)
movl $0xb, %ecx
leaq 0x785bf(%rip), %rsi # 0x7f5e0
movq %r15, %rdx
xorl %r8d, %r8d
leaq 0x18(%rsp), %rax
pushq %rax
pushq $0x208 # imm = 0x208
leaq 0x50(%rsp), %rax
pushq %rax
pushq %r12
pushq %r12
pushq %r12
callq 0x7845
addq $0x30, %rsp
cmpl $-0x2, %eax
je 0x7089
testl %eax, %eax
jne 0x7063
leaq 0x5bf82(%rip), %rdi # 0x62fd9
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5090
jmp 0x7073
leaq 0x5bcae(%rip), %rdi # 0x62d18
movl %eax, %esi
xorl %eax, %eax
callq 0x5090
movq (%r13,%rbp), %rsi
xorl %r14d, %r14d
leaq 0x5bbf6(%rip), %rdi # 0x62c78
xorl %eax, %eax
callq 0x5090
addq $0x18, %r13
cmpq $0x1b0, %r13 # imm = 0x1B0
jne 0x6ffd
leaq 0x7a1ff(%rip), %rbx # 0x812a0
leaq 0x78538(%rip), %r12 # 0x7f5e0
leaq 0x78591(%rip), %r15 # 0x7f640
xorl %r13d, %r13d
movq (%r13,%rbx), %rbp
movq 0x8(%r13,%rbx), %rdi
movl 0x10(%r13,%rbx), %r9d
movq $0x0, 0x40(%rsp)
movl $0xb, %ecx
movq %r12, %rsi
movq %r15, %rdx
xorl %r8d, %r8d
leaq 0x40(%rsp), %rax
pushq %rax
pushq $0x0
callq 0x796d
addq $0x10, %rsp
cmpl $-0x2, %eax
je 0x7135
testl %eax, %eax
jne 0x710f
leaq 0x5bf1b(%rip), %rdi # 0x63014
movq %rbp, %rsi
xorl %eax, %eax
callq 0x5090
movq 0x40(%rsp), %rdi
callq 0xba5e
jmp 0x711f
leaq 0x5bde7(%rip), %rdi # 0x62efd
movl %eax, %esi
xorl %eax, %eax
callq 0x5090
movq (%r13,%rbx), %rsi
xorl %r14d, %r14d
leaq 0x5bb4a(%rip), %rdi # 0x62c78
xorl %eax, %eax
callq 0x5090
addq $0x18, %r13
cmpq $0x78, %r13
jne 0x70b2
notb %r14b
andb $0x1, %r14b
movzbl %r14b, %eax
addq $0x248, %rsp # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/ctest/test_descriptor.c |
check_parse_miniscript | static bool check_parse_miniscript(const char *function, const char *descriptor,
const char *expected,
const char **key_name_list,
const char **key_value_list, size_t list_num,
uint32_t flags)
{
size_t written = 0;
unsigned char script[520];
char *hex = NULL;
int ret;
bool is_success = false;
uint32_t index = 0;
ret = wally_descriptor_parse_miniscript(
descriptor,
key_name_list,
key_value_list,
list_num,
index,
flags,
script,
sizeof(script),
&written);
if (ret != WALLY_OK) {
printf("wally_descriptor_parse_miniscript NG[%d]\n", ret);
return false;
}
ret = wally_hex_from_bytes(script, written, &hex);
if (ret != WALLY_OK) {
printf("wally_hex_from_bytes NG[%d]\n", ret);
return false;
}
if (strncmp(hex, expected, strlen(hex) + 1) == 0) {
is_success = true;
} else
printf("%s:\n Input: %s\n Output: %s\n Expect: %s\n",
function, descriptor, hex, expected);
wally_free_string(hex);
return is_success;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x220, %rsp # imm = 0x220
movl %ecx, %r9d
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %eax, %eax
leaq 0x8(%rsp), %r10
movq %rax, (%r10)
movq %rax, (%rsp)
subq $0x8, %rsp
leaq 0x18(%rsp), %rax
movq %rsi, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
pushq %r10
pushq $0x208 # imm = 0x208
pushq %rax
callq 0x73a9
addq $0x20, %rsp
testl %eax, %eax
je 0x71bc
leaq 0x5baec(%rip), %rdi # 0x62ca6
jmp 0x71d9
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdi
movq %rsp, %rdx
callq 0xb870
testl %eax, %eax
je 0x71f6
leaq 0x5baf7(%rip), %rdi # 0x62cd0
xorl %ebp, %ebp
movl %eax, %esi
xorl %eax, %eax
callq 0x5090
movl %ebp, %eax
addq $0x220, %rsp # imm = 0x220
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %r12
movq %r12, %rdi
callq 0x5070
leaq 0x1(%rax), %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x5050
testl %eax, %eax
sete %bpl
je 0x7237
leaq 0x5bacd(%rip), %rdi # 0x62ced
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq %rbx, %r8
xorl %eax, %eax
callq 0x5090
movq (%rsp), %r12
movq %r12, %rdi
callq 0xba5e
jmp 0x71e4
nopl (%rax)
| /p2pderivatives[P]cfd-go/external/libwally-core/src/ctest/test_descriptor.c |
check_type_properties | int check_type_properties(uint32_t property)
{
/* K, V, B, W all conflict with each other */
switch (property & MINISCRIPT_TYPE_MASK) {
case MINISCRIPT_TYPE_B:
case MINISCRIPT_TYPE_V:
case MINISCRIPT_TYPE_K:
case MINISCRIPT_TYPE_W:
break;
default:
return WALLY_EINVAL;
}
if ((property & MINISCRIPT_PROPERTY_Z) && (property & MINISCRIPT_PROPERTY_O))
return WALLY_EINVAL;
if ((property & MINISCRIPT_PROPERTY_N) && (property & MINISCRIPT_PROPERTY_Z))
return WALLY_EINVAL;
if ((property & MINISCRIPT_TYPE_V) && (property & MINISCRIPT_PROPERTY_D))
return WALLY_EINVAL;
if ((property & MINISCRIPT_TYPE_K) && !(property & MINISCRIPT_PROPERTY_U))
return WALLY_EINVAL;
if ((property & MINISCRIPT_TYPE_V) && (property & MINISCRIPT_PROPERTY_U))
return WALLY_EINVAL;
if ((property & MINISCRIPT_PROPERTY_E) && (property & MINISCRIPT_PROPERTY_F))
return WALLY_EINVAL;
if ((property & MINISCRIPT_PROPERTY_E) && !(property & MINISCRIPT_PROPERTY_D))
return WALLY_EINVAL;
if ((property & MINISCRIPT_TYPE_V) && (property & MINISCRIPT_PROPERTY_E))
return WALLY_EINVAL;
if ((property & MINISCRIPT_PROPERTY_D) && (property & MINISCRIPT_PROPERTY_F))
return WALLY_EINVAL;
if ((property & MINISCRIPT_TYPE_V) && !(property & MINISCRIPT_PROPERTY_F))
return WALLY_EINVAL;
if ((property & MINISCRIPT_TYPE_K) && !(property & MINISCRIPT_PROPERTY_S))
return WALLY_EINVAL;
if ((property & MINISCRIPT_PROPERTY_Z) && !(property & MINISCRIPT_PROPERTY_M))
return WALLY_EINVAL;
return WALLY_OK;
} | movl %edi, %ecx
andl $0xf, %ecx
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
cmpl $0x8, %ecx
ja 0x7309
movl $0x116, %edx # imm = 0x116
btl %ecx, %edx
jae 0x7309
movl %edi, %ecx
notl %ecx
testl $0x802, %ecx # imm = 0x802
je 0x7309
movl %edi, %edx
andl $0x300, %edx # imm = 0x300
cmpl $0x300, %edx # imm = 0x300
je 0x7309
movl %edi, %edx
andl $0x500, %edx # imm = 0x500
cmpl $0x500, %edx # imm = 0x500
je 0x7309
testl $0x6000, %ecx # imm = 0x6000
je 0x7309
movl %edi, %ecx
andl $0x1004, %ecx # imm = 0x1004
cmpl $0x4, %ecx
je 0x7309
movl %edi, %ecx
andl $0x1002, %ecx # imm = 0x1002
cmpl $0x1002, %ecx # imm = 0x1002
je 0x7309
movd %edi, %xmm0
pshufd $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0]
pand 0x5bd91(%rip), %xmm0 # 0x63060
movl %edi, %ecx
andl $0x8004, %ecx # imm = 0x8004
cmpl $0x4, %ecx
sete %cl
pcmpeqd 0x5bd8b(%rip), %xmm0 # 0x63070
movmskps %xmm0, %edx
testl %edx, %edx
setne %dl
orb %cl, %dl
jne 0x7309
andl $0x10100, %edi # imm = 0x10100
xorl %eax, %eax
cmpl $0x100, %edi # imm = 0x100
setne %al
leal -0x2(,%rax,2), %eax
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
free_descriptor_address_item | static void free_descriptor_address_item(
struct wally_descriptor_address_item *item, size_t item_len)
{
size_t index;
if (item) {
for (index = 0; index < item_len; ++index) {
if (item[index].address) {
wally_clear((void *)item[index].address, item[index].address_len);
wally_free((void *)item[index].address);
}
wally_clear((void *)&item[index], sizeof(item[index]));
}
wally_clear((void *)item, item_len * sizeof(struct wally_descriptor_address_item));
wally_free((void *)item);
}
} | testq %rdi, %rdi
je 0x73a8
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x7385
movq %rbx, %r15
movq %r14, %r12
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x736f
movq 0x10(%r15), %rsi
callq 0xba8b
movq 0x8(%r15), %rdi
callq 0xba94
movl $0x18, %esi
movq %r15, %rdi
callq 0xba8b
addq $0x18, %r15
decq %r12
jne 0x7354
shlq $0x3, %r14
leaq (%r14,%r14,2), %rsi
movq %rbx, %rdi
callq 0xba8b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xba94
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
wally_descriptor_parse_miniscript | int wally_descriptor_parse_miniscript(
const char *miniscript,
const char **key_name_array,
const char **key_value_array,
size_t array_len,
uint32_t derive_child_num,
uint32_t flags,
unsigned char *script,
size_t script_len,
size_t *written)
{
int ret;
struct wally_descriptor_script_item script_item;
if (!script || !written || !script_len)
return WALLY_EINVAL;
if (written)
*written = 0;
wally_bzero(&script_item, sizeof(script_item));
script_item.child_num = derive_child_num;
script_item.script = script;
script_item.script_len = script_len;
ret = parse_miniscript(
miniscript,
key_name_array,
key_value_array,
array_len,
flags,
DESCRIPTOR_KIND_MINISCRIPT,
NULL,
0,
0,
&script_item,
1,
NULL,
NULL);
if (ret == WALLY_OK)
*written = script_item.script_len;
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
cmpq $0x0, 0x68(%rsp)
je 0x745f
cmpq $0x0, 0x60(%rsp)
je 0x745f
movq %rsi, %r13
movq 0x70(%rsp), %rsi
testq %rsi, %rsi
je 0x745f
xorl %eax, %eax
movq %rax, (%rsi)
leaq 0x10(%rsp), %rbx
movl $0x18, %esi
movq %rdi, %rbp
movq %rbx, %rdi
movl %r9d, 0xc(%rsp)
movq %rcx, %r12
movq %rdx, %r14
movl %r8d, %r15d
callq 0xba9a
movl %r15d, (%rbx)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rbx)
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rbx)
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
movl 0xc(%rsp), %r8d
movl $0x1, %r9d
xorl %eax, %eax
pushq %rax
pushq $0x1
pushq %rbx
pushq %rax
pushq %rax
xorl %eax, %eax
pushq %rax
callq 0x746e
movq 0xa0(%rsp), %rcx
addq $0x30, %rsp
testl %eax, %eax
jne 0x745f
movq 0x20(%rsp), %rax
movq %rax, (%rcx)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
parse_miniscript | static int parse_miniscript(
const char *miniscript,
const char **key_name_array,
const char **key_value_array,
size_t array_len,
uint32_t flags,
uint32_t target,
uint32_t *network,
uint32_t descriptor_depth,
uint32_t descriptor_index,
struct wally_descriptor_script_item *script_item,
size_t item_len,
uint32_t *properties,
char **script_ignore_checksum)
{
int ret;
size_t index;
unsigned char *work_script = NULL;
size_t work_script_len = 0;
unsigned char *temp_script = NULL;
size_t temp_script_len = 0;
size_t write_len;
struct miniscript_node_t *top_node = NULL;
bool is_tapscript = false;
if (((flags & ~0x1) != 0) ||
!miniscript || (array_len && (!key_name_array || !key_value_array)) ||
(!array_len && (key_name_array || key_value_array)) ||
check_ascii_string(miniscript, DESCRIPTOR_LIMIT_LENGTH))
return WALLY_EINVAL;
if (array_len) {
for (index = 0; index < array_len; ++index) {
if (!key_name_array[index] || !key_value_array[index])
return WALLY_EINVAL;
if (check_ascii_string(key_name_array[index], DESCRIPTOR_KEY_NAME_MAX_LENGTH) ||
check_ascii_string(key_value_array[index], DESCRIPTOR_KEY_VALUE_MAX_LENGTH)) {
return WALLY_EINVAL;
}
}
}
ret = analyze_miniscript(miniscript, key_name_array, key_value_array, array_len,
target, network, flags,
NULL, NULL, &top_node, script_ignore_checksum);
if ((ret == WALLY_OK) && (target & DESCRIPTOR_KIND_DESCRIPTOR) &&
(!top_node->info || !(top_node->info->kind & DESCRIPTOR_KIND_DESCRIPTOR)))
ret = WALLY_EINVAL;
if ((ret == WALLY_OK) && script_item) {
for (index = 0; index < item_len; ++index) {
write_len = 0;
temp_script = script_item[index].script;
temp_script_len = script_item[index].script_len;
if (!temp_script) {
if (!work_script) {
work_script = (unsigned char *)wally_malloc(DESCRIPTOR_LIMIT_LENGTH);
if (!work_script) {
ret = WALLY_ENOMEM;
break;
}
work_script_len = DESCRIPTOR_LIMIT_LENGTH;
}
temp_script = work_script;
temp_script_len = work_script_len;
}
ret = convert_script_from_node(top_node, script_item[index].child_num,
descriptor_depth, descriptor_index,
temp_script, temp_script_len,
&write_len);
if (ret != WALLY_OK)
break;
if (!script_item[index].script) {
script_item[index].script = (unsigned char *)wally_malloc(write_len);
if (!script_item[index].script) {
ret = WALLY_ENOMEM;
break;
}
memcpy(script_item[index].script, temp_script, write_len);
}
script_item[index].script_len = write_len;
}
}
if ((ret == WALLY_OK) && properties)
*properties = top_node->type_properties;
if ((ret != WALLY_OK) && script_ignore_checksum)
wally_free_string(*script_ignore_checksum);
if (work_script) {
wally_bzero(work_script, work_script_len);
wally_free(work_script);
}
free_miniscript_node(top_node);
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, %ebp
movq $0x0, 0x30(%rsp)
cmpl $0x2, %r8d
setae %al
testq %rdi, %rdi
sete %r9b
movl $0xfffffffe, %ebx # imm = 0xFFFFFFFE
orb %al, %r9b
jne 0x75ff
testq %rcx, %rcx
je 0x74c0
testq %rdx, %rdx
setne %al
testq %rsi, %rsi
setne %r9b
testb %al, %r9b
jne 0x74cc
jmp 0x75ff
movq %rsi, %rax
orq %rdx, %rax
jne 0x75ff
movb (%rdi), %al
testb %al, %al
je 0x74f8
xorl %r9d, %r9d
cmpq $0xf4240, %r9 # imm = 0xF4240
ja 0x75ff
addb $-0x7f, %al
cmpb $-0x5f, %al
jb 0x75ff
movb 0x1(%rdi,%r9), %al
incq %r9
testb %al, %al
jne 0x74d5
testq %rcx, %rcx
je 0x758e
xorl %eax, %eax
movq (%rsi,%rax,8), %r10
testq %r10, %r10
je 0x75ff
movq (%rdx,%rax,8), %r9
testq %r9, %r9
je 0x75ff
movb (%r10), %r11b
testb %r11b, %r11b
je 0x754d
xorl %r14d, %r14d
cmpq $0x10, %r14
ja 0x75ff
addb $-0x7f, %r11b
cmpb $-0x5f, %r11b
jb 0x75ff
movb 0x1(%r10,%r14), %r11b
incq %r14
testb %r11b, %r11b
jne 0x7528
movb (%r9), %r10b
testb %r10b, %r10b
je 0x7580
xorl %r11d, %r11d
cmpq $0x82, %r11
ja 0x75ff
addb $-0x7f, %r10b
cmpb $-0x5f, %r10b
jb 0x75ff
movb 0x1(%r9,%r11), %r10b
incq %r11
testb %r10b, %r10b
jne 0x7558
incq %rax
cmpq %rcx, %rax
jne 0x7503
jmp 0x7590
xorl %ecx, %ecx
movq 0xb8(%rsp), %r13
movq 0x90(%rsp), %r9
movq %r13, 0x20(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
movl %r8d, (%rsp)
movl %ebp, %r8d
callq 0x7fa3
testl %eax, %eax
je 0x7610
movl %eax, %ebx
xorl %r14d, %r14d
xorl %r15d, %r15d
testq %r13, %r13
je 0x75dd
movq (%r13), %rdi
callq 0xba5e
testq %r14, %r14
je 0x75f5
movq %r14, %rdi
movq %r15, %rsi
callq 0xba9a
movq %r14, %rdi
callq 0xba94
movq 0x30(%rsp), %rdi
callq 0x8d6e
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $0x2, %bpl
je 0x7637
movq 0x30(%rsp), %rax
movq (%rax), %rax
movl $0xfffffffe, %ebx # imm = 0xFFFFFFFE
testq %rax, %rax
je 0x75c9
xorl %r14d, %r14d
testb $0x2, 0x8(%rax)
movl $0x0, %r15d
je 0x75cf
movq 0xb0(%rsp), %rcx
movq 0xa8(%rsp), %rdx
testq %rdx, %rdx
sete %al
testq %rcx, %rcx
sete %cl
xorl %ebx, %ebx
orb %al, %cl
jne 0x75f5
movl 0xa0(%rsp), %ecx
movl 0x98(%rsp), %esi
xorl %r12d, %r12d
xorl %r14d, %r14d
xorl %edi, %edi
leaq (%rdi,%rdi,2), %rbx
movq 0x8(%rdx,%rbx,8), %r8
testq %r8, %r8
je 0x7687
movq 0x10(%rdx,%rbx,8), %r9
movq %r12, %r15
jmp 0x76d7
testq %r14, %r14
je 0x7697
movq %r12, %r15
movq %r14, %r8
movq %r12, %r9
jmp 0x76d7
movl $0xf4240, %r15d # imm = 0xF4240
movq %rdi, 0x38(%rsp)
movl $0xf4240, %edi # imm = 0xF4240
movq %rdx, %r14
movl %esi, %ebp
callq 0xbd35
movq 0x38(%rsp), %rdi
movl %ebp, %esi
movl 0xa0(%rsp), %ecx
movq %r14, %rdx
movq %rax, %r14
movq %rax, %r8
movl $0xf4240, %r9d # imm = 0xF4240
testq %rax, %rax
je 0x7835
leaq (%rdx,%rbx,8), %rdx
movq 0x30(%rsp), %rbp
movl (%rdx), %ebx
movq $0x0, 0x48(%rsp)
movl %esi, %eax
testl %esi, %esi
je 0x7702
movq 0x18(%rbp), %rbp
testq %rbp, %rbp
je 0x780f
decl %eax
jne 0x76f1
movl %ecx, %eax
testl %ecx, %ecx
je 0x7719
movq 0x8(%rbp), %rbp
testq %rbp, %rbp
je 0x780f
decl %eax
jne 0x7708
movq %r9, %r13
movq %rdx, 0x50(%rsp)
movq %r8, 0x40(%rsp)
movq %rdi, 0x38(%rsp)
movl $0xf4240, %edi # imm = 0xF4240
callq 0xbd35
testq %rax, %rax
je 0x7819
movq %rax, %r12
movl $0xf4240, %r8d # imm = 0xF4240
movq %rbp, %rdi
xorl %esi, %esi
movl %ebx, %edx
movq %rax, %rcx
leaq 0x48(%rsp), %r9
callq 0xa1d3
movl %eax, %ebx
movl $0x0, %ebp
testl %eax, %eax
jne 0x7780
movq 0x48(%rsp), %rbp
cmpq %r13, %rbp
ja 0x7780
movq 0x40(%rsp), %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x5100
movl $0xf4240, %esi # imm = 0xF4240
movq %r12, %rdi
callq 0xba9a
movq %r12, %rdi
callq 0xba94
testl %ebx, %ebx
jne 0x781e
movq 0x50(%rsp), %rbx
cmpq $0x0, 0x8(%rbx)
movq 0xb8(%rsp), %r13
jne 0x77d2
movq %rbp, %rdi
callq 0xbd35
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x782b
movq %rax, %rdi
movq 0x40(%rsp), %rsi
movq %rbp, %rdx
callq 0x5100
movq %rbp, 0x10(%rbx)
movq 0x38(%rsp), %rdi
incq %rdi
xorl %ebx, %ebx
movq %r15, %r12
movq 0xb0(%rsp), %rax
cmpq %rax, %rdi
movq 0xa8(%rsp), %rdx
movl 0xa0(%rsp), %ecx
movl 0x98(%rsp), %esi
jne 0x766f
jmp 0x75dd
movl $0xfffffffe, %ebx # imm = 0xFFFFFFFE
jmp 0x75cf
movl $0xfffffffd, %ebx # imm = 0xFFFFFFFD
movq 0xb8(%rsp), %r13
jmp 0x75cf
movl $0xfffffffd, %ebx # imm = 0xFFFFFFFD
jmp 0x75cf
movl $0xfffffffd, %ebx # imm = 0xFFFFFFFD
xorl %r14d, %r14d
movq %r12, %r15
jmp 0x75cf
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
wally_descriptor_to_addresses | int wally_descriptor_to_addresses(
const char *descriptor,
const char **key_name_array,
const char **key_value_array,
size_t array_len,
uint32_t start_child_num,
uint32_t end_child_num,
uint32_t network,
uint32_t flags,
struct wally_descriptor_addresses *addresses)
{
int ret;
uint32_t child_num;
uint32_t num_items;
size_t index;
size_t addr_tbl_max = sizeof(g_network_address_table) / sizeof(struct address_script_t);
const struct address_script_t *addr_item = NULL;
struct wally_descriptor_address_item *address_items = NULL;
struct wally_descriptor_script_item *script_items = NULL;
if (!addresses || !descriptor || (start_child_num > end_child_num))
return WALLY_EINVAL;
if (network == WALLY_NETWORK_BITCOIN_REGTEST)
addr_item = &g_network_address_table[2];
else
for (index = 0; index < addr_tbl_max; ++index) {
if (network == (uint32_t)g_network_address_table[index].network) {
addr_item = &g_network_address_table[index];
break;
}
}
if (!addr_item)
return WALLY_EINVAL;
num_items = end_child_num - start_child_num + 1;
address_items = (struct wally_descriptor_address_item *) wally_malloc(sizeof(struct wally_descriptor_address_item) * num_items);
if (!address_items)
return WALLY_ENOMEM;
script_items = (struct wally_descriptor_script_item *) wally_malloc(sizeof(struct wally_descriptor_script_item) * num_items);
if (!script_items) {
wally_free((void *)address_items);
return WALLY_ENOMEM;
}
wally_bzero(address_items, sizeof(struct wally_descriptor_address_item) * num_items);
wally_bzero(script_items, sizeof(struct wally_descriptor_script_item) * num_items);
index = 0;
for (child_num = start_child_num; child_num <= end_child_num; ++child_num) {
script_items[index].child_num = child_num;
address_items[index].child_num = child_num;
++index;
}
ret = parse_miniscript(
descriptor,
key_name_array,
key_value_array,
array_len,
flags,
DESCRIPTOR_KIND_MINISCRIPT | DESCRIPTOR_KIND_DESCRIPTOR,
(!addr_item) ? NULL : &network,
0,
0,
script_items,
num_items,
NULL,
NULL);
if (ret == WALLY_OK) {
for (index = 0; index < num_items; ++index) {
ret = descriptor_scriptpubkey_to_address(addr_item,
script_items[index].script,
script_items[index].script_len,
&address_items[index].address);
if (ret != WALLY_OK)
break;
address_items[index].address_len = strlen(address_items[index].address);
}
}
if (ret == WALLY_OK) {
addresses->items = address_items;
addresses->num_items = num_items;
address_items = NULL;
}
if (script_items) {
for (index = 0; index < num_items; ++index) {
if (script_items[index].script) {
wally_bzero((char *)script_items[index].script, script_items[index].script_len);
wally_free(script_items[index].script);
}
}
wally_bzero((char *)script_items, sizeof(struct wally_descriptor_script_item) * num_items);
wally_free((void *)script_items);
}
if (address_items)
free_descriptor_address_item(address_items, num_items);
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %r12d
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
subl %r8d, %r12d
jb 0x7d6d
testq %rdi, %rdi
je 0x7d6d
cmpq $0x0, 0x80(%rsp)
je 0x7d6d
movl %r9d, %ebx
movl %r8d, %r15d
movl 0x70(%rsp), %eax
cmpl $0xff, %eax
jne 0x7bb9
movq %rdi, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x30(%rsp)
leaq 0x77b09(%rip), %r13 # 0x7f6c0
jmp 0x7bf3
xorl %r8d, %r8d
leaq 0x77add(%rip), %r13 # 0x7f6a0
movzbl (%r8,%r13), %r9d
cmpl %eax, %r9d
je 0x7bdc
addq $0x10, %r8
cmpq $0x50, %r8
jne 0x7bc3
jmp 0x7d6d
movq %rdi, 0x18(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x30(%rsp)
addq %r8, %r13
incl %r12d
leaq (,%r12,8), %rax
leaq (%rax,%rax,2), %rdi
movq %rdi, 0x10(%rsp)
callq 0xbd35
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
testq %rax, %rax
je 0x7d6d
movq %rax, %r14
movq %r12, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0xbd35
testq %rax, %rax
je 0x7caa
movq %rax, %r12
movq %r14, %rdi
movq 0x10(%rsp), %rbp
movq %rbp, %rsi
callq 0xba9a
movq %r12, %rdi
movq %rbp, %rsi
callq 0xba9a
xorl %eax, %eax
movl %r15d, (%r12,%rax)
movl %r15d, (%r14,%rax)
incl %r15d
addq $0x18, %rax
cmpl %ebx, %r15d
jbe 0x7c51
xorl %eax, %eax
leaq 0x70(%rsp), %r10
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rcx
movl 0x78(%rsp), %r8d
movl $0x3, %r9d
pushq $0x0
movq 0x10(%rsp), %rbx
pushq %rbx
pushq %r12
pushq %rax
pushq %rax
pushq %r10
callq 0x746e
addq $0x30, %rsp
testl %eax, %eax
je 0x7cb7
movl %eax, %ebp
jmp 0x7d12
movq %r14, %rdi
callq 0xba94
jmp 0x7d6d
testq %rbx, %rbx
je 0x7cf9
movq %r14, %rbx
addq $0x8, %rbx
xorl %r15d, %r15d
movq 0x8(%r12,%r15), %rsi
movq 0x10(%r12,%r15), %rdx
leaq (%rbx,%r15), %rcx
movq %r13, %rdi
callq 0x7a77
testl %eax, %eax
jne 0x7ca6
movq (%rbx,%r15), %rdi
callq 0x5070
movq %rax, 0x8(%rbx,%r15)
addq $0x18, %r15
cmpq %r15, 0x10(%rsp)
jne 0x7cc6
movq 0x80(%rsp), %rcx
movq %r14, (%rcx)
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rcx)
xorl %ebp, %ebp
xorl %r14d, %r14d
cmpq $0x0, 0x8(%rsp)
movq 0x10(%rsp), %r15
je 0x7d48
xorl %ebx, %ebx
movq 0x8(%r12,%rbx), %rdi
testq %rdi, %rdi
je 0x7d3f
movq 0x10(%r12,%rbx), %rsi
callq 0xba9a
movq 0x8(%r12,%rbx), %rdi
callq 0xba94
addq $0x18, %rbx
cmpq %rbx, %r15
jne 0x7d21
movq %r12, %rdi
movq %r15, %rsi
callq 0xba9a
movq %r12, %rdi
callq 0xba94
testq %r14, %r14
je 0x7d6d
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x7336
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
wally_descriptor_create_checksum | int wally_descriptor_create_checksum(
const char *descriptor,
const char **key_name_array,
const char **key_value_array,
size_t array_len,
uint32_t flags,
char **output)
{
int ret = WALLY_OK;
char checksum[9];
char *ignore_checksum_descriptor = NULL;
if (!descriptor || !output || flags)
return WALLY_EINVAL;
wally_bzero(checksum, sizeof(checksum));
ret = parse_miniscript(
descriptor,
key_name_array,
key_value_array,
array_len,
flags,
DESCRIPTOR_KIND_MINISCRIPT | DESCRIPTOR_KIND_DESCRIPTOR,
NULL,
0,
0,
NULL,
0,
NULL,
&ignore_checksum_descriptor);
if (ret != WALLY_OK)
return ret;
ret = generate_descriptor_checksum(ignore_checksum_descriptor, checksum);
if (ret == WALLY_OK) {
*output = wally_strdup(checksum);
if (*output == NULL)
ret = WALLY_ENOMEM;
}
wally_free_string(ignore_checksum_descriptor);
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq $0x0, 0x30(%rsp)
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
testl %r8d, %r8d
jne 0x7e57
movq %rdi, %r13
testq %rdi, %rdi
je 0x7e57
movq %r9, %rbx
testq %r9, %r9
je 0x7e57
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
leaq 0x3f(%rsp), %rdi
movl $0x9, %esi
callq 0xba9a
leaq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
xorl %eax, %eax
movl %eax, 0x10(%rsp)
movl %eax, 0x8(%rsp)
movq $0x0, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
movl $0x3, %r9d
callq 0x746e
movl %eax, %ebp
testl %eax, %eax
jne 0x7e57
movq 0x30(%rsp), %r14
leaq 0x3f(%rsp), %rsi
movq %r14, %rdi
callq 0x7e68
movl %eax, %ebp
testl %eax, %eax
jne 0x7e4f
leaq 0x3f(%rsp), %rdi
callq 0xbd67
movq %rax, (%rbx)
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
leal (%rcx,%rcx,2), %ebp
addl $-0x3, %ebp
movq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0xba5e
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
generate_descriptor_checksum | static int generate_descriptor_checksum(const char *descriptor, char *checksum)
{
/*
* base:
* bitcoin/src/script/descriptor.cpp
* std::string DescriptorChecksum(const Span<const char>& span)
*/
/** A character set designed such that:
* - The most common 'unprotected' descriptor characters (hex, keypaths) are in the first group of 32.
* - Case errors cause an offset that's a multiple of 32.
* - As many alphabetic characters are in the same group (while following the above restrictions).
*
* If p(x) gives the position of a character c in this character set, every group of 3 characters
* (a,b,c) is encoded as the 4 symbols (p(a) & 31, p(b) & 31, p(c) & 31, (p(a) / 32) + 3 * (p(b) / 32) + 9 * (p(c) / 32).
* This means that changes that only affect the lower 5 bits of the position, or only the higher 2 bits, will just
* affect a single symbol.
*
* As a result, within-group-of-32 errors count as 1 symbol, as do cross-group errors that don't affect
* the position within the groups.
*/
static const char *input_charset =
"0123456789()[],'/*abcdefgh@:$%{}"
"IJKLMNOPQRSTUVWXYZ&+-.;<=>?!^_|~"
"ijklmnopqrstuvwxyzABCDEFGH`#\"\\ ";
/* The character set for the checksum itself (same as bech32). */
static const char *checksum_charset =
"qpzry9x8gf2tvdw0s3jn54khce6mua7l";
uint64_t c = 1;
int cls = 0;
int clscount = 0;
int j;
char ch;
size_t pos;
size_t max = strlen(input_charset);
size_t idx;
for (idx = 0; idx < strlen(descriptor); ++idx) {
ch = descriptor[idx];
for (pos = 0; pos < max; ++pos) {
if (ch == input_charset[pos])
break;
}
if (pos == max)
return WALLY_EINVAL;
/* Emit a symbol for the position inside the group, for every character. */
c = poly_mod_descriptor_checksum(c, pos & 31);
/* Accumulate the group numbers */
cls = cls * 3 + (int)(pos >> 5);
if (++clscount == 3) {
/* Emit an extra symbol representing the group numbers, for every 3 characters. */
c = poly_mod_descriptor_checksum(c, cls);
cls = 0;
clscount = 0;
}
}
if (clscount > 0)
c = poly_mod_descriptor_checksum(c, cls);
for (j = 0; j < 8; ++j)
c = poly_mod_descriptor_checksum(c, 0);
c ^= 1;
for (j = 0; j < DESCRIPTOR_CHECKSUM_LENGTH; ++j)
checksum[j] = checksum_charset[(c >> (5 * (7 - j))) & 31];
return WALLY_OK;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5070
testq %rax, %rax
je 0x7f3c
movq %rax, %rdx
xorl %r13d, %r13d
movl $0x1, %eax
leaq 0x5b29b(%rip), %rbp # 0x63137
xorl %ecx, %ecx
xorl %r15d, %r15d
movl %ecx, %esi
movb (%r14,%r13), %cl
xorl %r12d, %r12d
cmpb (%r12,%rbp), %cl
je 0x7ebb
incq %r12
cmpq $0x5f, %r12
jne 0x7eaa
jmp 0x7f35
movq %r14, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, %r14
movl %r12d, %esi
andl $0x1f, %esi
movq %rax, %rdi
callq 0xb7e8
leal (%r15,%r15,2), %ecx
shrq $0x5, %r12
movl %r12d, %r15d
addl %ecx, %r15d
leal 0x1(%r14), %ecx
cmpl $0x3, %ecx
je 0x7f07
movq %r14, %rsi
incq %r13
movq 0x10(%rsp), %rdx
cmpq %rdx, %r13
movq 0x8(%rsp), %r14
jne 0x7ea1
jmp 0x7f92
movq %rax, %rdi
movl %r15d, %esi
callq 0xb7e8
incq %r13
movl $0x0, %ecx
movl $0x0, %r15d
movq 0x10(%rsp), %rdx
cmpq %rdx, %r13
movq 0x8(%rsp), %r14
jne 0x7ea1
jmp 0x7f41
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
jmp 0x7f83
movl $0x1, %eax
movl $0x8, %ebp
movq %rax, %rdi
xorl %esi, %esi
callq 0xb7e8
decl %ebp
jne 0x7f46
xorq $0x1, %rax
movl $0x23, %ecx
leaq 0x5b233(%rip), %rdx # 0x63197
movq %rax, %rsi
shrq %cl, %rsi
andl $0x1f, %esi
movb (%rsi,%rdx), %sil
movb %sil, (%rbx)
addq $-0x5, %rcx
incq %rbx
cmpq $-0x5, %rcx
jne 0x7f64
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %esi, %esi
js 0x7f41
movq %rax, %rdi
movl %r15d, %esi
callq 0xb7e8
jmp 0x7f41
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
analyze_miniscript | static int analyze_miniscript(
const char *miniscript,
const char **key_name_array,
const char **key_value_array,
size_t array_len,
uint32_t target,
uint32_t *network,
uint32_t flags,
struct miniscript_node_t *prev_node,
struct miniscript_node_t *parent_node,
struct miniscript_node_t **generate_node,
char **script_ignore_checksum)
{
int ret = WALLY_OK;
char *sub_str = NULL;
size_t index;
size_t str_len;
size_t sub_str_len = 0;
size_t offset = 0;
size_t child_offset = 0;
uint32_t indent = 0;
bool collect_child = false;
bool exist_indent = false;
bool copy_child = false;
char buffer[64];
char checksum[12];
char work_checksum[12];
size_t checksum_len = 0;
size_t checksum_index = 0;
struct miniscript_node_t *node;
struct miniscript_node_t *child = NULL;
struct miniscript_node_t *prev_child = NULL;
str_len = strlen(miniscript);
node = (struct miniscript_node_t *) wally_malloc(sizeof(struct miniscript_node_t));
if (!node)
return WALLY_ENOMEM;
wally_bzero(node, sizeof(struct miniscript_node_t));
wally_bzero(buffer, sizeof(buffer));
wally_bzero(checksum, sizeof(checksum));
wally_bzero(work_checksum, sizeof(work_checksum));
if (parent_node)
node->parent = parent_node;
for (index = 0; index < str_len; ++index) {
if (!node->info && (miniscript[index] == ':')) {
if (index - offset > sizeof(node->wrapper_str)) {
ret = WALLY_EINVAL;
break;
}
memcpy(node->wrapper_str, &miniscript[offset], index - offset);
offset = index + 1;
} else if (miniscript[index] == '(') {
if (!node->info && (indent == 0)) {
collect_child = true;
memcpy(buffer, &miniscript[offset], index - offset);
node->info = search_miniscript_info(buffer, target);
if (!node->info) {
ret = WALLY_EINVAL;
break;
} else if ((node->wrapper_str[0] != '\0') &&
((node->info->kind & DESCRIPTOR_KIND_MINISCRIPT) == 0)) {
ret = WALLY_EINVAL;
break;
}
offset = index + 1;
child_offset = offset;
}
++indent;
exist_indent = true;
} else if (miniscript[index] == ')') {
if (indent) {
--indent;
if (collect_child && (indent == 0)) {
collect_child = false;
offset = index + 1;
copy_child = true;
}
}
exist_indent = true;
} else if (miniscript[index] == ',') {
if (collect_child && (indent == 1)) {
copy_child = true;
}
exist_indent = true;
} else if (miniscript[index] == '#') {
if (!parent_node && node->info && !collect_child && (indent == 0)) {
checksum_index = index;
checksum_len = strlen(&miniscript[index + 1]);
if (sizeof(checksum) > checksum_len) {
memcpy(checksum, &miniscript[index + 1], checksum_len);
} else {
ret = WALLY_EINVAL;
}
break; /* end */
}
}
if (copy_child) {
ret = realloc_substr_buffer(index - child_offset, &sub_str, &sub_str_len);
if (ret != WALLY_OK)
break;
memcpy(sub_str, &miniscript[child_offset], index - child_offset);
sub_str[index - child_offset] = '\0';
ret = analyze_miniscript(sub_str,
key_name_array,
key_value_array,
array_len,
target,
network,
flags,
prev_child,
node,
&child,
NULL);
if (ret != WALLY_OK)
break;
prev_child = child;
child = NULL;
copy_child = false;
if (miniscript[index] == ',') {
offset = index + 1;
child_offset = offset;
}
}
}
if ((ret == WALLY_OK) && !exist_indent)
ret = analyze_miniscript_value(miniscript,
key_name_array,
key_value_array,
array_len,
network,
flags,
node,
parent_node);
if ((ret == WALLY_OK) && node->info && (node->info->kind & DESCRIPTOR_KIND_MINISCRIPT) &&
(node->wrapper_str[0] != '\0')) {
node->wrapper = convert_miniscript_wrapper_flag(node->wrapper_str);
}
if ((ret == WALLY_OK) && node->info && node->info->verify_function)
ret = node->info->verify_function(node, parent_node);
if ((ret == WALLY_OK) && !parent_node && checksum_index) {
/* check checksum */
ret = realloc_substr_buffer(checksum_index + 1, &sub_str, &sub_str_len);
if (ret == WALLY_OK) {
memcpy(sub_str, miniscript, checksum_index);
sub_str[checksum_index] = '\0';
if (script_ignore_checksum)
*script_ignore_checksum = wally_strdup(sub_str);
ret = generate_descriptor_checksum(sub_str, work_checksum);
if ((ret == WALLY_OK) && (memcmp(checksum, work_checksum, DESCRIPTOR_CHECKSUM_LENGTH) != 0)) {
ret = WALLY_EINVAL;
}
}
}
if ((ret == WALLY_OK) && !parent_node && script_ignore_checksum) {
if (!checksum_index)
*script_ignore_checksum = wally_strdup(miniscript);
if (*script_ignore_checksum == NULL)
ret = WALLY_ENOMEM;
}
if ((ret == WALLY_OK) && node->wrapper) {
const struct miniscript_wrapper_item_t *item = NULL;
size_t len;
size_t table_idx;
size_t max;
/* back from wrapper string */
max = sizeof(miniscript_wrapper_table) / sizeof(struct miniscript_item_t);
len = strlen(node->wrapper_str);
for (index = len; index > 0; --index) {
item = NULL;
for (table_idx = 0; table_idx < max; ++table_idx) {
if (miniscript_wrapper_table[table_idx].name[0] == node->wrapper_str[index - 1]) {
item = &miniscript_wrapper_table[table_idx];
break;
}
}
if (!item) {
ret = WALLY_EINVAL;
break;
}
ret = item->verify_function(node, NULL);
if (ret != WALLY_OK)
break;
}
if (ret == WALLY_OK)
ret = check_type_properties(node->type_properties);
}
if (ret == WALLY_OK) {
*generate_node = node;
if (parent_node && !parent_node->child)
parent_node->child = node;
if (prev_node) {
node->chain_count = prev_node->chain_count + 1;
node->back = prev_node;
prev_node->next = node;
} else {
node->chain_count = 1;
}
} else {
free_miniscript_node(node);
}
if (sub_str)
wally_bzero(sub_str, sub_str_len);
wally_free(sub_str);
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp # imm = 0x288
movq %r9, %rbx
movl %r8d, %r15d
movq %rcx, 0x48(%rsp)
movq %rdx, %r14
movq %rsi, 0x78(%rsp)
movq %rdi, %r13
xorl %eax, %eax
movq %rax, 0x38(%rsp)
movq %rax, 0x58(%rsp)
movq %rax, 0x50(%rsp)
callq 0x5070
movq %rax, 0x8(%rsp)
movl $0x80, %edi
callq 0xbd35
movq %rax, (%rsp)
testq %rax, %rax
je 0x8365
movq %r14, 0x68(%rsp)
movl %r15d, 0x2c(%rsp)
movq 0x2d0(%rsp), %r12
movl $0x80, %esi
movq (%rsp), %rdi
callq 0xba9a
leaq 0x130(%rsp), %rdi
movl $0x40, %esi
callq 0xba9a
leaq 0x9c(%rsp), %rdi
movl $0xc, %esi
callq 0xba9a
leaq 0x90(%rsp), %rdi
movl $0xc, %esi
callq 0xba9a
testq %r12, %r12
je 0x805f
movq (%rsp), %rax
movq %r12, 0x20(%rax)
cmpq $0x0, 0x8(%rsp)
movq %r13, 0x18(%rsp)
je 0x839c
movq %rbx, 0x40(%rsp)
movq (%rsp), %rax
addq $0x2c, %rax
movq %rax, 0x88(%rsp)
movq $0x0, 0x70(%rsp)
xorl %r15d, %r15d
movq $0x0, 0x20(%rsp)
movl $0x0, 0x14(%rsp)
xorl %r14d, %r14d
xorl %esi, %esi
xorl %ebx, %ebx
movl 0x2c(%rsp), %r12d
movq (%rsp), %rax
movq (%rax), %rax
movb (%r13,%r15), %cl
testq %rax, %rax
jne 0x8106
cmpb $0x3a, %cl
jne 0x8106
movq %r15, %rdx
subq %rbx, %rdx
cmpq $0xc, %rdx
ja 0x8415
addq %r13, %rbx
movq 0x88(%rsp), %rdi
movl %r14d, %ebp
movq %rsi, %r14
movq %rbx, %rsi
callq 0x5100
movq %r14, %rsi
movl %ebp, %r14d
leaq 0x1(%r15), %rbx
incq %r15
cmpq 0x8(%rsp), %r15
jne 0x80ae
jmp 0x8380
movzbl %cl, %edx
cmpl $0x2c, %edx
je 0x81eb
cmpl $0x29, %edx
je 0x81b4
cmpl $0x28, %edx
jne 0x82eb
testq %rax, %rax
sete %al
testl %r14d, %r14d
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x8356
leaq (%rbx,%r13), %rsi
movq %r15, %rdx
subq %rbx, %rdx
leaq 0x130(%rsp), %rbx
movq %rbx, %rdi
callq 0x5100
movq %rbx, %rdi
callq 0x5070
leaq 0x7771c(%rip), %rcx # 0x7f880
movq %rax, %rbx
incq %rbx
xorl %r13d, %r13d
movl 0x8(%r13,%rcx), %ebp
testl %r12d, %ebp
je 0x81a2
leaq 0x77702(%rip), %rax # 0x7f880
movq (%r13,%rax), %rsi
leaq 0x130(%rsp), %rdi
movq %rbx, %rdx
callq 0x5120
leaq 0x776e6(%rip), %rcx # 0x7f880
testl %eax, %eax
je 0x832b
addq $0x28, %r13
cmpq $0x438, %r13 # imm = 0x438
jne 0x816d
jmp 0x8370
movb $0x1, %al
movq %rax, 0x20(%rsp)
testl %r14d, %r14d
je 0x8323
decl %r14d
testb $0x1, 0x14(%rsp)
je 0x80f7
testl %r14d, %r14d
jne 0x80f7
leaq 0x1(%r15), %rbx
movl $0x0, 0x14(%rsp)
xorl %ebp, %ebp
jmp 0x8208
cmpl $0x1, %r14d
sete %al
movb $0x1, %cl
movq %rcx, 0x20(%rsp)
movl $0x1, %ebp
testb %al, 0x14(%rsp)
je 0x80f7
movq %r15, %r12
subq %rsi, %r12
movq %r12, %rdi
movq %rsi, %r14
leaq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x8e12
testl %eax, %eax
jne 0x8b96
movl %ebp, 0x64(%rsp)
movq %r15, 0x20(%rsp)
movq 0x38(%rsp), %r13
movq (%rsp), %r15
movq 0x18(%rsp), %rbp
leaq (%r14,%rbp), %rsi
movq %r13, %rdi
movq %r12, %rdx
callq 0x5100
movb $0x0, (%r13,%r12)
subq $0x8, %rsp
movq %r13, %rdi
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x50(%rsp), %rcx
movl 0x34(%rsp), %r8d
movq 0x48(%rsp), %r9
pushq $0x0
leaq 0x60(%rsp), %rax
pushq %rax
pushq %r15
pushq 0x90(%rsp)
movl 0x2e8(%rsp), %eax
pushq %rax
callq 0x7fa3
addq $0x30, %rsp
testl %eax, %eax
jne 0x8b96
movq 0x50(%rsp), %rax
movq %rax, 0x70(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x20(%rsp), %rax
cmpb $0x2c, (%rbp,%rax)
leaq 0x1(%rax), %r15
cmoveq %r15, %rbx
cmoveq %r15, %r14
movb $0x1, %al
movq %rax, 0x20(%rsp)
movl 0x64(%rsp), %eax
movq %rbp, %r13
movl 0x2c(%rsp), %r12d
movq %r14, %rsi
movl %eax, %r14d
jmp 0x80fa
cmpq $0x0, 0x2d0(%rsp)
jne 0x80f7
cmpb $0x23, %cl
jne 0x80f7
testq %rax, %rax
sete %al
testl %r14d, %r14d
setne %cl
orb 0x14(%rsp), %cl
orb %al, %cl
testb $0x1, %cl
jne 0x80f7
jmp 0x875e
xorl %r14d, %r14d
jmp 0x80f7
addq %rcx, %r13
movq (%rsp), %rax
movq %r13, (%rax)
cmpb $0x0, 0x2c(%rax)
je 0x8344
andl $0x1, %ebp
je 0x8415
leaq 0x1(%r15), %rbx
movb $0x1, %al
movl %eax, 0x14(%rsp)
movq %rbx, %rsi
movq 0x18(%rsp), %r13
incl %r14d
movb $0x1, %al
movq %rax, 0x20(%rsp)
jmp 0x80f7
movl $0xfffffffd, %r13d # imm = 0xFFFFFFFD
jmp 0x8bc9
movq (%rsp), %rax
movq $0x0, (%rax)
jmp 0x8415
testb $0x1, 0x20(%rsp)
movq 0x2d0(%rsp), %r12
movq 0x40(%rsp), %rbx
je 0x839c
xorl %r15d, %r15d
jmp 0x89c7
movq $0x0, 0x80(%rsp)
testq %r12, %r12
je 0x83cf
movq %r13, %rax
movl $0xfffffffe, %r13d # imm = 0xFFFFFFFE
testq %rax, %rax
je 0x8ba1
cmpq $0x0, (%r12)
je 0x8ba1
xorl %r12d, %r12d
jmp 0x83d7
testq %r13, %r13
je 0x8415
movb $0x1, %r12b
xorl %r15d, %r15d
movl $0xfffffffe, %r13d # imm = 0xFFFFFFFE
movq 0x18(%rsp), %rax
cmpb $0x0, (%rax)
je 0x8ba1
testq %rbx, %rbx
je 0x8420
movl (%rbx), %ecx
xorl %eax, %eax
leaq 0x772a2(%rip), %rsi # 0x7f6a0
movzbl (%rax,%rsi), %edx
cmpl %edx, %ecx
je 0x842b
addq $0x10, %rax
cmpq $0x50, %rax
jne 0x83fe
jmp 0x8ba1
movl $0xfffffffe, %r13d # imm = 0xFFFFFFFE
jmp 0x8ba1
movq $0x0, 0x8(%rsp)
jmp 0x8433
addq %rax, %rsi
movq %rsi, 0x8(%rsp)
movq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x5070
movq %rax, %rbx
testb %r12b, %r12b
jne 0x8491
movq 0x2d0(%rsp), %rax
movq (%rax), %rax
cmpl $0x40002, 0x8(%rax) # imm = 0x40002
jne 0x8491
subq $0x8, %rsp
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq 0x2d8(%rsp), %r12
movq %r12, %rdx
movq 0x10(%rsp), %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x0
callq 0xa748
addq $0x10, %rsp
movl %eax, %r13d
jmp 0x89be
cmpq $0x0, 0x48(%rsp)
je 0x84fe
movq %rbx, %r14
incq %r14
xorl %r13d, %r13d
movq 0x78(%rsp), %rax
movq (%rax,%r13,8), %rsi
movq 0x18(%rsp), %rdi
movq %r14, %rdx
callq 0x5050
testl %eax, %eax
je 0x84c8
incq %r13
cmpq %r13, 0x48(%rsp)
jne 0x84a2
jmp 0x84f9
movq 0x68(%rsp), %rax
movq (%rax,%r13,8), %rdi
callq 0xbd67
movq (%rsp), %rcx
movq %rax, 0x50(%rcx)
testq %rax, %rax
je 0x8b9b
movq %rax, %rdi
callq 0x5070
movq %rax, %rbx
movq (%rsp), %rax
movl %ebx, 0x68(%rax)
movq 0x18(%rsp), %r14
movq (%rsp), %rax
movq 0x50(%rax), %rdi
testq %rdi, %rdi
jne 0x8521
movq %r14, %rdi
callq 0xbd67
movq %rax, %rdi
movq (%rsp), %rax
movq %rdi, 0x50(%rax)
movl %ebx, 0x68(%rax)
testb %r12b, %r12b
je 0x86aa
leaq 0x80(%rsp), %rbx
movq %rbx, %rsi
movl $0xa, %edx
callq 0x50d0
movq (%rsp), %rcx
movq %rax, 0x48(%rcx)
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x86d6
cmpb $0x0, (%rcx)
je 0x86d6
movq (%rsp), %rax
movq 0x50(%rax), %rdi
callq 0x5070
movq %rax, %rbx
testb %r12b, %r12b
jne 0x8583
movq 0x2d0(%rsp), %rax
cmpq $0x0, (%rax)
je 0x87bc
leaq 0x170(%rsp), %rdi
movl $0xc0, %esi
callq 0xba9a
movq (%rsp), %rax
movq 0x50(%rax), %r12
cmpb $0x5b, (%r12)
jne 0x862b
movq %r12, %rdi
movl $0x5d, %esi
callq 0x5080
testq %rax, %rax
je 0x87bc
movq %rax, %r14
movq %rax, %r13
subq %r12, %r13
leal 0x2(%r13), %eax
movslq %eax, %rdi
callq 0xbd35
movq (%rsp), %rcx
movq %rax, 0x60(%rcx)
testq %rax, %rax
je 0x89b0
incl %r13d
movq (%rsp), %rbp
movq 0x50(%rbp), %rsi
movslq %r13d, %r12
movq %rax, %rdi
movq %r12, %rdx
callq 0x5100
movq 0x60(%rbp), %rax
movq %rbp, %r13
xorl %ebp, %ebp
movb %bpl, (%rax,%r12)
movl %r12d, 0x70(%r13)
movq 0x50(%r13), %rdi
incq %r14
subq %r12, %rbx
movq %r14, %rsi
movq %rbx, %rdx
callq 0x5130
movq 0x50(%r13), %rax
movb %bpl, (%rax,%rbx)
movl 0x2c0(%rsp), %eax
testb $0x1, %al
jne 0x87c7
cmpq $0x82, %rbx
movq 0x2d0(%rsp), %r12
je 0x8655
cmpq $0x42, %rbx
jne 0x87fc
movq (%rsp), %rax
movq 0x50(%rax), %rdi
leaq 0xe0(%rsp), %rsi
leaq 0x30(%rsp), %rcx
movl $0x41, %edx
callq 0xb8d5
testl %eax, %eax
jne 0x87fc
movq (%rsp), %rax
movl $0x1020, 0x38(%rax) # imm = 0x1020
cmpq $0x82, %rbx
jne 0x8698
movq (%rsp), %rax
movb $0x1, 0x79(%rax)
movq 0x30(%rsp), %rsi
leaq 0xe0(%rsp), %rdi
jmp 0x8cc8
movq 0x2d0(%rsp), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
cmpl $0x50000, %eax # imm = 0x50000
jle 0x8701
leal -0x50001(%rax), %ecx
cmpl $0x2, %ecx
jb 0x8713
cmpl $0x60001, %eax # imm = 0x60001
je 0x8713
jmp 0x852a
movq (%rsp), %rdx
movl $0x8, 0x38(%rdx)
testq %rax, %rax
movl $0x3b901, %eax # imm = 0x3B901
movl $0x35101, %ecx # imm = 0x35101
cmovel %eax, %ecx
movl %ecx, 0x3c(%rdx)
movq 0x2d0(%rsp), %r12
jmp 0x89c7
cmpl $0x30001, %eax # imm = 0x30001
je 0x8713
cmpl $0x40001, %eax # imm = 0x40001
jne 0x852a
callq 0xbd67
testq %rax, %rax
je 0x8b9b
movq %rax, %r14
movq (%rsp), %rax
movq 0x50(%rax), %rdi
leaq 0xa8(%rsp), %rcx
movq %r14, %rsi
movq %rbx, %rdx
callq 0xb8d5
movl %eax, %r13d
testl %eax, %eax
jne 0x8751
movq (%rsp), %rax
movl $0x4, 0x38(%rax)
movq %r14, %rdi
callq 0xba5e
jmp 0x89b6
leaq (%r15,%r13), %rbx
incq %rbx
movq %rbx, %rdi
callq 0x5070
movl $0xfffffffe, %r13d # imm = 0xFFFFFFFE
cmpq $0xc, %rax
movq 0x2d0(%rsp), %r12
jae 0x8ba1
leaq 0x9c(%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x5100
testb $0x1, 0x20(%rsp)
jne 0x89c7
movq $0x0, 0x80(%rsp)
movb $0x1, %r12b
movq 0x40(%rsp), %rbx
jmp 0x83da
movl $0xfffffffe, %r13d # imm = 0xFFFFFFFE
jmp 0x89b6
cmpq $0x40, %rbx
movq 0x2d0(%rsp), %r12
jne 0x87fc
movq (%rsp), %rax
movq 0x50(%rax), %rdi
leaq 0xe0(%rsp), %rsi
leaq 0x30(%rsp), %rcx
movl $0x41, %edx
callq 0xb8d5
testl %eax, %eax
je 0x8c8c
movq (%rsp), %rax
movq 0x50(%rax), %rdi
leaq 0xb0(%rsp), %rdx
leaq 0x30(%rsp), %rbx
movl $0x26, %ecx
movl $0x1, %esi
movq %rbx, %r8
callq 0x58e81
testl %eax, %eax
sete %cl
movq (%rbx), %rax
cmpq $0x23, %rax
setb %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x888c
movq 0x8(%rsp), %rcx
testq %rcx, %rcx
je 0x8859
movb 0x3(%rcx), %cl
movl $0xfffffffe, %r13d # imm = 0xFFFFFFFE
cmpb 0xb0(%rsp), %cl
jne 0x89be
cmpq $0x21, %rax
jne 0x8c39
movq (%rsp), %rax
movl $0x2020, 0x38(%rax) # imm = 0x2020
movb $0x1, 0x79(%rax)
movl $0xfffffffe, %r13d # imm = 0xFFFFFFFE
movl 0x2c0(%rsp), %eax
testb $0x1, %al
je 0x8c75
jmp 0x89be
movq (%rsp), %rax
movq 0x50(%rax), %rdi
movl $0x2f, %esi
callq 0x5080
testq %rax, %rax
je 0x88fc
movq %rax, %rbx
movl $0xfffffffe, %r13d # imm = 0xFFFFFFFE
cmpb $0x2f, 0x1(%rax)
je 0x89be
movq %rbx, %rdi
callq 0xbd67
movq (%rsp), %rcx
movq %rax, 0x58(%rcx)
testq %rax, %rax
je 0x8cd2
movq %rax, %rdi
callq 0x5070
movq (%rsp), %rcx
movl %eax, 0x6c(%rcx)
movb $0x0, (%rbx)
movq 0x58(%rcx), %rdi
movl $0x2a, %esi
callq 0x5080
testq %rax, %rax
je 0x88fc
movq (%rsp), %rax
movb $0x1, 0x78(%rax)
movq (%rsp), %rax
movq 0x50(%rax), %rdi
leaq 0x230(%rsp), %rdx
leaq 0x30(%rsp), %r8
movl $0x52, %ecx
movl $0x1, %esi
callq 0x58e81
testl %eax, %eax
jne 0x8489
movq 0x30(%rsp), %rsi
movl $0xfffffffe, %r13d # imm = 0xFFFFFFFE
cmpq $0x52, %rsi
ja 0x89be
leaq 0x230(%rsp), %rdi
leaq 0x170(%rsp), %rdx
callq 0x59375
testl %eax, %eax
jne 0x8489
movq %r15, %rsi
movq %r12, %rdx
movb 0x1af(%rsp), %al
testb %al, %al
je 0x8cdd
movq (%rsp), %rcx
movl $0x24020, 0x38(%rcx) # imm = 0x24020
cmpl $0x488b21e, 0x1e8(%rsp) # imm = 0x488B21E
jne 0x8cf9
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8d18
movq %rdx, %r12
movq %rsi, %r15
movzbl (%rdi), %ecx
orl $0x2, %ecx
cmpl $0x3, %ecx
je 0x8d18
jmp 0x89be
movl $0xfffffffd, %r13d # imm = 0xFFFFFFFD
movq 0x2d0(%rsp), %r12
testl %r13d, %r13d
jne 0x8ba1
movq (%rsp), %rax
movq (%rax), %rcx
xorl %r13d, %r13d
testq %rcx, %rcx
je 0x8a51
testb $0x1, 0x8(%rcx)
je 0x8a3c
movq (%rsp), %rax
cmpb $0x0, 0x2c(%rax)
je 0x8a3c
movq %rcx, 0x8(%rsp)
movq (%rsp), %rax
leaq 0x2c(%rax), %rbx
xorl %ebp, %ebp
movl $0x8, %r12d
leaq 0x76cee(%rip), %r14 # 0x7f6f0
movq -0x8(%r12,%r14), %rax
movsbl (%rax), %esi
movq %rbx, %rdi
callq 0x5080
testq %rax, %rax
je 0x8a1b
orl (%r12,%r14), %ebp
addq $0x28, %r12
cmpq $0x198, %r12 # imm = 0x198
jne 0x8a02
movq (%rsp), %rax
movl %ebp, 0x40(%rax)
movq 0x2d0(%rsp), %r12
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rax
testq %rax, %rax
je 0x8a51
movq (%rsp), %rdi
movq %r12, %rsi
callq *%rax
movl %eax, %r13d
movq 0x2e0(%rsp), %r14
testq %r15, %r15
je 0x8ae6
testq %r12, %r12
jne 0x8ae6
testl %r13d, %r13d
jne 0x8ae6
leaq 0x1(%r15), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x8e12
testl %eax, %eax
jne 0x8b96
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movq %r15, %rdx
callq 0x5100
movb $0x0, (%rbx,%r15)
testq %r14, %r14
je 0x8ab1
movq %rbx, %rdi
callq 0xbd67
movq %rax, (%r14)
leaq 0x90(%rsp), %rsi
movq %rbx, %rdi
callq 0x7e68
testl %eax, %eax
jne 0x8b96
movq 0x9c(%rsp), %rax
xorl %ecx, %ecx
cmpq 0x90(%rsp), %rax
sete %cl
leal -0x2(,%rcx,2), %r13d
testq %r12, %r12
jne 0x8aff
testq %r14, %r14
je 0x8aff
testl %r13d, %r13d
jne 0x8aff
testq %r15, %r15
je 0x8b0a
movq (%r14), %rax
jmp 0x8b17
testl %r13d, %r13d
jne 0x8ba1
jmp 0x8b1c
movq 0x18(%rsp), %rdi
callq 0xbd67
movq %rax, (%r14)
testq %rax, %rax
je 0x8b9b
movq (%rsp), %rax
cmpl $0x0, 0x40(%rax)
je 0x8bde
movq (%rsp), %rbx
addq $0x2c, %rbx
movq %rbx, %rdi
callq 0x5070
testq %rax, %rax
je 0x8b86
movq %rax, %r14
leaq 0x76ba7(%rip), %r15 # 0x7f6f0
movb -0x1(%rbx,%r14), %cl
decq %r14
movl $0x18, %eax
movq -0x18(%rax,%r15), %rdx
cmpb %cl, (%rdx)
je 0x8b73
addq $0x28, %rax
movl $0xfffffffe, %r13d # imm = 0xFFFFFFFE
cmpq $0x1a8, %rax # imm = 0x1A8
jne 0x8b56
jmp 0x8ba1
movq (%rsp), %rdi
xorl %esi, %esi
callq *(%rax,%r15)
testl %eax, %eax
jne 0x8b96
testq %r14, %r14
jne 0x8b49
movq (%rsp), %rax
movl 0x3c(%rax), %edi
callq 0x7244
testl %eax, %eax
je 0x8bde
movl %eax, %r13d
jmp 0x8ba1
movl $0xfffffffd, %r13d # imm = 0xFFFFFFFD
movq (%rsp), %rdi
callq 0x8d6e
movq 0x38(%rsp), %rbx
testq %rbx, %rbx
je 0x8bc1
movq 0x58(%rsp), %rsi
movq %rbx, %rdi
callq 0xba9a
movq %rbx, %rdi
callq 0xba94
movl %r13d, %eax
addq $0x288, %rsp # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2d8(%rsp), %rcx
movq 0x2c8(%rsp), %rax
movq (%rsp), %rdx
movq %rdx, (%rcx)
testq %r12, %r12
je 0x8c0b
cmpq $0x0, 0x18(%r12)
jne 0x8c0b
movq (%rsp), %rcx
movq %rcx, 0x18(%r12)
testq %rax, %rax
je 0x8c26
movl 0x28(%rax), %ecx
incl %ecx
movq (%rsp), %rdx
movl %ecx, 0x28(%rdx)
movq %rax, 0x10(%rdx)
movq %rdx, 0x8(%rax)
jmp 0x8c31
movq (%rsp), %rax
movl $0x1, 0x28(%rax)
xorl %r13d, %r13d
jmp 0x8baa
movl $0xfffffffe, %r13d # imm = 0xFFFFFFFE
cmpq $0x22, %rax
jne 0x89be
cmpb $0x1, 0xd1(%rsp)
jne 0x89be
movq (%rsp), %rax
movl $0x2020, 0x38(%rax) # imm = 0x2020
movl 0x2c0(%rsp), %eax
testb $0x1, %al
je 0x8c75
movq (%rsp), %rax
movb $0x1, 0x7a(%rax)
leaq 0xb1(%rsp), %rdi
movl $0x20, %esi
callq 0xdd74
jmp 0x8489
movq (%rsp), %rax
movl $0x1020, 0x38(%rax) # imm = 0x1020
movb $0x1, 0x7a(%rax)
leaq 0xe1(%rsp), %rdi
movq 0x30(%rsp), %rbx
leaq 0xe0(%rsp), %r14
movq %r14, %rsi
movq %rbx, %rdx
callq 0x5130
movb $0x2, (%r14)
incq %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xddc8
jmp 0x8489
movl $0xfffffffd, %r13d # imm = 0xFFFFFFFD
jmp 0x89be
movq (%rsp), %rcx
movl $0x14020, 0x38(%rcx) # imm = 0x14020
cmpl $0x488ade4, 0x1e8(%rsp) # imm = 0x488ADE4
je 0x898b
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8d18
movq %rdx, %r12
movq %rsi, %r15
movzbl (%rdi), %ecx
orl $0x2, %ecx
cmpl $0x3, %ecx
je 0x89be
movl 0x2c0(%rsp), %ecx
testb $0x1, %cl
je 0x8d2c
movq (%rsp), %rcx
movb $0x1, 0x7a(%rcx)
movq (%rsp), %rcx
movq 0x58(%rcx), %rdi
xorl %r13d, %r13d
testq %rdi, %rdi
je 0x8d63
cmpb $0x0, (%rdi)
movq %rdx, %r12
movq %rsi, %r15
je 0x89be
xorl %edx, %edx
testb %al, %al
sete %dl
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xa9ed
jmp 0x8489
movq %rdx, %r12
movq %rsi, %r15
jmp 0x89be
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
free_miniscript_node | static void free_miniscript_node(struct miniscript_node_t *node)
{
if (!node)
return;
if (node->child) {
struct miniscript_node_t *child = node->child;
struct miniscript_node_t *next;
while (child) {
next = child->next;
free_miniscript_node(child);
child = next;
}
}
if (node->data && node->data_size) {
wally_bzero(node->data, node->data_size);
wally_free(node->data);
}
if (node->derive_path && node->derive_path_len) {
wally_bzero(node->derive_path, node->derive_path_len);
wally_free(node->derive_path);
}
if (node->key_origin_info && node->key_origin_info_len) {
wally_bzero(node->key_origin_info, node->key_origin_info_len);
wally_free(node->key_origin_info);
}
wally_bzero(node, sizeof(struct miniscript_node_t));
wally_free(node);
} | testq %rdi, %rdi
je 0x8e11
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x8d98
movq 0x8(%rdi), %r14
callq 0x8d6e
movq %r14, %rdi
testq %r14, %r14
jne 0x8d87
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x8db7
movl 0x68(%rbx), %esi
testq %rsi, %rsi
je 0x8db7
callq 0xba9a
movq 0x50(%rbx), %rdi
callq 0xba94
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x8dd6
movl 0x6c(%rbx), %esi
testq %rsi, %rsi
je 0x8dd6
callq 0xba9a
movq 0x58(%rbx), %rdi
callq 0xba94
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
je 0x8df5
movl 0x70(%rbx), %esi
testq %rsi, %rsi
je 0x8df5
callq 0xba9a
movq 0x60(%rbx), %rdi
callq 0xba94
movl $0x80, %esi
movq %rbx, %rdi
callq 0xba9a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xba94
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
realloc_substr_buffer | static int realloc_substr_buffer(size_t need_len, char **buffer, size_t *buffer_len)
{
size_t need_size = ((need_len / 64) + 2) * 64;
if ((*buffer == NULL) || (need_size > *buffer_len)) {
if (*buffer != NULL)
wally_free(*buffer);
*buffer = (char *) wally_malloc(need_size);
if (*buffer == NULL)
return WALLY_ENOMEM;
*buffer_len = need_size;
}
return WALLY_OK;
} | pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
andq $-0x40, %r14
subq $-0x80, %r14
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x8e3c
xorl %eax, %eax
cmpq (%rbx), %r14
jbe 0x8e58
callq 0xba94
movq %r14, %rdi
callq 0xbd35
movq %rax, (%r15)
testq %rax, %rax
je 0x8e53
movq %r14, (%rbx)
xorl %eax, %eax
jmp 0x8e58
movl $0xfffffffd, %eax # imm = 0xFFFFFFFD
popq %rbx
popq %r14
popq %r15
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
verify_descriptor_sh | static int verify_descriptor_sh(struct miniscript_node_t *node, struct miniscript_node_t *parent)
{
if (parent || (get_child_list_count(node) != node->info->inner_num) || !node->child->info)
return WALLY_EINVAL;
node->type_properties = node->child->type_properties;
return WALLY_OK;
} | movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
testq %rsi, %rsi
je 0x8e69
retq
movq 0x18(%rdi), %rcx
xorl %edx, %edx
testq %rcx, %rcx
je 0x8e82
movq %rcx, %rsi
incl %edx
movq 0x8(%rsi), %rsi
testq %rsi, %rsi
jne 0x8e77
movq (%rdi), %rsi
cmpl 0x10(%rsi), %edx
jne 0x8e68
cmpq $0x0, (%rcx)
je 0x8e68
movl 0x3c(%rcx), %eax
movl %eax, 0x3c(%rdi)
xorl %eax, %eax
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
generate_by_descriptor_sh | static int generate_by_descriptor_sh(
struct miniscript_node_t *node,
struct miniscript_node_t *parent,
int32_t derive_child_num,
unsigned char *script,
size_t script_len,
size_t *write_len)
{
int ret;
size_t child_write_len = *write_len;
unsigned char buf[WALLY_SCRIPTPUBKEY_P2SH_LEN];
if (!node->child || (script_len < WALLY_SCRIPTPUBKEY_P2SH_LEN) || (parent && !parent->info))
return WALLY_EINVAL;
ret = generate_script_from_miniscript(node->child, node, derive_child_num, script, script_len, &child_write_len);
if (ret != WALLY_OK)
return ret;
if (child_write_len > DESCRIPTOR_REDEEM_SCRIPT_MAX_SIZE)
return WALLY_EINVAL;
ret = wally_scriptpubkey_p2sh_from_bytes(script, child_write_len, WALLY_SCRIPT_HASH160, buf, WALLY_SCRIPTPUBKEY_P2SH_LEN, write_len);
if (ret == WALLY_OK)
memcpy(script, buf, *write_len);
return ret;
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %r9, %r14
movq %rcx, %rbx
movq %rdi, %rax
movq (%r9), %rcx
movq %rcx, 0x8(%rsp)
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
sete %cl
cmpq $0x17, %r8
setb %r9b
orb %cl, %r9b
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
jne 0x8f30
testq %rsi, %rsi
je 0x8ed9
cmpq $0x0, (%rsi)
je 0x8f30
leaq 0x8(%rsp), %r9
movq %rax, %rsi
movq %rbx, %rcx
callq 0xa1d3
testl %eax, %eax
je 0x8ef1
movl %eax, %ebp
jmp 0x8f30
movq 0x8(%rsp), %rsi
cmpq $0x208, %rsi # imm = 0x208
ja 0x8f30
leaq 0x10(%rsp), %rcx
movl $0x17, %r8d
movq %rbx, %rdi
movl $0x1, %edx
movq %r14, %r9
callq 0xc914
testl %eax, %eax
jne 0x8eed
movq (%r14), %rdx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x5100
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
verify_descriptor_wsh | static int verify_descriptor_wsh(struct miniscript_node_t *node, struct miniscript_node_t *parent)
{
if (parent && (!parent->info || (parent->info->kind != DESCRIPTOR_KIND_DESCRIPTOR_SH)))
return WALLY_EINVAL;
if ((get_child_list_count(node) != node->info->inner_num) || !node->child->info)
return WALLY_EINVAL;
if (has_uncompressed_key_by_child(node))
return WALLY_EINVAL;
node->type_properties = node->child->type_properties;
return WALLY_OK;
} | pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x8f5d
movq (%rsi), %rax
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
testq %rax, %rax
je 0x8f9e
cmpl $0x502, 0x8(%rax) # imm = 0x502
jne 0x8f9e
movq 0x18(%rbx), %r14
xorl %eax, %eax
testq %r14, %r14
je 0x8f76
movq %r14, %rcx
incl %eax
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x8f6b
movq (%rbx), %rcx
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
cmpl 0x10(%rcx), %eax
jne 0x8f9e
cmpq $0x0, (%r14)
je 0x8f9e
movq %rbx, %rdi
callq 0xabe5
testb %al, %al
jne 0x8f9e
movl 0x3c(%r14), %eax
movl %eax, 0x3c(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
generate_by_descriptor_wsh | static int generate_by_descriptor_wsh(
struct miniscript_node_t *node,
struct miniscript_node_t *parent,
int32_t derive_child_num,
unsigned char *script,
size_t script_len,
size_t *write_len)
{
int ret;
size_t child_write_len = *write_len;
unsigned char output[WALLY_SCRIPTPUBKEY_P2WSH_LEN];
if (!node->child || (script_len < sizeof(output)) || (parent && !parent->info))
return WALLY_EINVAL;
ret = generate_script_from_miniscript(node->child, node, derive_child_num, script, script_len, &child_write_len);
if (ret != WALLY_OK)
return ret;
if (child_write_len > DESCRIPTOR_REDEEM_SCRIPT_MAX_SIZE)
return WALLY_EINVAL;
ret = wally_witness_program_from_bytes(script, child_write_len, WALLY_SCRIPT_SHA256, output, WALLY_SCRIPTPUBKEY_P2WSH_LEN, write_len);
if (ret == WALLY_OK)
memcpy(script, output, *write_len);
return ret;
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %r9, %r14
movq %rcx, %rbx
movq %rdi, %rax
movq (%r9), %rcx
movq %rcx, 0x8(%rsp)
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
sete %cl
cmpq $0x22, %r8
setb %r9b
orb %cl, %r9b
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
jne 0x903c
testq %rsi, %rsi
je 0x8fe5
cmpq $0x0, (%rsi)
je 0x903c
leaq 0x8(%rsp), %r9
movq %rax, %rsi
movq %rbx, %rcx
callq 0xa1d3
testl %eax, %eax
je 0x8ffd
movl %eax, %ebp
jmp 0x903c
movq 0x8(%rsp), %rsi
cmpq $0x208, %rsi # imm = 0x208
ja 0x903c
leaq 0x10(%rsp), %rcx
movl $0x22, %r8d
movq %rbx, %rdi
movl $0x2, %edx
movq %r14, %r9
callq 0xd3d4
testl %eax, %eax
jne 0x8ff9
movq (%r14), %rdx
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x5100
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
verify_descriptor_pk | static int verify_descriptor_pk(struct miniscript_node_t *node, struct miniscript_node_t *parent)
{
(void)parent;
if ((get_child_list_count(node) != node->info->inner_num) || node->child->info ||
((node->child->kind & DESCRIPTOR_KIND_KEY) != DESCRIPTOR_KIND_KEY))
return WALLY_EINVAL;
node->type_properties = node->info->type_properties;
return WALLY_OK;
} | movq 0x18(%rdi), %rcx
xorl %edx, %edx
testq %rcx, %rcx
je 0x9060
movq %rcx, %rax
incl %edx
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x9055
movq (%rdi), %rsi
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
cmpl 0x10(%rsi), %edx
jne 0x9073
cmpq $0x0, (%rcx)
je 0x9074
retq
testb $0x20, 0x38(%rcx)
je 0x9073
movl 0xc(%rsi), %eax
movl %eax, 0x3c(%rdi)
xorl %eax, %eax
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
generate_by_descriptor_pk | static int generate_by_descriptor_pk(
struct miniscript_node_t *node,
struct miniscript_node_t *parent,
int32_t derive_child_num,
unsigned char *script,
size_t script_len,
size_t *write_len)
{
int ret;
ret = generate_by_miniscript_pk_k(node, parent, derive_child_num, script, script_len, write_len);
if (ret != WALLY_OK)
return ret;
return generate_by_wrapper_c(script, script_len, write_len);
} | pushq %r15
pushq %r14
pushq %rbx
movq %r9, %rbx
movq %r8, %r15
movq %rcx, %r14
callq 0x94a5
testl %eax, %eax
je 0x90a0
popq %rbx
popq %r14
popq %r15
retq
movq (%rbx), %rcx
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
testq %rcx, %rcx
je 0x909a
leaq 0x1(%rcx), %rdx
cmpq %r15, %rdx
seta %sil
cmpq $0x2711, %rdx # imm = 0x2711
setae %dil
orb %sil, %dil
jne 0x909a
movb $-0x54, (%r14,%rcx)
movq %rdx, (%rbx)
xorl %eax, %eax
jmp 0x909a
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
generate_by_descriptor_pkh | static int generate_by_descriptor_pkh(
struct miniscript_node_t *node,
struct miniscript_node_t *parent,
int32_t derive_child_num,
unsigned char *script,
size_t script_len,
size_t *write_len)
{
int ret;
if (script_len < WALLY_SCRIPTPUBKEY_P2PKH_LEN)
return WALLY_EINVAL;
ret = generate_by_miniscript_pk_h(node, parent, derive_child_num, script, script_len, write_len);
if (ret != WALLY_OK)
return ret;
return generate_by_wrapper_c(script, script_len, write_len);
} | cmpq $0x19, %r8
jae 0x90e5
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
retq
pushq %r15
pushq %r14
pushq %rbx
movq %r9, %rbx
movq %r8, %r15
movq %rcx, %r14
callq 0x9551
testl %eax, %eax
je 0x9102
popq %rbx
popq %r14
popq %r15
retq
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x9135
leaq 0x1(%rcx), %rdx
cmpq %r15, %rdx
seta %al
cmpq $0x2711, %rdx # imm = 0x2711
setae %sil
orb %al, %sil
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
jne 0x90fc
movb $-0x54, (%r14,%rcx)
movq %rdx, (%rbx)
xorl %eax, %eax
jmp 0x90fc
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
jmp 0x90fc
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
verify_descriptor_wpkh | static int verify_descriptor_wpkh(struct miniscript_node_t *node, struct miniscript_node_t *parent)
{
struct miniscript_node_t *parent_item = parent;
if (parent && (!parent->info || (parent->info->kind & DESCRIPTOR_KIND_MINISCRIPT)))
return WALLY_EINVAL;
if ((get_child_list_count(node) != node->info->inner_num) || node->child->info ||
((node->child->kind & DESCRIPTOR_KIND_KEY) != DESCRIPTOR_KIND_KEY))
return WALLY_EINVAL;
while (parent_item != NULL) {
if (parent_item->kind == DESCRIPTOR_KIND_DESCRIPTOR_WSH)
return WALLY_EINVAL;
parent_item = parent_item->parent;
}
if (has_uncompressed_key_by_child(node))
return WALLY_EINVAL;
return WALLY_OK;
} | pushq %rax
testq %rsi, %rsi
je 0x9155
movq (%rsi), %rcx
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
testq %rcx, %rcx
je 0x91ad
testb $0x1, 0x8(%rcx)
jne 0x91ad
movq 0x18(%rdi), %rcx
xorl %edx, %edx
testq %rcx, %rcx
je 0x916e
movq %rcx, %rax
incl %edx
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x9163
movq (%rdi), %r8
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
cmpl 0x10(%r8), %edx
jne 0x91ad
cmpq $0x0, (%rcx)
jne 0x91ad
testb $0x20, 0x38(%rcx)
je 0x91ad
testq %rsi, %rsi
je 0x919c
cmpl $0x20002, 0x38(%rsi) # imm = 0x20002
je 0x91ad
movq 0x20(%rsi), %rsi
jmp 0x9188
callq 0xabe5
xorb $0x1, %al
movzbl %al, %eax
leal -0x2(,%rax,2), %eax
popq %rcx
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/descriptor.c |
scriptsig_to_witness | static int scriptsig_to_witness(unsigned char *bytes, size_t bytes_len, struct wally_tx_witness_stack **output)
{
unsigned char *p = bytes, *end = p + bytes_len;
struct wally_tx_witness_stack *result = NULL;
int ret = WALLY_OK;
if (!bytes || !output || !bytes_len) {
return WALLY_EINVAL;
}
if ((ret = wally_tx_witness_stack_init_alloc(2, &result)) != WALLY_OK) {
return ret;
}
while (p < end) {
size_t push_size, push_opcode_size;
if ((ret = script_get_push_size_from_bytes(p, end - p, &push_size)) != WALLY_OK) {
goto fail;
}
if ((ret = script_get_push_opcode_size_from_bytes(p, end - p, &push_opcode_size)) != WALLY_OK) {
goto fail;
}
p += push_opcode_size;
if ((ret = wally_tx_witness_stack_add(result, p, push_size)) != WALLY_OK) {
goto fail;
}
p += push_size;
}
*output = result;
return WALLY_OK;
fail:
wally_tx_witness_stack_free(result);
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq $0x0, (%rsp)
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
testq %rsi, %rsi
je 0xdbfc
movq %rdi, %r15
testq %rdi, %rdi
je 0xdbfc
movq %rdx, %rbx
testq %rdx, %rdx
je 0xdbfc
movq %rsi, %r13
movq %rsp, %rsi
movl $0x2, %edi
callq 0xec36
movl %eax, %ebp
testl %eax, %eax
jne 0xdbfc
testq %r13, %r13
jle 0xdbe6
addq %r15, %r13
leaq 0x8(%rsp), %r12
movq %r13, %r14
subq %r15, %r14
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0xd0e6
testl %eax, %eax
jne 0xdbf1
movq %r15, %rdi
movq %r14, %rsi
movl $0x1, %edx
leaq 0x10(%rsp), %rcx
callq 0xd0e6
testl %eax, %eax
jne 0xdbf1
addq 0x10(%rsp), %r15
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
movq %r15, %rsi
callq 0xee60
testl %eax, %eax
jne 0xdbf1
addq 0x8(%rsp), %r15
cmpq %r13, %r15
jb 0xdb8f
movq (%rsp), %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
jmp 0xdbfc
movl %eax, %ebp
movq (%rsp), %rdi
callq 0xedde
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/script.c |
wally_witness_p2wpkh_from_sig | int wally_witness_p2wpkh_from_sig(
const unsigned char *pub_key,
size_t pub_key_len,
const unsigned char *sig,
size_t sig_len,
uint32_t sighash,
struct wally_tx_witness_stack **witness)
{
unsigned char scriptsig[WALLY_SCRIPTSIG_P2PKH_MAX_LEN];
size_t written;
int ret;
ret = wally_scriptsig_p2pkh_from_sig(pub_key, pub_key_len, sig, sig_len, sighash, scriptsig, sizeof(scriptsig), &written);
if (ret == WALLY_OK)
ret = scriptsig_to_witness(scriptsig, written, witness);
return ret;
} | pushq %rbx
subq $0xa0, %rsp
movq %r9, %rbx
leaq 0x8(%rsp), %rax
leaq 0x10(%rsp), %r9
pushq %rax
pushq $0x8c
callq 0xc705
addq $0x10, %rsp
testl %eax, %eax
jne 0xdc47
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdi
movq %rbx, %rdx
callq 0xdb30
addq $0xa0, %rsp
popq %rbx
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/script.c |
wally_ec_public_key_decompress | int wally_ec_public_key_decompress(const unsigned char *pub_key, size_t pub_key_len,
unsigned char *bytes_out, size_t len)
{
secp256k1_pubkey pub;
size_t len_in_out = EC_PUBLIC_KEY_UNCOMPRESSED_LEN;
bool ok;
ok = pub_key && pub_key_len == EC_PUBLIC_KEY_LEN &&
bytes_out && len == EC_PUBLIC_KEY_UNCOMPRESSED_LEN &&
pubkey_parse(&pub, pub_key, pub_key_len) &&
pubkey_serialize(bytes_out, &len_in_out, &pub, PUBKEY_UNCOMPRESSED) &&
len_in_out == EC_PUBLIC_KEY_UNCOMPRESSED_LEN;
if (!ok && bytes_out)
wally_clear(bytes_out, len);
wally_clear(&pub, sizeof(pub));
return ok ? WALLY_OK : WALLY_EINVAL;
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq $0x41, 0x8(%rsp)
xorl %ebp, %ebp
testq %rdx, %rdx
je 0xdf41
movq %rdi, %rax
testq %rdi, %rdi
je 0xdf41
cmpq $0x21, %rsi
jne 0xdf41
cmpq $0x41, %rbx
jne 0xdf41
leaq 0x10(%rsp), %rdi
movl $0x21, %edx
movq %rax, %rsi
callq 0xb9cb
testl %eax, %eax
je 0xdf3f
leaq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movl $0x2, %ecx
callq 0xb9e3
testl %eax, %eax
je 0xdf3f
cmpq $0x41, 0x8(%rsp)
sete %bpl
jmp 0xdf41
xorl %ebp, %ebp
testq %r14, %r14
sete %al
orb %bpl, %al
jne 0xdf57
movq %r14, %rdi
movq %rbx, %rsi
callq 0xba8b
leaq 0x10(%rsp), %rdi
movl $0x40, %esi
callq 0xba8b
movzbl %bpl, %eax
leal -0x2(,%rax,2), %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/sign.c |
wally_ec_public_key_negate | int wally_ec_public_key_negate(const unsigned char *pub_key, size_t pub_key_len,
unsigned char *bytes_out, size_t len)
{
secp256k1_pubkey pub;
size_t len_in_out = EC_PUBLIC_KEY_LEN;
bool ok;
ok = pub_key && pub_key_len == EC_PUBLIC_KEY_LEN &&
bytes_out && len == EC_PUBLIC_KEY_LEN &&
pubkey_parse(&pub, pub_key, pub_key_len) &&
pubkey_negate(&pub) &&
pubkey_serialize(bytes_out, &len_in_out, &pub, PUBKEY_COMPRESSED) &&
len_in_out == EC_PUBLIC_KEY_LEN;
if (!ok && bytes_out)
wally_clear(bytes_out, len);
wally_clear(&pub, sizeof(pub));
return ok ? WALLY_OK : WALLY_EINVAL;
} | pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq $0x21, 0x8(%rsp)
xorl %ebp, %ebp
testq %rdx, %rdx
je 0xdff9
movq %rdi, %rax
testq %rdi, %rdi
je 0xdff9
cmpq $0x21, %rsi
jne 0xdff9
cmpq $0x21, %rbx
jne 0xdff9
leaq 0x10(%rsp), %rdi
movl $0x21, %edx
movq %rax, %rsi
callq 0xb9cb
testl %eax, %eax
je 0xdff7
leaq 0x10(%rsp), %rdi
callq 0xb9b9
testl %eax, %eax
je 0xdff7
leaq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
movl $0x102, %ecx # imm = 0x102
callq 0xb9e3
testl %eax, %eax
je 0xdff7
cmpq $0x21, 0x8(%rsp)
sete %bpl
jmp 0xdff9
xorl %ebp, %ebp
testq %r14, %r14
sete %al
orb %bpl, %al
jne 0xe00f
movq %r14, %rdi
movq %rbx, %rsi
callq 0xba8b
leaq 0x10(%rsp), %rdi
movl $0x40, %esi
callq 0xba8b
movzbl %bpl, %eax
leal -0x2(,%rax,2), %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/sign.c |
wally_ec_sig_normalize | int wally_ec_sig_normalize(const unsigned char *sig, size_t sig_len,
unsigned char *bytes_out, size_t len)
{
secp256k1_ecdsa_signature sig_secp, sig_low;
const secp256k1_context *ctx = secp256k1_context_no_precomp;
bool ok;
ok = sig && sig_len == EC_SIGNATURE_LEN &&
bytes_out && len == EC_SIGNATURE_LEN &&
secp256k1_ecdsa_signature_parse_compact(ctx, &sig_secp, sig);
if (ok) {
/* Note no error is returned, just whether the sig was changed */
secp256k1_ecdsa_signature_normalize(ctx, &sig_low, &sig_secp);
ok = secp256k1_ecdsa_signature_serialize_compact(ctx, bytes_out,
&sig_low);
}
if (!ok && bytes_out)
wally_clear(bytes_out, len);
wally_clear_2(&sig_secp, sizeof(sig_secp), &sig_low, sizeof(sig_low));
return ok ? WALLY_OK : WALLY_EINVAL;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rcx, %rbx
movq %rdx, %r14
xorl %ebp, %ebp
testq %rdx, %rdx
je 0xe0a6
movq %rdi, %rdx
testq %rdi, %rdi
je 0xe0a6
cmpq $0x40, %rsi
jne 0xe0a6
cmpq $0x40, %rbx
jne 0xe0a6
leaq 0x732ff(%rip), %rax # 0x81368
movq (%rax), %r15
movq %rsp, %rsi
movq %r15, %rdi
callq 0x1f682
testl %eax, %eax
je 0xe0a4
leaq 0x40(%rsp), %r12
movq %rsp, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1fab1
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1f983
testl %eax, %eax
setne %bpl
jmp 0xe0a6
xorl %ebp, %ebp
testq %r14, %r14
sete %al
orb %bpl, %al
jne 0xe0bc
movq %r14, %rdi
movq %rbx, %rsi
callq 0xba8b
movq %rsp, %rdi
leaq 0x40(%rsp), %rdx
movl $0x40, %esi
movl $0x40, %ecx
callq 0xbe63
movzbl %bpl, %eax
leal -0x2(,%rax,2), %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/sign.c |
wally_ec_sig_to_der | int wally_ec_sig_to_der(const unsigned char *sig, size_t sig_len,
unsigned char *bytes_out, size_t len, size_t *written)
{
secp256k1_ecdsa_signature sig_secp;
size_t len_in_out = len;
const secp256k1_context *ctx = secp256k1_context_no_precomp;
bool ok;
if (written)
*written = 0;
if (!ctx)
return WALLY_ENOMEM;
ok = sig && sig_len == EC_SIGNATURE_LEN &&
bytes_out && len >= EC_SIGNATURE_DER_MAX_LEN && written &&
secp256k1_ecdsa_signature_parse_compact(ctx, &sig_secp, sig) &&
secp256k1_ecdsa_signature_serialize_der(ctx, bytes_out,
&len_in_out, &sig_secp);
if (!ok && bytes_out)
wally_clear(bytes_out, len);
if (ok)
*written = len_in_out;
wally_clear(&sig_secp, sizeof(sig_secp));
return ok ? WALLY_OK : WALLY_EINVAL;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rdx
movq %rcx, (%rsp)
leaq 0x73255(%rip), %rax # 0x81368
movq (%rax), %r12
testq %r8, %r8
je 0xe122
movq $0x0, (%rbx)
testq %r12, %r12
je 0xe171
xorl %r13d, %r13d
testq %rbx, %rbx
je 0xe17b
testq %r15, %r15
je 0xe17b
testq %rdx, %rdx
je 0xe17b
cmpq $0x40, %rsi
jne 0xe17b
cmpq $0x48, %r14
jb 0xe17b
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x1f682
testl %eax, %eax
je 0xe178
movq %rsp, %rdx
leaq 0x8(%rsp), %rcx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1f802
testl %eax, %eax
setne %r13b
jmp 0xe17b
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
jmp 0xe1b3
xorl %r13d, %r13d
testq %r15, %r15
sete %al
orb %r13b, %al
jne 0xe191
movq %r15, %rdi
movq %r14, %rsi
callq 0xba8b
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
testb %r13b, %r13b
je 0xe1a4
movq (%rsp), %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x8(%rsp), %rdi
movl $0x40, %esi
callq 0xba8b
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/sign.c |
wally_ec_sig_from_der | int wally_ec_sig_from_der(const unsigned char *bytes, size_t bytes_len,
unsigned char *bytes_out, size_t len)
{
secp256k1_ecdsa_signature sig_secp;
const secp256k1_context *ctx = secp256k1_context_no_precomp;
bool ok;
ok = bytes && bytes_len && bytes_out && len == EC_SIGNATURE_LEN &&
secp256k1_ecdsa_signature_parse_der(ctx, &sig_secp, bytes, bytes_len) &&
secp256k1_ecdsa_signature_serialize_compact(ctx, bytes_out, &sig_secp);
if (!ok && bytes_out)
wally_clear(bytes_out, len);
wally_clear(&sig_secp, sizeof(sig_secp));
return ok ? WALLY_OK : WALLY_EINVAL;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rcx, %rbx
movq %rdx, %r14
xorl %ebp, %ebp
testq %rdx, %rdx
je 0xe226
movq %rdi, %rdx
testq %rdi, %rdi
je 0xe226
movq %rsi, %rcx
testq %rsi, %rsi
je 0xe226
cmpq $0x40, %rbx
jne 0xe226
leaq 0x73170(%rip), %rax # 0x81368
movq (%rax), %r15
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x1f5a0
testl %eax, %eax
je 0xe224
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1f983
testl %eax, %eax
setne %bpl
jmp 0xe226
xorl %ebp, %ebp
testq %r14, %r14
sete %al
orb %bpl, %al
jne 0xe23c
movq %r14, %rdi
movq %rbx, %rsi
callq 0xba8b
leaq 0x8(%rsp), %rdi
movl $0x40, %esi
callq 0xba8b
movzbl %bpl, %eax
leal -0x2(,%rax,2), %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/sign.c |
wally_ec_sig_from_bytes | int wally_ec_sig_from_bytes(const unsigned char *priv_key, size_t priv_key_len,
const unsigned char *bytes, size_t bytes_len,
uint32_t flags,
unsigned char *bytes_out, size_t len)
{
wally_ec_nonce_t nonce_fn = wally_ops()->ec_nonce_fn;
const secp256k1_context *ctx = secp_ctx();
if (!priv_key || priv_key_len != EC_PRIVATE_KEY_LEN ||
!bytes || bytes_len != EC_MESSAGE_HASH_LEN ||
!is_valid_ec_type(flags) || flags & ~EC_FLAGS_ALL ||
!bytes_out || len != get_expected_sig_len(flags))
return WALLY_EINVAL;
if (!ctx)
return WALLY_ENOMEM;
if (flags & EC_FLAG_SCHNORR) {
if (flags & EC_FLAG_RECOVERABLE)
return WALLY_EINVAL; /* Only ECDSA is supported for recoverable sigs */
#if 0 /*FIXME: Schnorr is unavailable in secp for now*/
if (!secp256k1_schnorr_sign(ctx, bytes_out, bytes,
priv_key, nonce_fn, NULL))
return WALLY_EINVAL; /* Failed to sign */
return WALLY_OK;
#endif
return WALLY_EINVAL;
} else {
unsigned char extra_entropy[32] = {0}, *entropy_p = NULL;
unsigned char *bytes_out_p = flags & EC_FLAG_RECOVERABLE ? bytes_out + 1 : bytes_out;
uint32_t counter = 0;
secp256k1_ecdsa_recoverable_signature sig_secp;
int recid;
while (true) {
if (!secp256k1_ecdsa_sign_recoverable(ctx, &sig_secp, bytes, priv_key, nonce_fn, entropy_p)) {
wally_clear(&sig_secp, sizeof(sig_secp));
if (!secp256k1_ec_seckey_verify(ctx, priv_key))
return WALLY_EINVAL; /* invalid priv_key */
return WALLY_ERROR; /* Nonce function failed */
}
/* Note this function is documented as never failing */
secp256k1_ecdsa_recoverable_signature_serialize_compact(ctx, bytes_out_p, &recid, &sig_secp);
if (!(flags & EC_FLAG_GRIND_R) || *bytes_out_p < 0x80) {
wally_clear(&sig_secp, sizeof(sig_secp));
/* Note the following assumes the key is compressed */
if (flags & EC_FLAG_RECOVERABLE)
bytes_out[0] = 27 + recid + 4;
return WALLY_OK;
}
/* Incremement nonce to grind for low-R */
entropy_p = extra_entropy;
++counter;
uint32_to_le_bytes(counter, entropy_p);
}
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r9, %r12
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r14
callq 0xbda4
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0xba16
movq %rax, %rdi
testq %r14, %r14
sete %al
cmpq $0x20, %r13
setne %cl
testq %r15, %r15
sete %dl
orb %al, %dl
cmpq $0x20, %rbx
setne %al
orb %cl, %al
orb %dl, %al
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
jne 0xe3df
movl %ebp, %ecx
andl $0x3, %ecx
decl %ecx
cmpl $0x1, %ecx
ja 0xe3df
cmpl $0x10, %ebp
setae %cl
testq %r12, %r12
sete %dl
orb %cl, %dl
jne 0xe3df
cmpl $0x8, %ebp
movl $0x41, %ecx
sbbq $0x0, %rcx
cmpq 0xc0(%rsp), %rcx
jne 0xe3df
testq %rdi, %rdi
je 0xe3da
testb $0x2, %bpl
jne 0xe3df
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movl %ebp, (%rsp)
cmpl $0x8, %ebp
movq %r12, 0x10(%rsp)
sbbq $-0x1, %r12
movq %r12, 0x18(%rsp)
leaq 0x47(%rsp), %rsi
movq %rdi, %r12
movq %r15, %rdx
movq %r14, %rcx
movq 0x8(%rsp), %r8
xorl %r9d, %r9d
callq 0x26a14
testl %eax, %eax
je 0xe3b3
movl $0x1, %ebx
leaq 0x47(%rsp), %rcx
movq %r12, %rbp
movq %r12, %rdi
movq 0x18(%rsp), %r12
movq %r12, %rsi
leaq 0x4(%rsp), %rdx
movq %rcx, %r13
callq 0x2693b
testb $0x4, (%rsp)
je 0xe3f1
cmpb $0x0, (%r12)
jns 0xe3f1
movl %ebx, 0x20(%rsp)
movq %rbp, %r12
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq 0x8(%rsp), %r8
leaq 0x20(%rsp), %r9
callq 0x26a14
movq %r13, %rcx
incl %ebx
testl %eax, %eax
jne 0xe360
leaq 0x47(%rsp), %rdi
movl $0x41, %esi
callq 0xba8b
movq %r12, %rdi
movq %r14, %rsi
callq 0x20a9c
cmpl $0x1, %eax
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
sbbl $0x0, %eax
jmp 0xe3df
movl $0xfffffffd, %eax # imm = 0xFFFFFFFD
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x47(%rsp), %rdi
movl $0x41, %esi
callq 0xba8b
xorl %eax, %eax
cmpl $0x8, (%rsp)
jb 0xe3df
movb 0x4(%rsp), %cl
addb $0x1f, %cl
movq 0x10(%rsp), %rdx
movb %cl, (%rdx)
jmp 0xe3df
| /p2pderivatives[P]cfd-go/external/libwally-core/src/sign.c |
wally_ec_sig_verify | int wally_ec_sig_verify(const unsigned char *pub_key, size_t pub_key_len,
const unsigned char *bytes, size_t bytes_len,
uint32_t flags,
const unsigned char *sig, size_t sig_len)
{
secp256k1_pubkey pub;
secp256k1_ecdsa_signature sig_secp;
const secp256k1_context *ctx = secp_ctx();
bool ok;
if (!pub_key || pub_key_len != EC_PUBLIC_KEY_LEN ||
!bytes || bytes_len != EC_MESSAGE_HASH_LEN ||
!is_valid_ec_type(flags) || flags & ~EC_FLAGS_TYPES ||
!sig || sig_len != EC_SIGNATURE_LEN)
return WALLY_EINVAL;
if (!ctx)
return WALLY_ENOMEM;
ok = pubkey_parse(&pub, pub_key, pub_key_len);
if (flags & EC_FLAG_SCHNORR)
#if 0 /*FIXME: Schnorr is unavailable in secp for now*/
ok = ok && secp256k1_schnorr_verify(ctx, sig, bytes, &pub);
#else
ok = false;
#endif
else
ok = ok && secp256k1_ecdsa_signature_parse_compact(ctx, &sig_secp, sig) &&
secp256k1_ecdsa_verify(ctx, &sig_secp, bytes, &pub);
wally_clear_2(&pub, sizeof(pub), &sig_secp, sizeof(sig_secp));
return ok ? WALLY_OK : WALLY_EINVAL;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r9, %r15
movl %r8d, %r12d
movq %rcx, %rbp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r13
callq 0xba16
testq %r13, %r13
sete %sil
cmpq $0x21, %r14
setne %cl
testq %rbx, %rbx
sete %dl
orb %sil, %dl
cmpq $0x20, %rbp
setne %sil
orb %cl, %sil
orb %dl, %sil
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
jne 0xe524
movl %r12d, %ecx
andl $0x3, %ecx
decl %ecx
cmpl $0x1, %ecx
ja 0xe524
cmpl $0x4, %r12d
setae %dl
testq %r15, %r15
sete %cl
orb %dl, %cl
cmpq $0x40, 0xc0(%rsp)
setne %dl
orb %cl, %dl
jne 0xe524
testq %rax, %rax
je 0xe51f
movq %rax, %r14
leaq 0x48(%rsp), %rdi
movl $0x21, %edx
movq %r13, %rsi
callq 0xb9cb
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
cmpl $0x1, %r12d
ja 0xe504
testl %eax, %eax
je 0xe504
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x1f682
testl %eax, %eax
je 0xe504
leaq 0x8(%rsp), %rsi
leaq 0x48(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x1fc2d
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leal -0x2(,%rcx,2), %ebp
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x40, %esi
movl $0x40, %ecx
callq 0xbe63
jmp 0xe524
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/sign.c |
wally_ec_sig_to_public_key | int wally_ec_sig_to_public_key(const unsigned char *bytes, size_t bytes_len,
const unsigned char *sig, size_t sig_len,
unsigned char *bytes_out, size_t len)
{
secp256k1_pubkey pub;
secp256k1_ecdsa_recoverable_signature sig_secp;
const secp256k1_context *ctx = secp_ctx();
size_t len_in_out = EC_PUBLIC_KEY_LEN;
int recid;
bool ok;
if (!ctx)
return WALLY_ENOMEM;
if (!bytes || bytes_len != EC_MESSAGE_HASH_LEN ||
!sig || sig_len != EC_SIGNATURE_RECOVERABLE_LEN ||
!bytes_out || len != EC_PUBLIC_KEY_LEN)
return WALLY_EINVAL;
recid = (sig[0] - 27) & 3;
ok = secp256k1_ecdsa_recoverable_signature_parse_compact(ctx, &sig_secp, &sig[1], recid) &&
secp256k1_ecdsa_recover(ctx, &pub, &sig_secp, bytes) &&
pubkey_serialize(bytes_out, &len_in_out, &pub, PUBKEY_COMPRESSED);
wally_clear_2(&pub, sizeof(pub), &sig_secp, sizeof(sig_secp));
return ok ? WALLY_OK : WALLY_EINVAL;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, (%rsp)
movq %r8, %r14
movq %rcx, %rbp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r13
callq 0xba16
movq $0x21, 0x8(%rsp)
testq %rax, %rax
je 0xe636
movq %rax, %r15
testq %r13, %r13
sete %al
cmpq $0x20, %rbx
setne %cl
testq %r12, %r12
sete %dl
orb %al, %dl
cmpq $0x41, %rbp
setne %al
orb %cl, %al
orb %dl, %al
testq %r14, %r14
sete %cl
cmpq $0x21, (%rsp)
setne %dl
orb %cl, %dl
orb %al, %dl
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
jne 0xe63b
movq %r14, %rbx
movb (%r12), %al
incb %al
andb $0x3, %al
movzbl %al, %ecx
incq %r12
leaq 0x57(%rsp), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x2686b
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
testl %eax, %eax
je 0xe61b
leaq 0x17(%rsp), %rsi
leaq 0x57(%rsp), %rdx
movq %r15, %rdi
movq %r13, %rcx
callq 0x26ae0
testl %eax, %eax
je 0xe61b
leaq 0x8(%rsp), %rsi
leaq 0x17(%rsp), %rdx
movq %rbx, %rdi
movl $0x102, %ecx # imm = 0x102
callq 0xb9e3
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leal -0x2(,%rcx,2), %ebp
leaq 0x17(%rsp), %rdi
leaq 0x57(%rsp), %rdx
movl $0x40, %esi
movl $0x41, %ecx
callq 0xbe63
jmp 0xe63b
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
movl %ebp, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/sign.c |
wally_format_bitcoin_message | int wally_format_bitcoin_message(const unsigned char *bytes, size_t bytes_len,
uint32_t flags,
unsigned char *bytes_out, size_t len,
size_t *written)
{
unsigned char buf[256], *msg_buf = bytes_out, *out;
const bool do_hash = (flags & BITCOIN_MESSAGE_FLAG_HASH);
size_t msg_len;
if (written)
*written = 0;
if (!bytes || !bytes_len || bytes_len > BITCOIN_MESSAGE_MAX_LEN ||
(flags & ~MSG_ALL_FLAGS) || !bytes_out || !written)
return WALLY_EINVAL;
msg_len = sizeof(MSG_PREFIX) - 1 + varint_len(bytes_len) + bytes_len;
*written = do_hash ? SHA256_LEN : msg_len;
if (len < *written)
return WALLY_OK; /* Not enough output space, return required size */
if (do_hash) {
/* Ensure we have a suitable temporary buffer to serialize into */
msg_buf = buf;
if (msg_len > sizeof(buf)) {
msg_buf = wally_malloc(msg_len);
if (!msg_buf) {
*written = 0;
return WALLY_ENOMEM;
}
}
}
/* Serialize the message */
out = msg_buf;
memcpy(out, MSG_PREFIX, sizeof(MSG_PREFIX) - 1);
out += sizeof(MSG_PREFIX) - 1;
if (bytes_len < 0xfd)
*out++ = bytes_len;
else {
*out++ = 0xfd;
*out++ = bytes_len & 0xff;
*out++ = bytes_len >> 8;
}
memcpy(out, bytes, bytes_len);
if (do_hash) {
wally_sha256d(msg_buf, msg_len, bytes_out, SHA256_LEN);
wally_clear(msg_buf, msg_len);
if (msg_buf != buf)
wally_free(msg_buf);
}
return WALLY_OK;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp # imm = 0x118
movq %r9, %r13
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
testq %r9, %r9
je 0xe67b
movq $0x0, (%r13)
testq %r12, %r12
sete %al
leaq -0xffc1(%r15), %rcx
cmpq $-0xffc0, %rcx # imm = 0xFFFF0040
setb %cl
orb %al, %cl
movl $0xfffffffe, %ebx # imm = 0xFFFFFFFE
jne 0xe7a3
testq %r13, %r13
sete %al
cmpl $0x2, %ebp
setae %cl
testq %r14, %r14
sete %dl
orb %al, %dl
orb %cl, %dl
jne 0xe7a3
xorl %eax, %eax
cmpq $0xfd, %r15
setae %al
testb $0x1, %bpl
leaq 0x1a(%r15,%rax,2), %rcx
movl $0x20, %eax
cmoveq %rcx, %rax
movq %rax, (%r13)
xorl %ebx, %ebx
cmpq %r8, %rax
ja 0xe7a3
movq %r14, %rax
testb $0x1, %bpl
movq %rcx, 0x8(%rsp)
je 0xe725
cmpq $0x101, %rcx # imm = 0x101
jb 0xe720
movq 0x8(%rsp), %rdi
callq 0xbd35
testq %rax, %rax
jne 0xe725
movq $0x0, (%r13)
movl $0xfffffffd, %ebx # imm = 0xFFFFFFFD
jmp 0xe7a3
leaq 0x10(%rsp), %rax
movups 0x54c5d(%rip), %xmm0 # 0x63389
movups %xmm0, 0x9(%rax)
movaps 0x54c49(%rip), %xmm0 # 0x63380
movups %xmm0, (%rax)
cmpq $0xfc, %r15
ja 0xe74c
leaq 0x1a(%rax), %rdi
movl %r15d, %ecx
jmp 0xe757
leaq 0x1c(%rax), %rdi
movw %r15w, 0x1a(%rax)
movb $-0x3, %cl
movq %rax, %r13
movb %cl, 0x19(%rax)
movq %r12, %rsi
movq %r15, %rdx
callq 0x5100
testb $0x1, %bpl
je 0xe7a3
movl $0x20, %ecx
movq %r13, %rdi
movq 0x8(%rsp), %r15
movq %r15, %rsi
movq %r14, %rdx
callq 0xbbaa
movq %r13, %rdi
movq %r15, %rsi
callq 0xba8b
leaq 0x10(%rsp), %rax
cmpq %rax, %r13
je 0xe7a3
movq %r13, %rdi
callq 0xba94
movl %ebx, %eax
addq $0x118, %rsp # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/sign.c |
wally_s2c_sig_from_bytes | int wally_s2c_sig_from_bytes(const unsigned char *priv_key, size_t priv_key_len,
const unsigned char *bytes, size_t bytes_len,
const unsigned char *s2c_data, size_t s2c_data_len,
uint32_t flags,
unsigned char *s2c_opening_out, size_t s2c_opening_out_len,
unsigned char *bytes_out, size_t len)
{
secp256k1_ecdsa_signature sig_secp;
secp256k1_ecdsa_s2c_opening opening_secp;
const secp256k1_context *ctx = secp_ctx();
bool ok;
if (!priv_key || priv_key_len != EC_PRIVATE_KEY_LEN ||
!bytes || bytes_len != EC_MESSAGE_HASH_LEN ||
!s2c_data || s2c_data_len != WALLY_S2C_DATA_LEN ||
flags != EC_FLAG_ECDSA ||
!bytes_out || len != EC_SIGNATURE_LEN ||
!s2c_opening_out || s2c_opening_out_len != WALLY_S2C_OPENING_LEN)
return WALLY_EINVAL;
if (!ctx)
return WALLY_ENOMEM;
if (!secp256k1_ecdsa_s2c_sign(ctx, &sig_secp, &opening_secp, bytes, priv_key, s2c_data)) {
wally_clear_2(&sig_secp, sizeof(sig_secp), &opening_secp, sizeof(opening_secp));
if (!secp256k1_ec_seckey_verify(ctx, priv_key))
return WALLY_EINVAL; /* invalid priv_key */
return WALLY_ERROR; /* Nonce function failed */
}
ok = secp256k1_ecdsa_signature_serialize_compact(ctx, bytes_out, &sig_secp) &&
secp256k1_ecdsa_s2c_opening_serialize(ctx, s2c_opening_out, &opening_secp);
wally_clear_2(&sig_secp, sizeof(sig_secp), &opening_secp, sizeof(opening_secp));
return ok ? WALLY_OK : WALLY_EINVAL;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r9, %r15
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbp
callq 0xba16
movq %r13, %xmm0
movq %rbp, %r8
movq %rbp, %xmm1
punpcklqdq %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0]
movq 0xd8(%rsp), %xmm0
movq %r12, %xmm2
punpcklqdq %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0]
pxor %xmm0, %xmm0
pcmpeqd %xmm0, %xmm2
pcmpeqd %xmm0, %xmm1
movdqa %xmm1, %xmm0
shufps $0xdd, %xmm2, %xmm0 # xmm0 = xmm0[1,3],xmm2[1,3]
shufps $0x88, %xmm2, %xmm1 # xmm1 = xmm1[0,2],xmm2[0,2]
andps %xmm0, %xmm1
movmskps %xmm1, %ecx
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
testl %ecx, %ecx
jne 0xe93e
cmpq $0x20, %r14
jne 0xe93e
cmpq $0x20, %rbx
jne 0xe93e
cmpq $0x20, %r15
jne 0xe93e
cmpq $0x40, 0xe0(%rsp)
jne 0xe93e
cmpq $0x21, 0xd0(%rsp)
jne 0xe93e
movq 0xc8(%rsp), %r15
testq %r15, %r15
je 0xe93e
cmpl $0x1, 0xc0(%rsp)
jne 0xe93e
testq %rax, %rax
je 0xe8e8
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rax, %rbx
movq %rax, %rdi
movq %r13, %rcx
movq %r8, %r14
movq %r12, %r9
callq 0x2cb2a
testl %eax, %eax
je 0xe8ef
leaq 0x48(%rsp), %rdx
movq %rbx, %rdi
movq 0xd8(%rsp), %rsi
callq 0x1f983
testl %eax, %eax
je 0xe920
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2caf4
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leal -0x2(,%rcx,2), %ebp
jmp 0xe925
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
jmp 0xe93e
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x40, %esi
movl $0x40, %ecx
callq 0xbe63
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20a9c
cmpl $0x1, %eax
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
sbbl $0x0, %ebp
jmp 0xe93e
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x40, %esi
movl $0x40, %ecx
callq 0xbe63
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/sign.c |
wally_s2c_commitment_verify | int wally_s2c_commitment_verify(const unsigned char *sig, size_t sig_len,
const unsigned char *s2c_data, size_t s2c_data_len,
const unsigned char *s2c_opening, size_t s2c_opening_len,
uint32_t flags)
{
secp256k1_ecdsa_signature sig_secp;
secp256k1_ecdsa_s2c_opening opening_secp;
const secp256k1_context *ctx = secp_ctx();
bool ok;
if (!sig || sig_len != EC_SIGNATURE_LEN ||
!s2c_data || s2c_data_len != WALLY_S2C_DATA_LEN ||
!s2c_opening || s2c_opening_len != WALLY_S2C_OPENING_LEN ||
flags != EC_FLAG_ECDSA)
return WALLY_EINVAL;
if (!ctx)
return WALLY_ENOMEM;
ok = secp256k1_ecdsa_signature_parse_compact(ctx, &sig_secp, sig) &&
secp256k1_ecdsa_s2c_opening_parse(ctx, &opening_secp, s2c_opening) &&
secp256k1_ecdsa_s2c_verify_commit(ctx, &sig_secp, s2c_data, &opening_secp);
wally_clear_2(&sig_secp, sizeof(sig_secp), &opening_secp, sizeof(opening_secp));
return ok ? WALLY_OK : WALLY_EINVAL;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r9, %r13
movq %r8, %r15
movq %rcx, %rbp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
callq 0xba16
testq %r12, %r12
sete %sil
cmpq $0x40, %rbx
setne %cl
testq %r14, %r14
sete %dl
orb %sil, %dl
cmpq $0x20, %rbp
setne %sil
orb %cl, %sil
orb %dl, %sil
testq %r15, %r15
sete %cl
cmpq $0x21, %r13
setne %dl
orb %cl, %dl
orb %sil, %dl
cmpl $0x1, 0xc0(%rsp)
setne %cl
orb %dl, %cl
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
testb $0x1, %cl
jne 0xea43
testq %rax, %rax
je 0xea3e
movq %r14, %rbx
leaq 0x48(%rsp), %rsi
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rdx
callq 0x1f682
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
testl %eax, %eax
je 0xea23
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x2cace
testl %eax, %eax
je 0xea23
leaq 0x48(%rsp), %rsi
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2ccdc
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leal -0x2(,%rcx,2), %ebp
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movl $0x40, %esi
movl $0x40, %ecx
callq 0xbe63
jmp 0xea43
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
movl %ebp, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| /p2pderivatives[P]cfd-go/external/libwally-core/src/sign.c |
clone_bytes | bool clone_bytes(unsigned char **dst, const unsigned char *src, size_t len)
{
if (!len) {
*dst = NULL;
return true;
}
*dst = wally_malloc(len);
if (*dst)
memcpy(*dst, src, len);
return *dst != NULL;
} | pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rdx, %rdx
je 0xea92
movq %rdx, %r14
movq %rsi, %r15
movq %rdx, %rdi
callq 0xbd35
movq %rax, (%rbx)
testq %rax, %rax
je 0xea9d
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x5100
cmpq $0x0, (%rbx)
setne %al
jmp 0xea9f
movq $0x0, (%rbx)
movb $0x1, %al
jmp 0xea9f
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
realloc_array | void *realloc_array(const void *src, size_t old_n, size_t new_n, size_t size)
{
unsigned char *p = wally_malloc(new_n * size);
if (!p)
return NULL;
if (src)
memcpy(p, src, old_n * size);
wally_clear(p + old_n * size, (new_n - old_n) * size);
return p;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
movq %rcx, %rdi
imulq %rdx, %rdi
callq 0xbd35
movq %rax, %r15
testq %rax, %rax
je 0xeaff
movq %r14, %rbp
imulq %r12, %rbp
testq %r13, %r13
je 0xeaea
movq %r15, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x5100
movq %r15, %rdi
addq %rbp, %rdi
subq %r12, %rbx
imulq %r14, %rbx
movq %rbx, %rsi
callq 0xba8b
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
replace_bytes | int replace_bytes(const unsigned char *bytes, size_t bytes_len,
unsigned char **bytes_out, size_t *bytes_len_out)
{
unsigned char *new_bytes = NULL;
if (BYTES_INVALID(bytes, bytes_len) || BYTES_INVALID(*bytes_out, *bytes_len_out))
return WALLY_EINVAL;
/* TODO: Avoid reallocation if new bytes is smaller than the existing one */
if (!clone_bytes(&new_bytes, bytes, bytes_len))
return WALLY_ENOMEM;
clear_and_free(*bytes_out, *bytes_len_out);
*bytes_out = new_bytes;
*bytes_len_out = bytes_len;
return WALLY_OK;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
testq %rdi, %rdi
setne %al
testq %rsi, %rsi
sete %cl
movl $0xfffffffe, %ebx # imm = 0xFFFFFFFE
cmpb %cl, %al
je 0xeb96
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
movq (%rdx), %rdi
testq %rdi, %rdi
setne %al
movq (%r14), %rsi
testq %rsi, %rsi
sete %cl
cmpb %cl, %al
je 0xeb96
xorl %ebx, %ebx
testq %r15, %r15
je 0xeb81
movq %r15, %rdi
callq 0xbd35
testq %rax, %rax
je 0xeb91
movq %rax, %rbp
movq %rax, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x5100
movq (%r12), %rdi
movq (%r14), %rsi
jmp 0xeb83
xorl %ebp, %ebp
callq 0xbf25
movq %rbp, (%r12)
movq %r15, (%r14)
jmp 0xeb96
movl $0xfffffffd, %ebx # imm = 0xFFFFFFFD
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
wally_tx_witness_stack_clone_alloc | int wally_tx_witness_stack_clone_alloc(const struct wally_tx_witness_stack *stack,
struct wally_tx_witness_stack **output)
{
struct wally_tx_witness_stack *result;
size_t i;
int ret;
TX_CHECK_OUTPUT;
if (!stack)
return WALLY_EINVAL;
ret = wally_tx_witness_stack_init_alloc(stack->items_allocation_len, &result);
for (i = 0; ret == WALLY_OK && i < stack->num_items; ++i) {
ret = wally_tx_witness_stack_set(result, i,
stack->items[i].witness,
stack->items[i].witness_len);
}
if (ret == WALLY_OK)
*output = result;
else
wally_tx_witness_stack_free(result);
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
testq %rsi, %rsi
je 0xec20
movq %rsi, %rbx
movq %rdi, %r14
movq $0x0, (%rsi)
testq %rdi, %rdi
je 0xec20
movq 0x10(%r14), %rdi
leaq 0x8(%rsp), %rsi
callq 0xec36
testl %eax, %eax
jne 0xec14
movl $0x8, %r12d
xorl %r15d, %r15d
movq 0x8(%rsp), %rdi
cmpq 0x8(%r14), %r15
jae 0xec2f
movq (%r14), %rax
movq -0x8(%rax,%r12), %rdx
movq (%rax,%r12), %rcx
movq %r15, %rsi
callq 0xecba
incq %r15
addq $0x10, %r12
testl %eax, %eax
je 0xebea
movl %eax, %ebp
movq 0x8(%rsp), %rdi
callq 0xede8
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, (%rbx)
xorl %ebp, %ebp
jmp 0xec20
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
wally_tx_witness_stack_init_alloc | int wally_tx_witness_stack_init_alloc(size_t allocation_len,
struct wally_tx_witness_stack **output)
{
struct wally_tx_witness_stack *result;
TX_CHECK_OUTPUT;
TX_OUTPUT_ALLOC(struct wally_tx_witness_stack);
if (allocation_len) {
result->items = wally_calloc(allocation_len * sizeof(*result->items));
if (!result->items) {
wally_free(result);
*output = NULL;
return WALLY_ENOMEM;
}
}
result->items_allocation_len = allocation_len;
result->num_items = 0;
return WALLY_OK;
} | pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xec96
movq %rsi, %r14
movq %rdi, %r15
movq $0x0, (%rsi)
movl $0x18, %edi
callq 0xbd3b
movq %rax, (%r14)
movl $0xfffffffd, %ebx # imm = 0xFFFFFFFD
testq %rax, %rax
je 0xec9b
movq %rax, %r12
testq %r15, %r15
je 0xec84
movq %r15, %rdi
shlq $0x4, %rdi
callq 0xbd3b
movq %rax, (%r12)
testq %rax, %rax
je 0xeca9
movq %r15, 0x10(%r12)
movq $0x0, 0x8(%r12)
xorl %ebx, %ebx
jmp 0xec9b
movl $0xfffffffe, %ebx # imm = 0xFFFFFFFE
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r12, %rdi
callq 0xba94
movq $0x0, (%r14)
jmp 0xec9b
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
wally_tx_witness_stack_set | int wally_tx_witness_stack_set(struct wally_tx_witness_stack *stack, size_t index,
const unsigned char *witness, size_t witness_len)
{
unsigned char *new_witness = NULL;
if (!is_valid_witness_stack(stack) || (!witness && witness_len))
return WALLY_EINVAL;
if (!clone_bytes(&new_witness, witness, witness_len))
return WALLY_ENOMEM;
if (index >= stack->num_items) {
if (index >= stack->items_allocation_len) {
/* Expand the witness array */
struct wally_tx_witness_item *p;
p = realloc_array(stack->items, stack->items_allocation_len,
index + 1, sizeof(*stack->items));
if (!p) {
clear_and_free(new_witness, witness_len);
return WALLY_ENOMEM;
}
clear_and_free(stack->items, stack->num_items * sizeof(*stack->items));
stack->items = p;
stack->items_allocation_len = index + 1;
}
stack->num_items = index + 1;
}
clear_and_free(stack->items[index].witness, stack->items[index].witness_len);
stack->items[index].witness = new_witness;
stack->items[index].witness_len = witness_len;
return WALLY_OK;
} | movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0xeddd
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rcx
movq 0x10(%rdi), %rdx
movq %rcx, %rsi
orq %rdx, %rsi
je 0xed03
testq %rdx, %rdx
setne %dl
testq %rcx, %rcx
setne %cl
xorb %dl, %cl
je 0xed0e
jmp 0xedcf
cmpq $0x0, 0x8(%r15)
jne 0xedcf
testq %r13, %r13
sete %cl
testq %rbx, %rbx
setne %dl
testb %dl, %cl
jne 0xedcf
testq %rbx, %rbx
je 0xed4b
movq %rbx, %rdi
callq 0xbd35
testq %rax, %rax
je 0xedca
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x5100
jmp 0xed4e
xorl %r12d, %r12d
cmpq %r14, 0x8(%r15)
ja 0xed9a
movq 0x10(%r15), %rsi
cmpq %r14, %rsi
jbe 0xed63
leaq 0x1(%r14), %r13
jmp 0xed96
movq (%r15), %rdi
leaq 0x1(%r14), %r13
movl $0x10, %ecx
movq %r13, %rdx
callq 0xeaa5
testq %rax, %rax
je 0xedbf
movq %rax, %rbp
movq (%r15), %rdi
movq 0x8(%r15), %rsi
shlq $0x4, %rsi
callq 0xbf25
movq %rbp, (%r15)
movq %r13, 0x10(%r15)
movq %r13, 0x8(%r15)
movq (%r15), %rax
shlq $0x4, %r14
movq (%rax,%r14), %rdi
movq 0x8(%rax,%r14), %rsi
callq 0xbf25
movq (%r15), %rax
movq %r12, (%rax,%r14)
movq %rbx, 0x8(%rax,%r14)
xorl %eax, %eax
jmp 0xedcf
movq %r12, %rdi
movq %rbx, %rsi
callq 0xbf25
movl $0xfffffffd, %eax # imm = 0xFFFFFFFD
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
tx_witness_stack_free | static int tx_witness_stack_free(struct wally_tx_witness_stack *stack,
bool free_parent)
{
size_t i;
if (stack) {
if (stack->items) {
for (i = 0; i < stack->num_items; ++i) {
if (stack->items[i].witness)
clear_and_free(stack->items[i].witness,
stack->items[i].witness_len);
}
clear_and_free(stack->items, stack->num_items * sizeof(*stack->items));
}
wally_clear(stack, sizeof(*stack));
if (free_parent)
wally_free(stack);
}
return WALLY_OK;
} | testq %rdi, %rdi
je 0xee3e
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xee46
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0xee3f
movl $0x8, %r14d
xorl %r15d, %r15d
movq (%rbx), %rax
movq -0x8(%rax,%r14), %rdi
testq %rdi, %rdi
je 0xee29
movq (%rax,%r14), %rsi
callq 0xbf25
movq 0x8(%rbx), %rsi
incq %r15
addq $0x10, %r14
cmpq %rsi, %r15
jb 0xee0f
movq (%rbx), %rdi
shlq $0x4, %rsi
jmp 0xee41
retq
xorl %esi, %esi
callq 0xbf25
movl $0x18, %esi
movq %rbx, %rdi
callq 0xba8b
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xba94
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
wally_tx_witness_stack_set_dummy | int wally_tx_witness_stack_set_dummy(struct wally_tx_witness_stack *stack,
size_t index, uint32_t flags)
{
const unsigned char *p = NULL;
size_t len = 0;
if (flags == WALLY_TX_DUMMY_SIG) {
p = DUMMY_SIG;
len = sizeof(DUMMY_SIG);
} else if (flags == WALLY_TX_DUMMY_SIG_LOW_R) {
p = DUMMY_SIG;
len = sizeof(DUMMY_SIG) - 1; /* Low-R signatures are always at least 1 byte shorter */
} else if (flags != WALLY_TX_DUMMY_NULL)
return WALLY_EINVAL;
return wally_tx_witness_stack_set(stack, index, p, len);
} | cmpl $0x1, %edx
je 0xeeea
movl %edx, %eax
leaq 0x544d4(%rip), %rdx # 0x633a0
cmpl $0x2, %eax
je 0xeee0
cmpl $0x4, %eax
jne 0xeef3
movl $0x48, %ecx
jmp 0xecba
movl $0x49, %ecx
jmp 0xecba
xorl %edx, %edx
xorl %ecx, %ecx
jmp 0xecba
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
wally_tx_elements_input_issuance_set | int wally_tx_elements_input_issuance_set(
struct wally_tx_input *input,
const unsigned char *nonce,
size_t nonce_len,
const unsigned char *entropy,
size_t entropy_len,
const unsigned char *issuance_amount,
size_t issuance_amount_len,
const unsigned char *inflation_keys,
size_t inflation_keys_len,
const unsigned char *issuance_amount_rangeproof,
size_t issuance_amount_rangeproof_len,
const unsigned char *inflation_keys_rangeproof,
size_t inflation_keys_rangeproof_len)
{
#ifdef BUILD_ELEMENTS
unsigned char *input_issuance_amount = input->issuance_amount;
size_t input_issuance_amount_len = input->issuance_amount_len;
unsigned char *input_inflation_keys = input->inflation_keys;
size_t input_inflation_keys_len = input->inflation_keys_len;
unsigned char *input_issuance_amount_rangeproof = input->issuance_amount_rangeproof;
size_t input_issuance_amount_rangeproof_len = input->issuance_amount_rangeproof_len;
unsigned char *input_inflation_keys_rangeproof = input->inflation_keys_rangeproof;
size_t input_inflation_keys_rangeproof_len = input->inflation_keys_rangeproof_len;
#endif /* BUILD_ELEMENTS */
int ret = tx_elements_input_issuance_init(input,
nonce,
nonce_len,
entropy,
entropy_len,
issuance_amount,
issuance_amount_len,
inflation_keys,
inflation_keys_len,
issuance_amount_rangeproof,
issuance_amount_rangeproof_len,
inflation_keys_rangeproof,
inflation_keys_rangeproof_len,
true);
#ifdef BUILD_ELEMENTS
if (ret == WALLY_OK) {
clear_and_free(input_issuance_amount, input_issuance_amount_len);
clear_and_free(input_inflation_keys, input_inflation_keys_len);
clear_and_free(input_issuance_amount_rangeproof, input_issuance_amount_rangeproof_len);
clear_and_free(input_inflation_keys_rangeproof, input_inflation_keys_rangeproof_len);
}
#endif /* BUILD_ELEMENTS */
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movaps 0x90(%rsp), %xmm0
movaps 0xa0(%rsp), %xmm1
movaps 0xb0(%rsp), %xmm2
movq 0xc0(%rsp), %rax
movq 0x88(%rdi), %rbx
movq 0x90(%rdi), %r14
movq 0x98(%rdi), %r13
movq 0xa0(%rdi), %rbp
movq 0xa8(%rdi), %r10
movq %r10, 0x40(%rsp)
movq 0xb0(%rdi), %r12
movq 0xb8(%rdi), %r10
movq %r10, 0x50(%rsp)
movq 0xc0(%rdi), %r10
movq %r10, 0x48(%rsp)
movq %rax, 0x30(%rsp)
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movl $0x1, 0x38(%rsp)
callq 0xefd9
movl %eax, %r15d
testl %eax, %eax
jne 0xefc7
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbf25
movq %r13, %rdi
movq %rbp, %rsi
callq 0xbf25
movq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0xbf25
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0xbf25
movl %r15d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
tx_elements_input_issuance_init | static int tx_elements_input_issuance_init(
struct wally_tx_input *input,
const unsigned char *nonce,
size_t nonce_len,
const unsigned char *entropy,
size_t entropy_len,
const unsigned char *issuance_amount,
size_t issuance_amount_len,
const unsigned char *inflation_keys,
size_t inflation_keys_len,
const unsigned char *issuance_amount_rangeproof,
size_t issuance_amount_rangeproof_len,
const unsigned char *inflation_keys_rangeproof,
size_t inflation_keys_rangeproof_len,
bool is_elements)
{
#ifdef BUILD_ELEMENTS
int ret;
unsigned char *new_issuance_amount = NULL, *new_inflation_keys = NULL;
#endif
if (!input ||
BYTES_INVALID_N(nonce, nonce_len, WALLY_TX_ASSET_TAG_LEN) ||
BYTES_INVALID_N(entropy, entropy_len, WALLY_TX_ASSET_TAG_LEN) ||
BYTES_INVALID(issuance_amount, issuance_amount_len) ||
BYTES_INVALID(inflation_keys, inflation_keys_len) ||
BYTES_INVALID(issuance_amount_rangeproof, issuance_amount_rangeproof_len) ||
BYTES_INVALID(inflation_keys_rangeproof, inflation_keys_rangeproof_len))
return WALLY_EINVAL;
#ifdef BUILD_ELEMENTS
if (!clone_bytes(&new_issuance_amount, issuance_amount, issuance_amount_len) ||
!clone_bytes(&new_inflation_keys, inflation_keys, inflation_keys_len))
ret = WALLY_ENOMEM;
else
ret = tx_elements_input_issuance_proof_init(input,
issuance_amount_rangeproof,
issuance_amount_rangeproof_len,
inflation_keys_rangeproof,
inflation_keys_rangeproof_len);
if (ret != WALLY_OK) {
clear_and_free(new_issuance_amount, issuance_amount_len);
clear_and_free(new_inflation_keys, inflation_keys_len);
return ret;
}
TX_COPY_ELSE_CLEAR(input->blinding_nonce, nonce, sizeof(input->blinding_nonce));
TX_COPY_ELSE_CLEAR(input->entropy, entropy, sizeof(input->entropy));
input->issuance_amount = new_issuance_amount;
input->issuance_amount_len = issuance_amount_len;
input->inflation_keys = new_inflation_keys;
input->inflation_keys_len = inflation_keys_len;
#endif
if (is_elements) {
input->features |= WALLY_TX_IS_ELEMENTS;
if (nonce || entropy)
input->features |= WALLY_TX_IS_ISSUANCE;
}
return WALLY_OK;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0xf163
movq %rcx, %r14
movq %rsi, %r15
testq %rsi, %rsi
setne %al
cmpq $0x20, %rdx
setne %cl
cmpb %cl, %al
je 0xf163
testq %r14, %r14
setne %al
cmpq $0x20, %r8
setne %cl
cmpb %cl, %al
je 0xf163
movq %r9, %r13
movq 0x40(%rsp), %r12
testq %r9, %r9
setne %al
testq %r12, %r12
sete %cl
cmpb %cl, %al
je 0xf163
movq 0x50(%rsp), %rdx
cmpq $0x0, 0x48(%rsp)
setne %al
testq %rdx, %rdx
sete %cl
cmpb %cl, %al
je 0xf163
cmpq $0x0, 0x58(%rsp)
setne %al
cmpq $0x0, 0x60(%rsp)
sete %cl
cmpb %cl, %al
je 0xf163
cmpq $0x0, 0x68(%rsp)
setne %al
cmpq $0x0, 0x70(%rsp)
sete %cl
cmpb %cl, %al
je 0xf163
movq %rdi, %rbx
testq %r12, %r12
je 0xf0bc
movq %r12, %rdi
callq 0xbd35
testq %rax, %rax
je 0xf118
movq %rax, (%rsp)
movq %rax, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x5100
movq 0x50(%rsp), %rdx
jmp 0xf0c4
movq $0x0, (%rsp)
testq %rdx, %rdx
je 0xf0f1
movq %rdx, %r13
movq %rdx, %rdi
callq 0xbd35
testq %rax, %rax
je 0xf142
movq %rax, %rbp
movq %rax, %rdi
movq 0x48(%rsp), %rsi
movq %r13, %rdx
callq 0x5100
movq %rbp, %r13
jmp 0xf0f4
xorl %r13d, %r13d
movq %rbx, %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %r8
callq 0x1403a
testl %eax, %eax
je 0xf124
movl %eax, %ebp
jmp 0xf14a
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
xorl %r13d, %r13d
xorl %edi, %edi
jmp 0xf14e
leaq 0x41(%rbx), %rdi
movq %r13, %rbp
testq %r15, %r15
je 0xf174
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%rdi)
movups %xmm0, (%rdi)
jmp 0xf17e
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
xorl %r13d, %r13d
movq (%rsp), %rdi
movq %r12, %rsi
callq 0xbf25
movq %r13, %rdi
movq 0x50(%rsp), %rsi
callq 0xbf25
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %esi
callq 0xba8b
movb 0x78(%rsp), %r13b
leaq 0x61(%rbx), %rdi
testq %r14, %r14
je 0xf19e
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rdi)
movups %xmm0, (%rdi)
jmp 0xf1a8
movl $0x20, %esi
callq 0xba8b
movq (%rsp), %rax
movq %rax, 0x88(%rbx)
movq %r12, 0x90(%rbx)
movq %rbp, 0x98(%rbx)
movq 0x50(%rsp), %rax
movq %rax, 0xa0(%rbx)
xorl %ebp, %ebp
testb %r13b, %r13b
je 0xf163
movb 0x40(%rbx), %al
movl %eax, %ecx
orb $0x1, %cl
movb %cl, 0x40(%rbx)
orq %r14, %r15
je 0xf163
orb $0x3, %al
movb %al, 0x40(%rbx)
jmp 0xf163
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
wally_tx_elements_input_issuance_free | int wally_tx_elements_input_issuance_free(
struct wally_tx_input *input)
{
(void) input;
#ifdef BUILD_ELEMENTS
if (input) {
input->features &= ~(WALLY_TX_IS_ELEMENTS | WALLY_TX_IS_ISSUANCE);
wally_clear(input->blinding_nonce, sizeof(input->blinding_nonce));
wally_clear(input->entropy, sizeof(input->entropy));
#define FREE_PTR_AND_LEN(name) clear_and_free(input->name, input->name ## _len); \
input->name = NULL; input->name ## _len = 0
FREE_PTR_AND_LEN(issuance_amount);
FREE_PTR_AND_LEN(inflation_keys);
FREE_PTR_AND_LEN(issuance_amount_rangeproof);
FREE_PTR_AND_LEN(inflation_keys_rangeproof);
#undef FREE_PTR_AND_LEN
tx_witness_stack_free(input->pegin_witness, true);
input->pegin_witness = NULL;
}
#endif /* BUILD_ELEMENTS */
return WALLY_OK;
} | testq %rdi, %rdi
je 0xf2ab
pushq %rbx
movq %rdi, %rbx
andb $-0x4, 0x40(%rdi)
addq $0x41, %rdi
movl $0x20, %esi
callq 0xba8b
leaq 0x61(%rbx), %rdi
movl $0x20, %esi
callq 0xba8b
movq 0x88(%rbx), %rdi
movq 0x90(%rbx), %rsi
callq 0xbf25
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%rbx)
movq 0x98(%rbx), %rdi
movq 0xa0(%rbx), %rsi
callq 0xbf25
xorps %xmm0, %xmm0
movups %xmm0, 0x98(%rbx)
movq 0xa8(%rbx), %rdi
movq 0xb0(%rbx), %rsi
callq 0xbf25
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%rbx)
movq 0xb8(%rbx), %rdi
movq 0xc0(%rbx), %rsi
callq 0xbf25
xorps %xmm0, %xmm0
movups %xmm0, 0xb8(%rbx)
movq 0xc8(%rbx), %rdi
callq 0xede8
movq $0x0, 0xc8(%rbx)
popq %rbx
xorl %eax, %eax
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
wally_tx_elements_input_init | int wally_tx_elements_input_init(
const unsigned char *txhash, size_t txhash_len,
uint32_t utxo_index, uint32_t sequence,
const unsigned char *script, size_t script_len,
const struct wally_tx_witness_stack *witness,
const unsigned char *nonce, size_t nonce_len,
const unsigned char *entropy, size_t entropy_len,
const unsigned char *issuance_amount, size_t issuance_amount_len,
const unsigned char *inflation_keys, uint64_t inflation_keys_len,
const unsigned char *issuance_amount_rangeproof, size_t issuance_amount_rangeproof_len,
const unsigned char *inflation_keys_rangeproof, size_t inflation_keys_rangeproof_len,
const struct wally_tx_witness_stack *pegin_witness,
struct wally_tx_input *output)
{
return tx_elements_input_init(
txhash, txhash_len,
utxo_index, sequence,
script, script_len,
witness, nonce, nonce_len,
entropy, entropy_len,
issuance_amount, issuance_amount_len,
inflation_keys, inflation_keys_len,
issuance_amount_rangeproof, issuance_amount_rangeproof_len,
inflation_keys_rangeproof, inflation_keys_rangeproof_len,
pegin_witness, output, true);
} | subq $0x88, %rsp
movaps 0x90(%rsp), %xmm0
movaps 0xa0(%rsp), %xmm1
movaps 0xb0(%rsp), %xmm2
movaps 0xc0(%rsp), %xmm3
movaps 0xd0(%rsp), %xmm4
movaps 0xe0(%rsp), %xmm5
movaps 0xf0(%rsp), %xmm6
movq 0x100(%rsp), %rax
movq %rax, 0x70(%rsp)
movups %xmm6, 0x60(%rsp)
movups %xmm5, 0x50(%rsp)
movups %xmm4, 0x40(%rsp)
movups %xmm3, 0x30(%rsp)
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movl $0x1, 0x78(%rsp)
callq 0xf331
addq $0x88, %rsp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
tx_elements_input_init | static int tx_elements_input_init(
const unsigned char *txhash, size_t txhash_len,
uint32_t utxo_index, uint32_t sequence,
const unsigned char *script, size_t script_len,
const struct wally_tx_witness_stack *witness,
const unsigned char *nonce, size_t nonce_len,
const unsigned char *entropy, size_t entropy_len,
const unsigned char *issuance_amount, size_t issuance_amount_len,
const unsigned char *inflation_keys, size_t inflation_keys_len,
const unsigned char *issuance_amount_rangeproof, size_t issuance_amount_rangeproof_len,
const unsigned char *inflation_keys_rangeproof, size_t inflation_keys_rangeproof_len,
const struct wally_tx_witness_stack *pegin_witness,
struct wally_tx_input *output, bool is_elements)
{
struct wally_tx_witness_stack *new_witness = NULL;
struct wally_tx_witness_stack *new_pegin_witness = NULL;
unsigned char *new_script = NULL;
int ret = WALLY_OK, old_features;
if (!txhash || txhash_len != WALLY_TXHASH_LEN ||
BYTES_INVALID(script, script_len) || !output)
return WALLY_EINVAL;
old_features = output->features;
if (witness)
ret = wally_tx_witness_stack_clone_alloc(witness, &new_witness);
if (ret == WALLY_OK && pegin_witness)
ret = wally_tx_witness_stack_clone_alloc(pegin_witness, &new_pegin_witness);
if (ret == WALLY_OK && !clone_bytes(&new_script, script, script_len))
ret = WALLY_ENOMEM;
if (ret == WALLY_OK) {
output->features = 0;
ret = tx_elements_input_issuance_init(output,
nonce,
nonce_len,
entropy,
entropy_len,
issuance_amount,
issuance_amount_len,
inflation_keys,
inflation_keys_len,
issuance_amount_rangeproof,
issuance_amount_rangeproof_len,
inflation_keys_rangeproof,
inflation_keys_rangeproof_len,
is_elements);
}
if (ret != WALLY_OK) {
wally_tx_witness_stack_free(new_witness);
wally_tx_witness_stack_free(new_pegin_witness);
clear_and_free(new_script, script_len);
output->features = old_features;
} else {
const bool is_coinbase = is_coinbase_bytes(txhash, WALLY_TXHASH_LEN, utxo_index);
memcpy(output->txhash, txhash, WALLY_TXHASH_LEN);
if (is_elements && !is_coinbase)
output->index = utxo_index & WALLY_TX_INDEX_MASK;
else
output->index = utxo_index;
if (is_elements && !is_coinbase && (utxo_index & WALLY_TX_PEGIN_FLAG))
output->features |= WALLY_TX_IS_PEGIN;
if (is_coinbase)
output->features |= WALLY_TX_IS_COINBASE;
output->sequence = sequence;
output->script = new_script;
output->script_len = script_len;
output->witness = new_witness;
#ifdef BUILD_ELEMENTS
output->pegin_witness = new_pegin_witness;
#endif /* BUILD_ELEMENTS */
}
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r15d
xorl %eax, %eax
movq %rax, 0x20(%rsp)
movq %rax, 0x18(%rsp)
testq %rdi, %rdi
sete %al
cmpq $0x20, %rsi
setne %dl
orb %al, %dl
movl $0xfffffffe, %r14d # imm = 0xFFFFFFFE
jne 0xf4e5
movq %r9, %rbx
movq %r8, %r13
movq 0xd0(%rsp), %rdx
testq %r8, %r8
setne %al
testq %r9, %r9
sete %sil
xorb %al, %sil
xorb $0x1, %sil
testq %rdx, %rdx
sete %al
orb %sil, %al
jne 0xf4e5
movq %rdi, %r12
movl %ecx, 0xc(%rsp)
movq 0xc8(%rsp), %rbp
movq 0x60(%rsp), %rdi
movb 0x40(%rdx), %al
movb %al, 0xb(%rsp)
testq %rdi, %rdi
je 0xf3c9
leaq 0x20(%rsp), %rsi
callq 0xeba7
movl %eax, %r14d
jmp 0xf3cc
xorl %r14d, %r14d
testl %r14d, %r14d
setne %al
testq %rbp, %rbp
sete %cl
orb %al, %cl
jne 0xf3ec
leaq 0x18(%rsp), %rsi
movq %rbp, %rdi
callq 0xeba7
movl %eax, %r14d
testl %r14d, %r14d
je 0xf3f9
xorl %r15d, %r15d
jmp 0xf4b7
testq %rbx, %rbx
je 0xf424
movq %rbx, %rdi
callq 0xbd35
testq %rax, %rax
je 0xf50d
movq %rax, 0x10(%rsp)
movq %rax, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x5100
jmp 0xf42d
movq $0x0, 0x10(%rsp)
movb 0xd8(%rsp), %bpl
movq 0xc0(%rsp), %rax
movq 0xb8(%rsp), %r10
movq 0xb0(%rsp), %r11
movq 0xa8(%rsp), %r14
movq 0x88(%rsp), %r9
movq 0x80(%rsp), %r8
movq 0x78(%rsp), %rcx
movq 0x70(%rsp), %rdx
movq 0x68(%rsp), %rsi
movq 0xd0(%rsp), %rdi
movb $0x0, 0x40(%rdi)
movzbl %bpl, %r13d
pushq %r13
pushq %rax
pushq %r10
pushq %r11
pushq %r14
pushq 0xc8(%rsp)
pushq 0xc8(%rsp)
pushq 0xc8(%rsp)
callq 0xefd9
addq $0x40, %rsp
testl %eax, %eax
je 0xf4f7
movl %eax, %r14d
movq 0x10(%rsp), %r15
movq 0x20(%rsp), %rdi
callq 0xede8
movq 0x18(%rsp), %rdi
callq 0xede8
movq %r15, %rdi
movq %rbx, %rsi
callq 0xbf25
movq 0xd0(%rsp), %rax
movb 0xb(%rsp), %cl
movb %cl, 0x40(%rax)
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $-0x1, %r15d
je 0xf518
xorl %eax, %eax
movq 0xd0(%rsp), %rdx
movl 0xc(%rsp), %esi
jmp 0xf54d
movl $0xfffffffd, %r14d # imm = 0xFFFFFFFD
jmp 0xf3f1
cmpb $0x0, (%r12)
movq 0xd0(%rsp), %rdx
movl 0xc(%rsp), %esi
je 0xf52f
xorl %eax, %eax
jmp 0xf54d
xorl %ecx, %ecx
movq %rcx, %rax
cmpq $0x1f, %rcx
je 0xf546
leaq 0x1(%rax), %rcx
cmpb $0x0, 0x1(%r12,%rax)
je 0xf531
cmpq $0x1f, %rax
setae %al
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups %xmm1, 0x10(%rdx)
movups %xmm0, (%rdx)
xorb $0x1, %bpl
orb %al, %bpl
cmpb $0x1, %bpl
jne 0xf577
movl %r15d, 0x20(%rdx)
movq 0x10(%rsp), %rcx
jmp 0xf593
movl %r15d, %ecx
andl $0x3fffffff, %ecx # imm = 0x3FFFFFFF
movl %ecx, 0x20(%rdx)
btl $0x1e, %r15d
movq 0x10(%rsp), %rcx
jae 0xf593
orb $0x4, 0x40(%rdx)
testb %al, %al
je 0xf59b
orb $0x8, 0x40(%rdx)
movl %esi, 0x24(%rdx)
movq %rcx, 0x28(%rdx)
movq %rbx, 0x30(%rdx)
movq 0x20(%rsp), %rax
movq %rax, 0x38(%rdx)
movq 0x18(%rsp), %rax
movq %rax, 0xc8(%rdx)
xorl %r14d, %r14d
jmp 0xf4e5
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
wally_tx_input_init | int wally_tx_input_init(const unsigned char *txhash, size_t txhash_len,
uint32_t utxo_index, uint32_t sequence,
const unsigned char *script, size_t script_len,
const struct wally_tx_witness_stack *witness,
struct wally_tx_input *output)
{
return tx_elements_input_init(txhash, txhash_len,
utxo_index, sequence,
script, script_len,
witness, NULL, 0, NULL, 0,
NULL, 0, NULL, 0, NULL, 0, NULL, 0, NULL,
output, false);
} | subq $0x88, %rsp
movq 0x90(%rsp), %rax
movq 0x98(%rsp), %r10
movq %r10, 0x70(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rsp)
movups %xmm0, 0x48(%rsp)
movups %xmm0, 0x38(%rsp)
movups %xmm0, 0x28(%rsp)
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
movq %rax, (%rsp)
movl $0x0, 0x78(%rsp)
movq $0x0, 0x68(%rsp)
callq 0xf331
addq $0x88, %rsp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
wally_tx_elements_input_init_alloc | int wally_tx_elements_input_init_alloc(
const unsigned char *txhash, size_t txhash_len,
uint32_t utxo_index, uint32_t sequence,
const unsigned char *script, size_t script_len,
const struct wally_tx_witness_stack *witness,
const unsigned char *nonce, size_t nonce_len,
const unsigned char *entropy, size_t entropy_len,
const unsigned char *issuance_amount, size_t issuance_amount_len,
const unsigned char *inflation_keys, size_t inflation_keys_len,
const unsigned char *issuance_amount_rangeproof, size_t issuance_amount_rangeproof_len,
const unsigned char *inflation_keys_rangeproof, size_t inflation_keys_rangeproof_len,
const struct wally_tx_witness_stack *pegin_witness,
struct wally_tx_input **output)
{
struct wally_tx_input *result;
int ret;
TX_CHECK_OUTPUT;
TX_OUTPUT_ALLOC(struct wally_tx_input);
ret = tx_elements_input_init(txhash, txhash_len, utxo_index, sequence,
script, script_len, witness,
nonce, nonce_len, entropy, entropy_len,
issuance_amount, issuance_amount_len,
inflation_keys, inflation_keys_len,
issuance_amount_rangeproof,
issuance_amount_rangeproof_len,
inflation_keys_rangeproof,
inflation_keys_rangeproof_len, pegin_witness,
result, true);
if (ret != WALLY_OK) {
clear_and_free(result, sizeof(*result));
*output = NULL;
}
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0xb0(%rsp), %rbx
testq %rbx, %rbx
je 0xf717
movq %r8, %r15
movl %ecx, %ebp
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %r14
movq %r9, (%rsp)
movq $0x0, (%rbx)
movl $0xd0, %edi
callq 0xbd3b
movq %rax, (%rbx)
testq %rax, %rax
je 0xf71e
movq %rax, %rbx
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %edx
movl %ebp, %ecx
movq %r15, %r8
movq (%rsp), %r9
pushq $0x1
pushq %rax
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
pushq 0xb8(%rsp)
callq 0xf331
addq $0x80, %rsp
testl %eax, %eax
je 0xf725
movl %eax, %ebp
movl $0xd0, %esi
movq %rbx, %rdi
callq 0xbf25
movq 0xb0(%rsp), %rax
movq $0x0, (%rax)
jmp 0xf727
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
jmp 0xf727
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
jmp 0xf727
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
wally_tx_input_init_alloc | int wally_tx_input_init_alloc(const unsigned char *txhash, size_t txhash_len,
uint32_t utxo_index, uint32_t sequence,
const unsigned char *script, size_t script_len,
const struct wally_tx_witness_stack *witness,
struct wally_tx_input **output)
{
struct wally_tx_input *result;
int ret;
TX_CHECK_OUTPUT;
TX_OUTPUT_ALLOC(struct wally_tx_input);
ret = wally_tx_input_init(txhash, txhash_len, utxo_index, sequence,
script, script_len, witness, result);
if (ret != WALLY_OK) {
clear_and_free(result, sizeof(*result));
*output = NULL;
}
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq 0xd8(%rsp), %r14
testq %r14, %r14
je 0xf814
movl %ecx, %ebp
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %rbx
movq %r8, 0x88(%rsp)
movq %r9, 0x90(%rsp)
movq $0x0, (%r14)
movl $0xd0, %edi
callq 0xbd3b
movq %rax, (%r14)
testq %rax, %rax
je 0xf81b
movq %rax, %r15
movq 0xd0(%rsp), %rax
movq %r15, 0x70(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rsp)
movups %xmm0, 0x48(%rsp)
movups %xmm0, 0x38(%rsp)
movups %xmm0, 0x28(%rsp)
movups %xmm0, 0x18(%rsp)
movups %xmm0, 0x8(%rsp)
movq %rax, (%rsp)
movl $0x0, 0x78(%rsp)
movq $0x0, 0x68(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
movl %r12d, %edx
movl %ebp, %ecx
movq 0x88(%rsp), %r8
movq 0x90(%rsp), %r9
callq 0xf331
testl %eax, %eax
je 0xf822
movl %eax, %ebx
movl $0xd0, %esi
movq %r15, %rdi
callq 0xbf25
movq $0x0, (%r14)
jmp 0xf824
movl $0xfffffffe, %ebx # imm = 0xFFFFFFFE
jmp 0xf824
movl $0xfffffffd, %ebx # imm = 0xFFFFFFFD
jmp 0xf824
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
tx_input_free | static int tx_input_free(struct wally_tx_input *input, bool free_parent)
{
if (input) {
clear_and_free(input->script, input->script_len);
tx_witness_stack_free(input->witness, true);
wally_tx_elements_input_issuance_free(input);
wally_clear(input, sizeof(*input));
if (free_parent)
wally_free(input);
}
return WALLY_OK;
} | pushq %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xf892
movl %esi, %ebp
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
movq 0x30(%rbx), %rsi
callq 0xbf25
movq 0x38(%rbx), %rdi
callq 0xede8
movq %rbx, %rdi
callq 0xf1f2
movl $0xd0, %esi
movq %rbx, %rdi
callq 0xba8b
testb %bpl, %bpl
je 0xf892
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xba94
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
wally_tx_output_clone_alloc | int wally_tx_output_clone_alloc(const struct wally_tx_output *src,
struct wally_tx_output **output)
{
struct wally_tx_output *result;
int ret;
TX_CHECK_OUTPUT;
TX_OUTPUT_ALLOC(struct wally_tx_output);
ret = wally_tx_output_clone(src, result);
if (ret != WALLY_OK) {
wally_free(result);
*output = NULL;
}
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xfb3c
movq %rsi, %rbx
movq %rdi, %r15
movq $0x0, (%rsi)
movl $0x70, %edi
callq 0xbd3b
movq %rax, (%rbx)
testq %rax, %rax
je 0xfb43
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0xf899
testl %eax, %eax
je 0xfb4a
movl %eax, %ebp
movq %r14, %rdi
callq 0xba94
movq $0x0, (%rbx)
jmp 0xfb4c
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
jmp 0xfb4c
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
jmp 0xfb4c
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
wally_tx_elements_output_commitment_set | int wally_tx_elements_output_commitment_set(
struct wally_tx_output *output,
const unsigned char *asset,
size_t asset_len,
const unsigned char *value,
size_t value_len,
const unsigned char *nonce,
size_t nonce_len,
const unsigned char *surjectionproof,
size_t surjectionproof_len,
const unsigned char *rangeproof,
size_t rangeproof_len)
{
#ifdef BUILD_ELEMENTS
unsigned char *output_asset = output->asset;
size_t output_asset_len = output->asset_len;
unsigned char *output_value = output->value;
size_t output_value_len = output->value_len;
unsigned char *output_nonce = output->nonce;
size_t output_nonce_len = output->nonce_len;
unsigned char *output_surjectionproof = output->surjectionproof;
size_t output_surjectionproof_len = output->surjectionproof_len;
unsigned char *output_rangeproof = output->rangeproof;
size_t output_rangeproof_len = output->rangeproof_len;
#endif /* BUILD_ELEMENTS */
int ret = tx_elements_output_commitment_init(output, asset, asset_len,
value, value_len,
nonce, nonce_len,
surjectionproof, surjectionproof_len,
rangeproof, rangeproof_len, true);
if (ret == WALLY_OK) {
#ifdef BUILD_ELEMENTS
clear_and_free(output_asset, output_asset_len);
clear_and_free(output_value, output_value_len);
clear_and_free(output_nonce, output_nonce_len);
clear_and_free(output_surjectionproof, output_surjectionproof_len);
clear_and_free(output_rangeproof, output_rangeproof_len);
#endif /* BUILD_ELEMENTS */
}
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movaps 0x90(%rsp), %xmm0
movaps 0xa0(%rsp), %xmm1
movq 0xb0(%rsp), %rax
movq 0x20(%rdi), %r12
movq 0x28(%rdi), %r13
movq 0x30(%rdi), %rbx
movq 0x38(%rdi), %r14
movq 0x40(%rdi), %r10
movq %r10, 0x30(%rsp)
movq 0x48(%rdi), %rbp
movq 0x50(%rdi), %r10
movq %r10, 0x40(%rsp)
movq 0x58(%rdi), %r10
movq %r10, 0x38(%rsp)
movq 0x60(%rdi), %r10
movq %r10, 0x50(%rsp)
movq 0x68(%rdi), %r10
movq %r10, 0x48(%rsp)
movq %rax, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movl $0x1, 0x28(%rsp)
callq 0xfc35
movl %eax, %r15d
testl %eax, %eax
jne 0xfc23
movq %r12, %rdi
movq %r13, %rsi
callq 0xbf25
movq %rbx, %rdi
movq %r14, %rsi
callq 0xbf25
movq 0x30(%rsp), %rdi
movq %rbp, %rsi
callq 0xbf25
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0xbf25
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0xbf25
movl %r15d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
tx_elements_output_commitment_init | static int tx_elements_output_commitment_init(
struct wally_tx_output *output,
const unsigned char *asset,
size_t asset_len,
const unsigned char *value,
size_t value_len,
const unsigned char *nonce,
size_t nonce_len,
const unsigned char *surjectionproof,
size_t surjectionproof_len,
const unsigned char *rangeproof,
size_t rangeproof_len,
bool is_elements)
{
#ifdef BUILD_ELEMENTS
int ret;
unsigned char *new_asset = NULL, *new_value = NULL, *new_nonce = NULL;
#endif
if (!output ||
BYTES_INVALID_N(asset, asset_len, WALLY_TX_ASSET_CT_ASSET_LEN) ||
((value != NULL) != (value_len == WALLY_TX_ASSET_CT_VALUE_LEN ||
value_len == WALLY_TX_ASSET_CT_VALUE_UNBLIND_LEN)) ||
BYTES_INVALID_N(nonce, nonce_len, WALLY_TX_ASSET_CT_NONCE_LEN) ||
BYTES_INVALID(surjectionproof, surjectionproof_len) ||
BYTES_INVALID(rangeproof, rangeproof_len))
return WALLY_EINVAL;
#ifdef BUILD_ELEMENTS
if (!clone_bytes(&new_asset, asset, asset_len) ||
!clone_bytes(&new_value, value, value_len) ||
!clone_bytes(&new_nonce, nonce, nonce_len))
ret = WALLY_ENOMEM;
else
ret = tx_elements_output_proof_init(output,
surjectionproof,
surjectionproof_len,
rangeproof,
rangeproof_len);
if (ret != WALLY_OK) {
clear_and_free(new_asset, asset_len);
clear_and_free(new_value, value_len);
clear_and_free(new_nonce, nonce_len);
return ret;
}
output->asset = new_asset;
output->asset_len = asset_len;
output->value = new_value;
output->value_len = value_len;
output->nonce = new_nonce;
output->nonce_len = nonce_len;
#endif /* BUILD_ELEMENTS */
if (is_elements)
output->features |= WALLY_TX_IS_ELEMENTS;
return WALLY_OK;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0xfe4e
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
testq %rsi, %rsi
setne %al
cmpq $0x21, %rdx
setne %cl
cmpb %cl, %al
je 0xfe4e
testq %r15, %r15
setne %al
cmpq $0x21, %r8
setne %cl
cmpq $0x9, %r8
setne %dl
andb %cl, %dl
cmpb %dl, %al
je 0xfe4e
movq %r9, %r13
movq %rdi, %r12
movq 0x50(%rsp), %rdi
testq %r9, %r9
setne %al
cmpq $0x21, %rdi
setne %cl
cmpb %cl, %al
je 0xfe4e
movq 0x58(%rsp), %rsi
testq %rsi, %rsi
setne %al
cmpq $0x0, 0x60(%rsp)
sete %cl
cmpb %cl, %al
je 0xfe4e
cmpq $0x0, 0x68(%rsp)
setne %al
cmpq $0x0, 0x70(%rsp)
sete %cl
cmpb %cl, %al
je 0xfe4e
testq %r14, %r14
movq %r8, 0x10(%rsp)
movq %rsi, %rbp
je 0xfd22
movq %r14, %rdi
callq 0xbd35
testq %rax, %rax
je 0xfd95
movq %rax, (%rsp)
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x5100
movq 0x10(%rsp), %r8
movq 0x50(%rsp), %rdi
movq %rbp, %rsi
jmp 0xfd2a
movq $0x0, (%rsp)
testq %r8, %r8
je 0xfd60
movq %r8, %rdi
movq %r8, %rbx
callq 0xbd35
testq %rax, %rax
je 0xfdcd
movq %rax, 0x8(%rsp)
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x5100
movq 0x50(%rsp), %rdi
movq %rbp, %rsi
jmp 0xfd69
movq $0x0, 0x8(%rsp)
testq %rdi, %rdi
je 0xfda6
movq %rdi, %rbx
callq 0xbd35
testq %rax, %rax
je 0xfe1b
movq %rax, %r15
movq %rax, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x5100
movq %rbp, %rsi
jmp 0xfda9
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
xorl %r15d, %r15d
xorl %ebx, %ebx
xorl %edi, %edi
jmp 0xfe2c
xorl %r15d, %r15d
movq %r12, %rdi
movq 0x60(%rsp), %rdx
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %r8
callq 0x1412b
testl %eax, %eax
movq 0x8(%rsp), %rbx
je 0xfddd
movl %eax, %ebp
jmp 0xfdd7
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
xorl %r15d, %r15d
xorl %ebx, %ebx
movq (%rsp), %rdi
jmp 0xfe2c
movb 0x78(%rsp), %al
movq (%rsp), %rcx
movq %rcx, 0x20(%r12)
movq %r14, 0x28(%r12)
movq %rbx, 0x30(%r12)
movq 0x10(%rsp), %rcx
movq %rcx, 0x38(%r12)
movq %r15, 0x40(%r12)
movq 0x50(%rsp), %rcx
movq %rcx, 0x48(%r12)
xorl %ebp, %ebp
testb %al, %al
je 0xfe4e
orb $0x1, 0x18(%r12)
jmp 0xfe4e
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
xorl %r15d, %r15d
movq (%rsp), %rdi
movq 0x8(%rsp), %rbx
movq %r14, %rsi
callq 0xbf25
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0xbf25
movq %r15, %rdi
movq 0x50(%rsp), %rsi
callq 0xbf25
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
wally_tx_elements_output_commitment_free | int wally_tx_elements_output_commitment_free(
struct wally_tx_output *output)
{
(void) output;
#ifdef BUILD_ELEMENTS
if (output) {
output->features &= ~WALLY_TX_IS_ELEMENTS;
clear_and_free(output->asset, output->asset_len);
clear_and_free(output->value, output->value_len);
clear_and_free(output->nonce, output->nonce_len);
clear_and_free(output->surjectionproof, output->surjectionproof_len);
clear_and_free(output->rangeproof, output->rangeproof_len);
}
#endif /* BUILD_ELEMENTS */
return WALLY_OK;
} | testq %rdi, %rdi
je 0xfeae
pushq %rbx
movq %rdi, %rbx
andb $-0x2, 0x18(%rdi)
movq 0x20(%rdi), %rdi
movq 0x28(%rbx), %rsi
callq 0xbf25
movq 0x30(%rbx), %rdi
movq 0x38(%rbx), %rsi
callq 0xbf25
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rsi
callq 0xbf25
movq 0x50(%rbx), %rdi
movq 0x58(%rbx), %rsi
callq 0xbf25
movq 0x60(%rbx), %rdi
movq 0x68(%rbx), %rsi
callq 0xbf25
popq %rbx
xorl %eax, %eax
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
tx_elements_output_init | static int tx_elements_output_init(
uint64_t satoshi,
const unsigned char *script,
size_t script_len,
const unsigned char *asset,
size_t asset_len,
const unsigned char *value,
size_t value_len,
const unsigned char *nonce,
size_t nonce_len,
const unsigned char *surjectionproof,
size_t surjectionproof_len,
const unsigned char *rangeproof,
size_t rangeproof_len,
struct wally_tx_output *output,
bool is_elements)
{
int ret, old_features;
unsigned char *new_script = NULL;
if (BYTES_INVALID(script, script_len) || !output ||
(satoshi > WALLY_SATOSHI_MAX && !is_elements))
return WALLY_EINVAL;
if (!clone_bytes(&new_script, script, script_len))
return WALLY_ENOMEM;
old_features = output->features;
output->features = 0;
if ((ret = tx_elements_output_commitment_init(output, asset, asset_len,
value, value_len,
nonce, nonce_len,
surjectionproof, surjectionproof_len,
rangeproof, rangeproof_len,
is_elements)) != WALLY_OK) {
output->features = old_features;
clear_and_free(new_script, script_len);
return ret;
}
output->script = new_script;
output->script_len = script_len;
output->satoshi = satoshi;
return WALLY_OK;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r15
movb 0x90(%rsp), %dil
movq 0x88(%rsp), %r14
testq %rsi, %rsi
setne %al
testq %rdx, %rdx
sete %sil
xorb %al, %sil
testq %r14, %r14
setne %al
movabsq $0x775f05a074001, %rdx # imm = 0x775F05A074001
cmpq %rdx, %r15
setb %dl
orb %dil, %dl
andb %sil, %dl
andb %al, %dl
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
cmpb $0x1, %dl
jne 0x10032
movq %rcx, (%rsp)
movq %r8, 0x8(%rsp)
movq %r9, 0x10(%rsp)
testq %rbx, %rbx
je 0xffad
movl %edi, %ebp
movq %rbx, %rdi
callq 0xbd35
testq %rax, %rax
je 0x1002d
movq %rax, %r12
movq %rax, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x5100
movl %ebp, %edi
jmp 0xffb0
xorl %r12d, %r12d
movq 0x80(%rsp), %rax
movq 0x78(%rsp), %r10
movq 0x70(%rsp), %r11
movq 0x58(%rsp), %r9
movq 0x50(%rsp), %r8
movb 0x18(%r14), %r13b
movb $0x0, 0x18(%r14)
movzbl %dil, %ebp
movq %r14, %rdi
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
pushq %rbp
pushq %rax
pushq %r10
pushq %r11
pushq 0x88(%rsp)
pushq 0x88(%rsp)
callq 0xfc35
addq $0x30, %rsp
testl %eax, %eax
je 0x1001e
movl %eax, %ebp
movb %r13b, 0x18(%r14)
movq %r12, %rdi
movq %rbx, %rsi
callq 0xbf25
jmp 0x10032
movq %r12, 0x8(%r14)
movq %rbx, 0x10(%r14)
movq %r15, (%r14)
xorl %ebp, %ebp
jmp 0x10032
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
wally_tx_elements_output_init_alloc | int wally_tx_elements_output_init_alloc(
const unsigned char *script,
size_t script_len,
const unsigned char *asset,
size_t asset_len,
const unsigned char *value,
size_t value_len,
const unsigned char *nonce,
size_t nonce_len,
const unsigned char *surjectionproof,
size_t surjectionproof_len,
const unsigned char *rangeproof,
size_t rangeproof_len,
struct wally_tx_output **output)
{
struct wally_tx_output *result;
int ret;
TX_CHECK_OUTPUT;
TX_OUTPUT_ALLOC(struct wally_tx_output);
ret = tx_elements_output_init(-1, script, script_len,
asset, asset_len,
value, value_len,
nonce, nonce_len,
surjectionproof,
surjectionproof_len,
rangeproof, rangeproof_len,
result, true);
if (ret != WALLY_OK) {
clear_and_free(result, sizeof(*result));
*output = NULL;
}
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x70(%rsp), %r14
testq %r14, %r14
je 0x10100
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %rbx
movq %r9, (%rsp)
movq $0x0, (%r14)
movl $0x70, %edi
callq 0xbd3b
movq %rax, (%r14)
testq %rax, %rax
je 0x10107
movq %rax, %r14
subq $0x8, %rsp
movq $-0x1, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq %r13, %rcx
movq %r12, %r8
movq %r15, %r9
pushq $0x1
pushq %rax
pushq 0x80(%rsp)
pushq 0x80(%rsp)
pushq 0x80(%rsp)
pushq 0x80(%rsp)
pushq 0x80(%rsp)
pushq 0x80(%rsp)
pushq 0x48(%rsp)
callq 0xff0f
addq $0x50, %rsp
testl %eax, %eax
je 0x1010e
movl %eax, %ebx
movl $0x70, %esi
movq %r14, %rdi
callq 0xbf25
movq 0x70(%rsp), %rax
movq $0x0, (%rax)
jmp 0x10110
movl $0xfffffffe, %ebx # imm = 0xFFFFFFFE
jmp 0x10110
movl $0xfffffffd, %ebx # imm = 0xFFFFFFFD
jmp 0x10110
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
wally_tx_output_init_alloc | int wally_tx_output_init_alloc(uint64_t satoshi,
const unsigned char *script, size_t script_len,
struct wally_tx_output **output)
{
struct wally_tx_output *result;
int ret;
TX_CHECK_OUTPUT;
TX_OUTPUT_ALLOC(struct wally_tx_output);
ret = wally_tx_output_init(satoshi, script, script_len, result);
if (ret != WALLY_OK) {
clear_and_free(result, sizeof(*result));
*output = NULL;
}
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
testq %rcx, %rcx
je 0x101fc
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq $0x0, (%rcx)
movl $0x70, %edi
callq 0xbd3b
movq %rax, (%rbx)
testq %rax, %rax
je 0x10203
movq %rax, %r14
movq %rax, 0x38(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsp)
movups %xmm0, 0x10(%rsp)
movups %xmm0, (%rsp)
movl $0x0, 0x40(%rsp)
movq $0x0, 0x30(%rsp)
xorl %ebp, %ebp
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xff0f
testl %eax, %eax
je 0x10208
movl %eax, %r15d
movl $0x70, %esi
movq %r14, %rdi
callq 0xbf25
movq $0x0, (%rbx)
movl %r15d, %ebp
jmp 0x10208
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
jmp 0x10208
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/transaction.c |
add | static void add(struct sha256_ctx *ctx, const void *p, size_t len)
{
const unsigned char *data = p;
size_t bufsize = ctx->bytes % 64;
if (bufsize + len >= 64) {
/* Fill the buffer, and process it. */
memcpy(ctx->buf.u8 + bufsize, data, 64 - bufsize);
ctx->bytes += 64 - bufsize;
data += 64 - bufsize;
len -= 64 - bufsize;
Transform(ctx->s, ctx->buf.u32, 1);
bufsize = 0;
}
while (len >= 64) {
/* Process full chunks directly from the source. */
if (alignment_ok(data, sizeof(uint32_t))) {
const size_t blocks = len / 64;
Transform(ctx->s, (const uint32_t *)data, blocks);
ctx->bytes += 64 * blocks;
data += 64 * blocks;
len -= 64 * blocks;
} else {
memcpy(ctx->buf.u8, data, sizeof(ctx->buf));
Transform(ctx->s, ctx->buf.u32, 1);
ctx->bytes += 64;
data += 64;
len -= 64;
}
}
if (len) {
/* Fill the buffer with what remains. */
memcpy(ctx->buf.u8 + bufsize, data, len);
ctx->bytes += len;
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x60(%rdi), %rbp
andl $0x3f, %ebp
leaq (%rdx,%rbp), %rax
cmpq $0x40, %rax
jb 0x1731f
leaq 0x20(%r14), %r12
leaq (%r14,%rbp), %rdi
addq $0x20, %rdi
movl $0x40, %r13d
subq %rbp, %r13
movq %r15, %rsi
movq %r13, %rdx
callq 0x5100
addq %r13, 0x60(%r14)
addq %r13, %r15
subq %r13, %rbx
movl $0x1, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x17525
xorl %ebp, %ebp
cmpq $0x40, %rbx
jb 0x17348
movq %rbx, %rdx
shrq $0x6, %rdx
movq %rbx, %r12
andq $-0x40, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x17525
addq %r12, 0x60(%r14)
andl $0x3f, %ebx
addq %r12, %r15
testq %rbx, %rbx
je 0x17364
leaq (%r14,%rbp), %rdi
addq $0x20, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x5100
addq %rbx, 0x60(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/ccan/ccan/crypto/sha256/sha256.c |
sha256_done | void sha256_done(struct sha256_ctx *ctx, struct sha256 *res)
{
static const unsigned char pad[64] = {0x80};
uint64_t sizedesc;
size_t i;
sizedesc = cpu_to_be64((uint64_t)ctx->bytes << 3);
/* Add '1' bit to terminate, then all 0 bits, up to next block - 8. */
add(ctx, pad, 1 + ((128 - 8 - (ctx->bytes % 64) - 1) % 64));
/* Add number of bits of data (big endian) */
add(ctx, &sizedesc, 8);
for (i = 0; i < sizeof(ctx->s) / sizeof(ctx->s[0]); i++)
res->u.u32[i] = cpu_to_be32(ctx->s[i]);
invalidate_sha256(ctx);
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x60(%rdi), %rax
leaq (,%rax,8), %rcx
bswapq %rcx
leaq 0x8(%rsp), %r15
movq %rcx, (%r15)
movl $0x37, %edx
subl %eax, %edx
andl $0x3f, %edx
incq %rdx
leaq 0x4c323(%rip), %rsi # 0x636d0
callq 0x172be
movl $0x8, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x172be
xorl %eax, %eax
movl (%rbx,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%r14,%rax,4)
incq %rax
cmpq $0x8, %rax
jne 0x173c4
movq $-0x1, 0x60(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/ccan/ccan/crypto/sha256/sha256.c |
Transform | static inline void Transform(uint32_t *s, const uint32_t *chunk, size_t blocks)
{
#if defined(__x86_64__) || defined(__amd64__)
if (use_optimized_transform) {
TransformSSE4(s, chunk, blocks);
return;
}
#endif
TransformDefault(s, chunk, blocks);
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
cmpb $0x1, 0x69e4f(%rip) # 0x8138c
jne 0x18209
movq %rdi, %r15
shlq $0x6, %rdx
je 0x18204
addq %rsi, %rdx
movq %rdx, 0xa8(%rsp)
movl (%r15), %eax
movl 0x4(%r15), %ecx
movl 0x8(%r15), %ebp
movl 0xc(%r15), %r12d
movl 0x10(%r15), %edx
movl 0x14(%r15), %edi
movl 0x18(%r15), %r8d
movl 0x1c(%r15), %r9d
movdqa 0x4c0ad(%rip), %xmm12 # 0x63630
movdqa 0x4c0b4(%rip), %xmm10 # 0x63640
movdqa 0x4c0bb(%rip), %xmm11 # 0x63650
| /p2pderivatives[P]cfd-go/external/libwally-core/src/ccan/ccan/crypto/sha256/sha256.c |
sha512_done | void sha512_done(struct sha512_ctx *ctx, struct sha512 *res)
{
static const unsigned char pad[128] = { 0x80 };
uint64_t sizedesc[2] = { 0, 0 };
size_t i;
sizedesc[1] = cpu_to_be64((uint64_t)ctx->bytes << 3);
/* Add '1' bit to terminate, then all 0 bits, up to next block - 16. */
add(ctx, pad, 1 + ((256 - 16 - (ctx->bytes % 128) - 1) % 128));
/* Add number of bits of data (big endian) */
add(ctx, sizedesc, sizeof(sizedesc));
for (i = 0; i < sizeof(ctx->s) / sizeof(ctx->s[0]); i++)
res->u.u64[i] = cpu_to_be64(ctx->s[i]);
invalidate_sha512(ctx);
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
movq 0xc0(%rdi), %rax
leaq (,%rax,8), %rcx
bswapq %rcx
movq %rcx, 0x8(%r15)
movl $0x6f, %edx
subl %eax, %edx
andl $0x7f, %edx
incq %rdx
leaq 0x48ede(%rip), %rsi # 0x638b0
callq 0x1a8d3
movl $0x10, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a8d3
xorl %eax, %eax
movq (%rbx,%rax,8), %rcx
bswapq %rcx
movq %rcx, (%r14,%rax,8)
incq %rax
cmpq $0x8, %rax
jne 0x1a9e9
movq $-0x1, 0xc0(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/ccan/ccan/crypto/sha512/sha512.c |
secp256k1_fe_normalizes_to_zero_var | static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe *r) {
uint64_t t0, t1, t2, t3, t4;
uint64_t z0, z1;
uint64_t x;
t0 = r->n[0];
t4 = r->n[4];
/* Reduce t4 at the start so there will be at most a single carry from the first pass */
x = t4 >> 48;
/* The first pass ensures the magnitude is 1, ... */
t0 += x * 0x1000003D1ULL;
/* z0 tracks a possible raw value of 0, z1 tracks a possible raw value of P */
z0 = t0 & 0xFFFFFFFFFFFFFULL;
z1 = z0 ^ 0x1000003D0ULL;
/* Fast return path should catch the majority of cases */
if ((z0 != 0ULL) & (z1 != 0xFFFFFFFFFFFFFULL)) {
return 0;
}
t1 = r->n[1];
t2 = r->n[2];
t3 = r->n[3];
t4 &= 0x0FFFFFFFFFFFFULL;
t1 += (t0 >> 52);
t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; z0 |= t1; z1 &= t1;
t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; z0 |= t2; z1 &= t2;
t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; z0 |= t3; z1 &= t3;
z0 |= t4; z1 &= t4 ^ 0xF000000000000ULL;
/* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */
VERIFY_CHECK(t4 >> 49 == 0);
return (z0 == 0) | (z1 == 0xFFFFFFFFFFFFFULL);
} | movabsq $0xfffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFF
movabsq $0x1000003d0, %r8 # imm = 0x1000003D0
movq 0x20(%rdi), %rsi
movq %rsi, %rax
shrq $0x30, %rax
leaq 0x1(%r8), %rdx
imulq %rax, %rdx
addq (%rdi), %rdx
movq %rdx, %r9
andq %rcx, %r9
movabsq $0xffffefffffc2f, %rax # imm = 0xFFFFEFFFFFC2F
cmpq %rax, %r9
je 0x4bacd
xorl %eax, %eax
testq %r9, %r9
jne 0x4bb38
orq %rdx, %r8
movabsq $0xffffffffffff, %r9 # imm = 0xFFFFFFFFFFFF
movq %rdx, %rax
shrq $0x34, %rax
addq 0x8(%rdi), %rax
movq %rax, %r10
shrq $0x34, %r10
addq 0x10(%rdi), %r10
orq %rax, %rdx
orq %r10, %rdx
andq %r8, %rax
andq %r10, %rax
shrq $0x34, %r10
addq 0x18(%rdi), %r10
andq %r9, %rsi
orq %r10, %rdx
andq %r10, %rax
shrq $0x34, %r10
addq %rsi, %r10
andq %rcx, %rdx
movabsq $0xf000000000000, %rsi # imm = 0xF000000000000
xorq %r10, %rsi
andq %rsi, %rax
orq %r10, %rdx
sete %dl
cmpq %rcx, %rax
sete %al
orb %dl, %al
movzbl %al, %eax
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/secp256k1/src/field_5x52_impl.h |
secp256k1_pedersen_ecmult_small | static void secp256k1_pedersen_ecmult_small(secp256k1_gej *r, uint64_t gn, const secp256k1_ge* genp) {
secp256k1_scalar s;
secp256k1_pedersen_scalar_set_u64(&s, gn);
secp256k1_ecmult_const(r, genp, &s, 64);
secp256k1_scalar_clear(&s);
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdx, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movl $0x18, %eax
movq %rsi, %rcx
shrq $0x38, %rcx
movb %cl, (%rsp,%rax)
shlq $0x8, %rsi
incq %rax
cmpq $0x20, %rax
jne 0x547a0
leaq 0x20(%rsp), %r15
movq %rsp, %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x1f734
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl $0x40, %ecx
callq 0x24fe9
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/secp256k1/src/modules/rangeproof/pedersen_impl.h |
secp256k1_rangeproof_pub_expand | SECP256K1_INLINE static void secp256k1_rangeproof_pub_expand(secp256k1_gej *pubs,
int exp, size_t *rsizes, size_t rings, const secp256k1_ge* genp) {
secp256k1_gej base;
size_t i;
size_t j;
size_t npub;
VERIFY_CHECK(exp < 19);
if (exp < 0) {
exp = 0;
}
secp256k1_gej_set_ge(&base, genp);
secp256k1_gej_neg(&base, &base);
while (exp--) {
/* Multiplication by 10 */
secp256k1_gej tmp;
secp256k1_gej_double_var(&tmp, &base, NULL);
secp256k1_gej_double_var(&base, &tmp, NULL);
secp256k1_gej_double_var(&base, &base, NULL);
secp256k1_gej_add_var(&base, &base, &tmp, NULL);
}
npub = 0;
for (i = 0; i < rings; i++) {
for (j = 1; j < rsizes[i]; j++) {
secp256k1_gej_add_var(&pubs[npub + j], &pubs[npub + j - 1], &base, NULL);
}
if (i < rings - 1) {
secp256k1_gej_double_var(&base, &base, NULL);
secp256k1_gej_double_var(&base, &base, NULL);
}
npub += rsizes[i];
}
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rcx, 0x8(%rsp)
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, 0x10(%rsp)
movl 0x50(%r8), %eax
leaq 0x20(%rsp), %rdi
movl %eax, 0x78(%rdi)
movups (%r8), %xmm0
movups 0x10(%r8), %xmm1
movaps %xmm0, (%rdi)
movaps %xmm1, 0x10(%rdi)
movq 0x20(%r8), %rax
movq %rax, 0x20(%rdi)
movups 0x28(%r8), %xmm0
movups 0x38(%r8), %xmm1
movups %xmm0, 0x28(%rdi)
movups %xmm1, 0x38(%rdi)
movq 0x48(%r8), %rax
movq %rax, 0x48(%rdi)
movq $0x1, 0x50(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movq %rdi, %rsi
callq 0x3101b
testl %ebp, %ebp
jle 0x579cc
leaq 0xa8(%rsp), %r12
leaq 0x20(%rsp), %r13
cmpl $0x0, 0x98(%rsp)
je 0x57974
movl $0x1, 0x120(%rsp)
jmp 0x5799e
movq %r12, %rdi
movq %r13, %rsi
callq 0x44148
cmpl $0x0, 0x120(%rsp)
jne 0x5799e
movq %r13, %rdi
movq %r12, %rsi
callq 0x44148
cmpl $0x0, 0x98(%rsp)
je 0x579bf
movl $0x1, 0x98(%rsp)
decl %ebp
movq %r13, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x547e6
testl %ebp, %ebp
jne 0x5795d
jmp 0x579cc
movq %r13, %rdi
movq %r13, %rsi
callq 0x44148
jmp 0x579a9
cmpq $0x0, 0x8(%rsp)
je 0x57a73
movq 0x8(%rsp), %rax
decq %rax
movq %rax, 0x18(%rsp)
xorl %r15d, %r15d
leaq 0x20(%rsp), %r12
xorl %ebx, %ebx
cmpq $0x2, (%r14,%rbx,8)
jb 0x57a25
movq %r15, %rsi
shlq $0x7, %rsi
addq 0x10(%rsp), %rsi
movl $0x1, %ebp
leaq 0x80(%rsi), %r13
movq %r13, %rdi
movq %r12, %rdx
callq 0x547e6
incq %rbp
movq %r13, %rsi
cmpq (%r14,%rbx,8), %rbp
jb 0x57a07
cmpq 0x18(%rsp), %rbx
jae 0x57a56
cmpl $0x0, 0x98(%rsp)
jne 0x57a4b
movq %r12, %rdi
movq %r12, %rsi
callq 0x44148
cmpl $0x0, 0x98(%rsp)
je 0x57a66
movl $0x1, 0x98(%rsp)
addq (%r14,%rbx,8), %r15
incq %rbx
cmpq 0x8(%rsp), %rbx
jne 0x579ef
jmp 0x57a73
movq %r12, %rdi
movq %r12, %rsi
callq 0x44148
jmp 0x57a56
addq $0x128, %rsp # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/secp256k1/src/modules/rangeproof/rangeproof_impl.h |
secp256k1_whitelist_hash_pubkey | static int secp256k1_whitelist_hash_pubkey(secp256k1_scalar* output, secp256k1_gej* pubkey) {
unsigned char h[32];
unsigned char c[33];
secp256k1_sha256 sha;
int overflow = 0;
size_t size = 33;
secp256k1_ge ge;
secp256k1_ge_set_gej(&ge, pubkey);
secp256k1_sha256_initialize(&sha);
if (!secp256k1_eckey_pubkey_serialize(&ge, c, &size, SECP256K1_EC_COMPRESSED)) {
return 0;
}
secp256k1_sha256_write(&sha, c, size);
secp256k1_sha256_finalize(&sha, h);
secp256k1_scalar_set_b32(output, h, &overflow);
if (overflow || secp256k1_scalar_is_zero(output)) {
/* This return path is mathematically impossible to hit */
secp256k1_scalar_clear(output);
return 0;
}
return 1;
} | pushq %r15
pushq %r14
pushq %rbx
subq $0x130, %rsp # imm = 0x130
movq %rdi, %rbx
movl $0x0, 0x4(%rsp)
leaq 0x8(%rsp), %r14
movq $0x21, (%r14)
leaq 0xd8(%rsp), %r15
movq %r15, %rdi
callq 0x2422d
movaps 0xb2fe(%rip), %xmm0 # 0x639f0
movaps %xmm0, 0x40(%rsp)
movaps 0xb302(%rip), %xmm0 # 0x63a00
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0xa0(%rsp)
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
movl $0x102, %ecx # imm = 0x102
callq 0x1f529
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x5879f
movq 0x8(%rsp), %rdx
leaq 0x40(%rsp), %r14
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x28660
leaq 0xb0(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2b04d
leaq 0x4(%rsp), %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1f734
cmpl $0x0, (%r14)
je 0x5877d
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
xorl %eax, %eax
jmp 0x5879f
movdqu (%rbx), %xmm0
movdqu 0x10(%rbx), %xmm1
por %xmm0, %xmm1
pxor %xmm0, %xmm0
pcmpeqd %xmm1, %xmm0
movmskps %xmm0, %eax
xorl $0xf, %eax
movl $0x1, %eax
je 0x5876f
addq $0x130, %rsp # imm = 0x130
popq %rbx
popq %r14
popq %r15
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/secp256k1/src/modules/whitelist/whitelist_impl.h |
key_is_valid | static bool key_is_valid(const struct ext_key *hdkey)
{
bool is_private = key_is_private(hdkey);
bool is_master = !hdkey->depth;
uint8_t ver_flags = is_private ? BIP32_FLAG_KEY_PRIVATE : BIP32_FLAG_KEY_PUBLIC;
if (!version_is_valid(hdkey->version, ver_flags))
return false;
if (mem_is_zero(hdkey->chain_code, sizeof(hdkey->chain_code)) ||
(hdkey->pub_key[0] != 0x2 && hdkey->pub_key[0] != 0x3) ||
mem_is_zero(hdkey->pub_key + 1, sizeof(hdkey->pub_key) - 1))
return false;
if (hdkey->priv_key[0] != BIP32_FLAG_KEY_PUBLIC &&
hdkey->priv_key[0] != BIP32_FLAG_KEY_PRIVATE)
return false;
if (is_private &&
mem_is_zero(hdkey->priv_key + 1, sizeof(hdkey->priv_key) - 1))
return false;
if (is_master &&
!mem_is_zero(hdkey->parent160, sizeof(hdkey->parent160)))
return false;
return true;
} | movb 0x34(%rdi), %al
movb 0x3f(%rdi), %cl
movl 0x78(%rdi), %edx
cmpl $0x4358394, %edx # imm = 0x4358394
je 0x59297
cmpl $0x488ade4, %edx # imm = 0x488ADE4
jne 0x592b4
cmpb $0x0, (%rdi)
je 0x592ca
movb 0x7f(%rdi), %dl
andb $-0x2, %dl
cmpb $0x2, %dl
jne 0x59319
cmpb $0x0, 0x80(%rdi)
je 0x592ed
xorl %edx, %edx
jmp 0x5930d
testb %cl, %cl
je 0x59319
cmpl $0x488b21e, %edx # imm = 0x488B21E
je 0x59297
cmpl $0x43587cf, %edx # imm = 0x43587CF
je 0x59297
jmp 0x59319
movq $-0x1, %rdx
cmpq $0x1e, %rdx
je 0x59319
leaq 0x1(%rdx), %rsi
cmpb $0x0, 0x2(%rdi,%rdx)
movq %rsi, %rdx
je 0x592d1
cmpq $0x1e, %rsi
jbe 0x5929c
jmp 0x59319
xorl %esi, %esi
movq %rsi, %rdx
cmpq $0x1f, %rsi
je 0x59306
leaq 0x1(%rdx), %rsi
cmpb $0x0, 0x81(%rdi,%rdx)
je 0x592ef
cmpq $0x1f, %rdx
setae %dl
cmpb $0x2, %cl
setae %sil
orb %dl, %sil
je 0x5931c
xorl %eax, %eax
retq
testb %cl, %cl
jne 0x59326
cmpb $0x0, 0x40(%rdi)
je 0x59354
testb %al, %al
je 0x5932d
movb $0x1, %al
retq
cmpb $0x0, 0x20(%rdi)
jne 0x59319
xorl %eax, %eax
cmpq $0x13, %rax
je 0x5932a
leaq 0x1(%rax), %rcx
cmpb $0x0, 0x21(%rdi,%rax)
movq %rcx, %rax
je 0x59335
decq %rcx
cmpq $0x13, %rcx
jb 0x59319
jmp 0x5932a
xorl %ecx, %ecx
cmpq $0x1f, %rcx
je 0x59319
leaq 0x1(%rcx), %rdx
cmpb $0x0, 0x41(%rdi,%rcx)
movq %rdx, %rcx
je 0x59356
decq %rdx
cmpq $0x1e, %rdx
ja 0x59319
jmp 0x59326
| /p2pderivatives[P]cfd-go/external/libwally-core/src/bip32.c |
bip32_key_unserialize | int bip32_key_unserialize(const unsigned char *bytes, size_t bytes_len,
struct ext_key *key_out)
{
if (!bytes || bytes_len != BIP32_SERIALIZED_LEN || !key_out)
return WALLY_EINVAL;
wally_clear(key_out, sizeof(*key_out));
bytes = copy_in(&key_out->version, bytes, sizeof(key_out->version));
key_out->version = be32_to_cpu(key_out->version);
if (!version_is_valid(key_out->version, BIP32_FLAG_KEY_PUBLIC))
return wipe_key_fail(key_out);
bytes = copy_in(&key_out->depth, bytes, sizeof(key_out->depth));
/* We only have a partial fingerprint available. Copy it, but the
* user will need to call bip32_key_set_parent() (FIXME: Implement)
* later if they want it to be fully populated.
*/
bytes = copy_in(key_out->parent160, bytes, BIP32_KEY_FINGERPRINT_LEN);
bytes = copy_in(&key_out->child_num, bytes, sizeof(key_out->child_num));
key_out->child_num = be32_to_cpu(key_out->child_num);
bytes = copy_in(key_out->chain_code, bytes, sizeof(key_out->chain_code));
if (bytes[0] == BIP32_FLAG_KEY_PRIVATE) {
if (key_out->version == BIP32_VER_MAIN_PUBLIC ||
key_out->version == BIP32_VER_TEST_PUBLIC)
return wipe_key_fail(key_out); /* Private key data in public key */
copy_in(key_out->priv_key, bytes, sizeof(key_out->priv_key));
if (key_compute_pub_key(key_out) != WALLY_OK)
return wipe_key_fail(key_out);
} else {
if (key_out->version == BIP32_VER_MAIN_PRIVATE ||
key_out->version == BIP32_VER_TEST_PRIVATE)
return wipe_key_fail(key_out); /* Public key data in private key */
copy_in(key_out->pub_key, bytes, sizeof(key_out->pub_key));
bip32_key_strip_private_key(key_out);
}
key_compute_hash160(key_out);
return WALLY_OK;
} | pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
testq %rdi, %rdi
sete %al
cmpq $0x4e, %rsi
setne %cl
testq %rdx, %rdx
sete %dl
orb %al, %dl
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
orb %cl, %dl
jne 0x594c1
movq %rdi, %r14
movl $0xc0, %esi
movq %rbx, %rdi
callq 0xba8b
movl (%r14), %eax
bswapl %eax
movl %eax, 0x78(%rbx)
cmpl $0x488ade3, %eax # imm = 0x488ADE3
jg 0x593d0
cmpl $0x4358394, %eax # imm = 0x4358394
je 0x593e2
cmpl $0x43587cf, %eax # imm = 0x43587CF
je 0x593e2
jmp 0x594b4
cmpl $0x488ade4, %eax # imm = 0x488ADE4
je 0x593e2
cmpl $0x488b21e, %eax # imm = 0x488B21E
jne 0x594b4
movb 0x4(%r14), %cl
movb %cl, 0x34(%rbx)
movl 0x5(%r14), %ecx
movl %ecx, 0x20(%rbx)
movl 0x9(%r14), %ecx
bswapl %ecx
movl %ecx, 0x60(%rbx)
movups 0xd(%r14), %xmm0
movups 0x1d(%r14), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
leaq 0x2d(%r14), %rcx
cmpb $0x0, 0x2d(%r14)
je 0x59476
cmpl $0x488ade4, %eax # imm = 0x488ADE4
je 0x594b4
cmpl $0x4358394, %eax # imm = 0x4358394
je 0x594b4
movb 0x20(%rcx), %al
movb %al, 0x9f(%rbx)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x8f(%rbx)
movups %xmm0, 0x7f(%rbx)
movb $0x1, 0x3f(%rbx)
leaq 0x40(%rbx), %rdi
movl $0x20, %esi
callq 0xba8b
leaq 0x7f(%rbx), %rdi
addq $0x64, %rbx
movl $0x21, %esi
movl $0x14, %ecx
movq %rbx, %rdx
callq 0xbc9c
xorl %ebp, %ebp
jmp 0x594c1
cmpl $0x488b21e, %eax # imm = 0x488B21E
je 0x594b4
cmpl $0x43587cf, %eax # imm = 0x43587CF
je 0x594b4
movb 0x20(%rcx), %al
movb %al, 0x5f(%rbx)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x4f(%rbx)
movups %xmm0, 0x3f(%rbx)
leaq 0x40(%rbx), %rdi
leaq 0x7f(%rbx), %rdx
movl $0x20, %esi
movl $0x21, %ecx
callq 0xde0c
testl %eax, %eax
je 0x59458
movl $0xc0, %esi
movq %rbx, %rdi
callq 0xba8b
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/bip32.c |
bip32_key_from_parent_alloc | int bip32_key_from_parent_alloc(const struct ext_key *hdkey,
uint32_t child_num, uint32_t flags,
struct ext_key **output)
{
int ret;
ALLOC_KEY();
ret = bip32_key_from_parent(hdkey, child_num, flags, *output);
if (ret != WALLY_OK) {
wally_free(*output);
*output = 0;
}
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rcx, %rcx
je 0x598d4
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl $0xc0, %edi
callq 0xbd3b
movq %rax, (%rbx)
testq %rax, %rax
je 0x598db
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
movq %rax, %rcx
callq 0x59556
testl %eax, %eax
je 0x598e2
movl %eax, %ebp
movq (%rbx), %rdi
callq 0xba94
movq $0x0, (%rbx)
jmp 0x598e4
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
jmp 0x598e4
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
jmp 0x598e4
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/bip32.c |
bip32_key_from_parent_path | int bip32_key_from_parent_path(const struct ext_key *hdkey,
const uint32_t *child_path, size_t child_path_len,
uint32_t flags, struct ext_key *key_out)
{
/* Optimization: We can skip hash calculations for internal nodes */
uint32_t derivation_flags = flags | BIP32_FLAG_SKIP_HASH;
struct ext_key tmp[2];
size_t i, tmp_idx = 0;
int ret;
if (flags & ~BIP32_ALL_DEFINED_FLAGS)
return WALLY_EINVAL; /* These flags are not defined yet */
if (!hdkey || !child_path || !child_path_len || !key_out)
return WALLY_EINVAL;
for (i = 0; i < child_path_len; ++i) {
struct ext_key *derived = &tmp[tmp_idx];
#ifdef BUILD_ELEMENTS
if (flags & BIP32_FLAG_KEY_TWEAK_SUM)
memcpy(derived->pub_key_tweak_sum, hdkey->pub_key_tweak_sum, sizeof(hdkey->pub_key_tweak_sum));
#endif /* BUILD_ELEMENTS */
if (i + 2 >= child_path_len)
derivation_flags = flags; /* Use callers flags for the final derivations */
ret = bip32_key_from_parent(hdkey, child_path[i], derivation_flags, derived);
if (ret != WALLY_OK)
break;
hdkey = derived; /* Derived becomes next parent */
tmp_idx = !tmp_idx; /* Use free slot in tmp for next derived */
}
if (ret == WALLY_OK)
memcpy(key_out, hdkey, sizeof(*key_out));
wally_clear(tmp, sizeof(tmp));
return ret;
} | movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
cmpl $0x7, %ecx
ja 0x59a14
testq %rdi, %rdi
sete %r10b
testq %rsi, %rsi
sete %r9b
orb %r10b, %r9b
testq %rdx, %rdx
sete %r11b
testq %r8, %r8
sete %r10b
orb %r11b, %r10b
orb %r9b, %r10b
jne 0x59a14
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp # imm = 0x1A8
movq %r8, 0x8(%rsp)
movl %ecx, %r13d
orl $0x2, %r13d
movq %rdx, %rax
negq %rax
movq %rax, 0x18(%rsp)
movl $0x2, %r15d
xorl %r14d, %r14d
movq %rdx, 0x10(%rsp)
leaq (%r14,%r14,2), %rax
shlq $0x6, %rax
addq %rsp, %rax
addq $0x20, %rax
cmpl $0x4, %ecx
jb 0x59990
movups 0xa0(%rdi), %xmm0
movups 0xb0(%rdi), %xmm1
movups %xmm1, 0xb0(%rax)
movups %xmm0, 0xa0(%rax)
cmpq %rdx, %r15
movl %ecx, %r12d
cmovael %ecx, %r13d
movq %rsi, %rbx
movl -0x8(%rsi,%r15,4), %esi
movl %r13d, %edx
movq %rax, %rbp
movq %rax, %rcx
callq 0x59556
testl %eax, %eax
jne 0x599f0
xorq $0x1, %r14
movq 0x18(%rsp), %rcx
addq %r15, %rcx
incq %rcx
incq %r15
movq %rbp, %rdi
cmpq $0x2, %rcx
movq 0x10(%rsp), %rdx
movl %r12d, %ecx
movq %rbx, %rsi
jne 0x59960
movl $0xc0, %edx
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
movl %eax, %ebx
callq 0x5100
movl %ebx, %eax
leaq 0x20(%rsp), %rdi
movl $0x180, %esi # imm = 0x180
movl %eax, %ebx
callq 0xba8b
movl %ebx, %eax
addq $0x1a8, %rsp # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/bip32.c |
bip32_key_from_parent_path_alloc | int bip32_key_from_parent_path_alloc(const struct ext_key *hdkey,
const uint32_t *child_path, size_t child_path_len,
uint32_t flags,
struct ext_key **output)
{
int ret;
ALLOC_KEY();
ret = bip32_key_from_parent_path(hdkey, child_path, child_path_len,
flags, *output);
if (ret != WALLY_OK) {
wally_free(*output);
*output = 0;
}
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %r8, %r8
je 0x59a6c
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0xc0, %edi
callq 0xbd3b
movq %rax, (%rbx)
testq %rax, %rax
je 0x59a73
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
movq %rax, %r8
callq 0x598f1
testl %eax, %eax
je 0x59a7a
movl %eax, %ebp
movq (%rbx), %rdi
callq 0xba94
movq $0x0, (%rbx)
jmp 0x59a7c
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
jmp 0x59a7c
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
jmp 0x59a7c
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/bip32.c |
bip32_key_with_tweak_from_parent_path | int bip32_key_with_tweak_from_parent_path(const struct ext_key *hdkey,
const uint32_t *child_path,
size_t child_path_len,
uint32_t flags,
struct ext_key *output)
{
const secp256k1_context *ctx;
secp256k1_pubkey pub_key;
size_t len = EC_PUBLIC_KEY_LEN;
int ret;
if (!(ctx = secp_ctx()))
return WALLY_ENOMEM;
if (!(flags & (BIP32_FLAG_KEY_TWEAK_SUM | BIP32_FLAG_KEY_PUBLIC)))
return WALLY_EINVAL;
if ((ret = bip32_key_from_parent_path(hdkey, child_path,
child_path_len, flags, output)) != WALLY_OK)
return ret;
if (!pubkey_parse(&pub_key, hdkey->pub_key, sizeof(hdkey->pub_key)) ||
!pubkey_tweak_add(ctx, &pub_key, output->pub_key_tweak_sum) ||
!pubkey_serialize(output->pub_key, &len, &pub_key, PUBKEY_COMPRESSED))
return wipe_key_fail(output);
return WALLY_OK;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
movq $0x21, (%rsp)
callq 0xba16
testq %rax, %rax
je 0x59b46
movq %rax, %r14
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
testb $0x5, %bpl
je 0x59b4b
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movl %ebp, %ecx
movq %rbx, %r8
callq 0x598f1
testl %eax, %eax
jne 0x59b4b
addq $0x7f, %r15
leaq 0x8(%rsp), %rdi
movl $0x21, %edx
movq %r15, %rsi
callq 0xb9cb
testl %eax, %eax
je 0x59b32
leaq 0xa0(%rbx), %rdx
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x20f77
testl %eax, %eax
je 0x59b32
leaq 0x7f(%rbx), %rdi
movq %rsp, %rsi
leaq 0x8(%rsp), %rdx
movl $0x102, %ecx # imm = 0x102
callq 0xb9e3
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x59b4b
movl $0xc0, %esi
movq %rbx, %rdi
callq 0xba8b
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
jmp 0x59b4b
movl $0xfffffffd, %eax # imm = 0xFFFFFFFD
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/bip32.c |
bip32_key_with_tweak_from_parent_path_alloc | int bip32_key_with_tweak_from_parent_path_alloc(const struct ext_key *hdkey,
const uint32_t *child_path, size_t child_path_len,
uint32_t flags,
struct ext_key **output)
{
int ret;
ALLOC_KEY();
ret = bip32_key_with_tweak_from_parent_path(hdkey, child_path, child_path_len,
flags, *output);
if (ret != WALLY_OK) {
wally_free(*output);
*output = NULL;
}
return ret;
} | pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %r8, %r8
je 0x59bb1
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0xc0, %edi
callq 0xbd3b
movq %rax, (%rbx)
testq %rax, %rax
je 0x59bb8
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
movq %rax, %r8
callq 0x59a87
testl %eax, %eax
je 0x59bbf
movl %eax, %ebp
movq (%rbx), %rdi
callq 0xba94
movq $0x0, (%rbx)
jmp 0x59bc1
movl $0xfffffffe, %ebp # imm = 0xFFFFFFFE
jmp 0x59bc1
movl $0xfffffffd, %ebp # imm = 0xFFFFFFFD
jmp 0x59bc1
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| /p2pderivatives[P]cfd-go/external/libwally-core/src/bip32.c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.