LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: yanniss[P]souffle-num-addon/./num256.cpp
// Function: not_256
const char* not_256(const char *x) {
    thread_local static char out[STRING_LEN] = {"0x"};
    uint256_t my_x(x);
    uint256_t result = ~my_x;
    string str_result = result.str(32, ios_base::hex);
    transform(str_result.begin(), str_result.end(), str_result.begin(), ::tolower);
    strcpy(out+2, str_result.c_str());
    return out;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
xorl %eax, %eax
movl %eax, %edx
leaq -0x40(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
leaq -0x8(%rbp), %rsi
callq 0x61e80
movq -0xe0(%rbp), %rsi
leaq -0x70(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x62ed0
movq -0xd8(%rbp), %rsi
leaq -0x90(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
movl $0x20, %edx
movl $0x8, %ecx
callq 0x61dc0
movq -0xd0(%rbp), %rdi
callq 0x10590
movq -0xd0(%rbp), %rdi
movq %rax, -0x98(%rbp)
callq 0x103b0
movq -0xd0(%rbp), %rdi
movq %rax, -0xa0(%rbp)
callq 0x10590
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rdi
movq -0xa0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq 0x10cfd9(%rip), %rcx    # 0x13ffc0
callq 0x61e00
movq %rax, -0xc8(%rbp)
jmp 0x32ff5
movq -0xc8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq %fs:0x0, %rax
leaq -0x50(%rax), %rax
addq $0x2, %rax
movq %rax, -0xf0(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x102c0
movq -0xf0(%rbp), %rdi
movq %rax, %rsi
callq 0x10610
movq %fs:0x0, %rax
leaq -0x50(%rax), %rax
movq %rax, -0xe8(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x10d98
movq -0xe8(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x10d98
movq -0xb0(%rbp), %rdi
callq 0x10bc0
nopw %cs:(%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_make_key
int uECC_make_key(uint8_t *public_key,
                  uint8_t *private_key,
                  uECC_Curve curve) {
#if uECC_VLI_NATIVE_LITTLE_ENDIAN
    uECC_word_t *_private = (uECC_word_t *)private_key;
    uECC_word_t *_public = (uECC_word_t *)public_key;
#else
    uECC_word_t _private[uECC_MAX_WORDS];
    uECC_word_t _public[uECC_MAX_WORDS * 2];
#endif
    uECC_word_t tries;

    for (tries = 0; tries < uECC_RNG_MAX_TRIES; ++tries) {
        if (!uECC_generate_random_int(_private, curve->n, BITS_TO_WORDS(curve->num_n_bits))) {
            return 0;
        }

        if (EccPoint_compute_public_key(_public, _private, curve)) {
#if uECC_VLI_NATIVE_LITTLE_ENDIAN == 0
            uECC_vli_nativeToBytes(private_key, BITS_TO_BYTES(curve->num_n_bits), _private);
            uECC_vli_nativeToBytes(public_key, curve->num_bytes, _public);
            uECC_vli_nativeToBytes(
                public_key + curve->num_bytes, curve->num_bytes, _public + curve->num_words);
#endif
            return 1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x88(%rbp)
cmpq $0x40, -0x88(%rbp)
jae 0x196a
leaq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x28, %rsi
movq -0x20(%rbp), %rax
movswl 0x2(%rax), %eax
addl $0x3f, %eax
movl $0x40, %ecx
cltd
idivl %ecx
movsbl %al, %edx
callq 0x1980
cmpl $0x0, %eax
jne 0x18c8
movl $0x0, -0x4(%rbp)
jmp 0x1971
leaq -0x80(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1a90
cmpq $0x0, %rax
je 0x1951
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movswl 0x2(%rax), %eax
addl $0x7, %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %esi
leaq -0x40(%rbp), %rdx
callq 0x1b50
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %esi
leaq -0x80(%rbp), %rdx
callq 0x1b50
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %eax
cltq
addq %rax, %rdi
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %esi
leaq -0x80(%rbp), %rdx
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cltq
shlq $0x3, %rax
addq %rax, %rdx
callq 0x1b50
movl $0x1, -0x4(%rbp)
jmp 0x1971
jmp 0x1953
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
jmp 0x1882
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_generate_random_int(unsigned long*, unsigned long const*, signed char)
uECC_VLI_API int uECC_generate_random_int(uECC_word_t *random,
                                          const uECC_word_t *top,
                                          wordcount_t num_words) {
    uECC_word_t mask = (uECC_word_t)-1;
    uECC_word_t tries;
    bitcount_t num_bits = uECC_vli_numBits(top, num_words);

    if (!g_rng_function) {
        return 0;
    }

    for (tries = 0; tries < uECC_RNG_MAX_TRIES; ++tries) {
        if (!g_rng_function((uint8_t *)random, num_words * uECC_WORD_SIZE)) {
            return 0;
	    }
        random[num_words - 1] &= mask >> ((bitcount_t)(num_words * uECC_WORD_SIZE * 8 - num_bits));
        if (!uECC_vli_isZero(random, num_words) &&
		        uECC_vli_cmp(top, random, num_words) == 1) {
            return 1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq $-0x1, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movsbl -0x19(%rbp), %esi
callq 0x40a0
movw %ax, -0x32(%rbp)
cmpq $0x0, 0x9702(%rip)      # 0xb0b8
jne 0x19c4
movl $0x0, -0x4(%rbp)
jmp 0x1a7d
movq $0x0, -0x30(%rbp)
cmpq $0x40, -0x30(%rbp)
jae 0x1a76
movq 0x96da(%rip), %rax      # 0xb0b8
movq -0x10(%rbp), %rdi
movsbl -0x19(%rbp), %esi
shll $0x3, %esi
callq *%rax
cmpl $0x0, %eax
jne 0x19fc
movl $0x0, -0x4(%rbp)
jmp 0x1a7d
movq -0x28(%rbp), %rdx
movsbl -0x19(%rbp), %eax
shll $0x3, %eax
shll $0x3, %eax
movswl -0x32(%rbp), %ecx
subl %ecx, %eax
cwtl
movl %eax, %eax
movl %eax, %ecx
shrq %cl, %rdx
movq -0x10(%rbp), %rax
movsbl -0x19(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
andq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rdi
movsbl -0x19(%rbp), %esi
callq 0x22e0
cmpq $0x0, %rax
jne 0x1a63
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsbl -0x19(%rbp), %edx
callq 0x28f0
movsbl %al, %eax
cmpl $0x1, %eax
jne 0x1a63
movl $0x1, -0x4(%rbp)
jmp 0x1a7d
jmp 0x1a65
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x19cc
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: EccPoint_compute_public_key(unsigned long*, unsigned long*, uECC_Curve_t const*)
static uECC_word_t EccPoint_compute_public_key(uECC_word_t *result,
                                               uECC_word_t *private_key,
                                               uECC_Curve curve) {
    uECC_word_t tmp1[uECC_MAX_WORDS];
    uECC_word_t tmp2[uECC_MAX_WORDS];
    uECC_word_t *p2[2] = {tmp1, tmp2};
    uECC_word_t carry;

    /* Regularize the bitcount for the private key so that attackers cannot use a side channel
       attack to learn the number of leading zeros. */
    carry = regularize_k(private_key, tmp1, tmp2, curve);

    EccPoint_mult(result, curve->G, p2[!carry], 0, curve->num_n_bits + 1, curve);

    if (EccPoint_isZero(result, curve)) {
        return 0;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x1e20
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x48, %rsi
cmpq $0x0, -0x78(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movq -0x70(%rbp,%rax,8), %rdx
movq -0x20(%rbp), %rax
movswl 0x2(%rax), %eax
addl $0x1, %eax
movq -0x20(%rbp), %r9
xorl %ecx, %ecx
movswl %ax, %r8d
callq 0x1ef0
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
shll %eax
movsbl %al, %esi
callq 0x22e0
cmpq $0x0, %rax
je 0x1b2f
movq $0x0, -0x8(%rbp)
jmp 0x1b37
movq $0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_vli_nativeToBytes(unsigned char*, int, unsigned long const*)
uECC_VLI_API void uECC_vli_nativeToBytes(uint8_t *bytes,
                                         int num_bytes,
                                         const uECC_word_t *native) {
    wordcount_t i;
    for (i = 0; i < num_bytes; ++i) {
        unsigned b = num_bytes - 1 - i;
        bytes[i] = native[b / uECC_WORD_SIZE] >> (8 * (b % uECC_WORD_SIZE));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
movsbl -0x19(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x1bb1
movl -0xc(%rbp), %eax
subl $0x1, %eax
movsbl -0x19(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl -0x20(%rbp), %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movl -0x20(%rbp), %ecx
andl $0x7, %ecx
shll $0x3, %ecx
movl %ecx, %ecx
shrq %cl, %rax
movb %al, %dl
movq -0x8(%rbp), %rax
movsbq -0x19(%rbp), %rcx
movb %dl, (%rax,%rcx)
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x1b63
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_vli_bytesToNative(unsigned long*, unsigned char const*, int)
uECC_VLI_API void uECC_vli_bytesToNative(uECC_word_t *native,
                                         const uint8_t *bytes,
                                         int num_bytes) {
    wordcount_t i;
    uECC_vli_clear(native, (num_bytes + (uECC_WORD_SIZE - 1)) / uECC_WORD_SIZE);
    for (i = 0; i < num_bytes; ++i) {
        unsigned b = num_bytes - 1 - i;
        native[b / uECC_WORD_SIZE] |=
            (uECC_word_t)bytes[i] << (8 * (b % uECC_WORD_SIZE));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %eax
addl $0x7, %eax
movl $0x8, %ecx
cltd
idivl %ecx
movsbl %al, %esi
callq 0x4170
movb $0x0, -0x15(%rbp)
movsbl -0x15(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x1e16
movl -0x14(%rbp), %eax
subl $0x1, %eax
movsbl -0x15(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movsbq -0x15(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %edx
movl -0x1c(%rbp), %eax
andl $0x7, %eax
shll $0x3, %eax
movl %eax, %eax
movl %eax, %ecx
shlq %cl, %rdx
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movb -0x15(%rbp), %al
addb $0x1, %al
movb %al, -0x15(%rbp)
jmp 0x1dc1
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: regularize_k(unsigned long const*, unsigned long*, unsigned long*, uECC_Curve_t const*)
static uECC_word_t regularize_k(const uECC_word_t * const k,
                                uECC_word_t *k0,
                                uECC_word_t *k1,
                                uECC_Curve curve) {
    wordcount_t num_n_words = BITS_TO_WORDS(curve->num_n_bits);
    bitcount_t num_n_bits = curve->num_n_bits;
    uECC_word_t carry = uECC_vli_add(k0, k, curve->n, num_n_words) ||
        (num_n_bits < ((bitcount_t)num_n_words * uECC_WORD_SIZE * 8) &&
         uECC_vli_testBit(k0, num_n_bits));
    uECC_vli_add(k1, k0, curve->n, num_n_words);
    return carry;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movswl 0x2(%rax), %eax
addl $0x3f, %eax
movl $0x40, %ecx
cltd
idivl %ecx
movb %al, -0x21(%rbp)
movq -0x20(%rbp), %rax
movw 0x2(%rax), %ax
movw %ax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x28, %rdx
movsbl -0x21(%rbp), %ecx
callq 0x48c0
movq %rax, %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0x31(%rbp)
jne 0x1eb8
movswl -0x24(%rbp), %ecx
movsbl -0x21(%rbp), %eax
movswl %ax, %edx
shll $0x3, %edx
shll $0x3, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x32(%rbp)
jge 0x1eb2
movq -0x10(%rbp), %rdi
movswl -0x24(%rbp), %esi
callq 0x4130
cmpq $0x0, %rax
setne %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x28, %rdx
movsbl -0x21(%rbp), %ecx
callq 0x48c0
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_vli_isZero(unsigned long const*, signed char)
uECC_VLI_API uECC_word_t uECC_vli_isZero(const uECC_word_t *vli, wordcount_t num_words) {
    uECC_word_t bits = 0;
    wordcount_t i;
    for (i = 0; i < num_words; ++i) {
        bits |= vli[i];
    }
    return (bits == 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq $0x0, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
movsbl -0x19(%rbp), %eax
movsbl -0x9(%rbp), %ecx
cmpl %ecx, %eax
jge 0x2325
movq -0x8(%rbp), %rax
movsbq -0x19(%rbp), %rcx
movq (%rax,%rcx,8), %rax
orq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x22fa
cmpq $0x0, -0x18(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_compress
void uECC_compress(const uint8_t *public_key, uint8_t *compressed, uECC_Curve curve) {
    wordcount_t i;
    for (i = 0; i < curve->num_bytes; ++i) {
        compressed[i+1] = public_key[i];
    }
#if uECC_VLI_NATIVE_LITTLE_ENDIAN
    compressed[0] = 2 + (public_key[curve->num_bytes] & 0x01);
#else
    compressed[0] = 2 + (public_key[curve->num_bytes * 2 - 1] & 0x01);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
movsbl -0x19(%rbp), %eax
movq -0x18(%rbp), %rcx
movsbl 0x1(%rcx), %ecx
cmpl %ecx, %eax
jge 0x238b
movq -0x8(%rbp), %rax
movsbq -0x19(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movsbl -0x19(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x2354
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl 0x1(%rcx), %ecx
shll %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
addl $0x2, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_decompress
void uECC_decompress(const uint8_t *compressed, uint8_t *public_key, uECC_Curve curve) {
#if uECC_VLI_NATIVE_LITTLE_ENDIAN
    uECC_word_t *point = (uECC_word_t *)public_key;
#else
    uECC_word_t point[uECC_MAX_WORDS * 2];
#endif
    uECC_word_t *y = point + curve->num_words;
#if uECC_VLI_NATIVE_LITTLE_ENDIAN
    bcopy(public_key, compressed+1, curve->num_bytes);
#else
    uECC_vli_bytesToNative(point, compressed + 1, curve->num_bytes);
#endif
    curve->x_side(y, point, curve);
    curve->mod_sqrt(y, curve);

    if ((y[0] & 0x01) != (compressed[0] & 0x01)) {
        uECC_vli_sub(y, curve->p, y, curve->num_words);
    }

#if uECC_VLI_NATIVE_LITTLE_ENDIAN == 0
    uECC_vli_nativeToBytes(public_key, curve->num_bytes, point);
    uECC_vli_nativeToBytes(public_key + curve->num_bytes, curve->num_bytes, y);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x60(%rbp), %rax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x1, %rsi
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %edx
callq 0x1d90
movq -0x18(%rbp), %rax
movq 0xb8(%rax), %rax
movq -0x68(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
movq -0x18(%rbp), %rax
movq 0xb0(%rax), %rax
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movq -0x68(%rbp), %rax
movq (%rax), %rax
andq $0x1, %rax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
andl $0x1, %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
je 0x246d
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
movq -0x68(%rbp), %rdx
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
callq 0x24b0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %esi
leaq -0x60(%rbp), %rdx
callq 0x1b50
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %eax
cltq
addq %rax, %rdi
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %esi
movq -0x68(%rbp), %rdx
callq 0x1b50
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_vli_sub(unsigned long*, unsigned long const*, unsigned long const*, signed char)
uECC_VLI_API uECC_word_t uECC_vli_sub(uECC_word_t *result,
                                      const uECC_word_t *left,
                                      const uECC_word_t *right,
                                      wordcount_t num_words) {
    uECC_word_t borrow = 0;
    wordcount_t i;
    for (i = 0; i < num_words; ++i) {
        uECC_word_t diff = left[i] - right[i] - borrow;
        if (diff != left[i]) {
            borrow = (diff > left[i]);
        }
        result[i] = diff;
    }
    return borrow;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq $0x0, -0x28(%rbp)
movb $0x0, -0x29(%rbp)
movsbl -0x29(%rbp), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jge 0x254a
movq -0x10(%rbp), %rax
movsbq -0x29(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x18(%rbp), %rcx
movsbq -0x29(%rbp), %rdx
subq (%rcx,%rdx,8), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movsbq -0x29(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x252f
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movsbq -0x29(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
seta %al
andb $0x1, %al
movzbl %al, %eax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rdx
movq -0x8(%rbp), %rax
movsbq -0x29(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movb -0x29(%rbp), %al
addb $0x1, %al
movb %al, -0x29(%rbp)
jmp 0x24d1
movq -0x28(%rbp), %rax
popq %rbp
retq
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_valid_point(unsigned long const*, uECC_Curve_t const*)
int uECC_valid_point(const uECC_word_t *point, uECC_Curve curve) {
    uECC_word_t tmp1[uECC_MAX_WORDS];
    uECC_word_t tmp2[uECC_MAX_WORDS];
    wordcount_t num_words = curve->num_words;

    /* The point at infinity is invalid. */
    if (EccPoint_isZero(point, curve)) {
        return 0;
    }

    /* x and y must be smaller than p. */
    if (uECC_vli_cmp_unsafe(curve->p, point, num_words) != 1 ||
            uECC_vli_cmp_unsafe(curve->p, point + num_words, num_words) != 1) {
        return 0;
    }

    uECC_vli_modSquare_fast(tmp1, point + num_words, curve);
    curve->x_side(tmp2, point, curve); /* tmp2 = x^3 + ax + b */

    /* Make sure that y^2 == x^3 + ax + b */
    return (int)(uECC_vli_equal(tmp1, tmp2, num_words));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x61(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
shll %eax
movsbl %al, %esi
callq 0x22e0
cmpq $0x0, %rax
je 0x2590
movl $0x0, -0x4(%rbp)
jmp 0x262b
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
movsbl -0x61(%rbp), %edx
callq 0x2640
movsbl %al, %eax
cmpl $0x1, %eax
jne 0x25d7
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rsi
movsbl -0x61(%rbp), %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
movsbl -0x61(%rbp), %edx
callq 0x2640
movsbl %al, %eax
cmpl $0x1, %eax
je 0x25e0
movl $0x0, -0x4(%rbp)
jmp 0x262b
leaq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsbl -0x61(%rbp), %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
movq -0x18(%rbp), %rdx
callq 0x26c0
movq -0x18(%rbp), %rax
movq 0xb8(%rax), %rax
leaq -0x60(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movsbl -0x61(%rbp), %edx
callq 0x26f0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_vli_cmp_unsafe(unsigned long const*, unsigned long const*, signed char)
static cmpresult_t uECC_vli_cmp_unsafe(const uECC_word_t *left,
                                       const uECC_word_t *right,
                                       wordcount_t num_words) {
    wordcount_t i;
    for (i = num_words - 1; i >= 0; --i) {
        if (left[i] > right[i]) {
            return 1;
        } else if (left[i] < right[i]) {
            return -1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %al, -0x19(%rbp)
movsbl -0x19(%rbp), %eax
subl $0x1, %eax
movb %al, -0x1a(%rbp)
movsbl -0x1a(%rbp), %eax
cmpl $0x0, %eax
jl 0x26b6
movq -0x10(%rbp), %rax
movsbq -0x1a(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x18(%rbp), %rcx
movsbq -0x1a(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
jbe 0x2686
movb $0x1, -0x1(%rbp)
jmp 0x26ba
movq -0x10(%rbp), %rax
movsbq -0x1a(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x18(%rbp), %rcx
movsbq -0x1a(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
jae 0x26a8
movb $-0x1, -0x1(%rbp)
jmp 0x26ba
jmp 0x26aa
jmp 0x26ac
movb -0x1a(%rbp), %al
addb $-0x1, %al
movb %al, -0x1a(%rbp)
jmp 0x265b
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nop
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_vli_equal(unsigned long const*, unsigned long const*, signed char)
uECC_VLI_API uECC_word_t uECC_vli_equal(const uECC_word_t *left,
                                        const uECC_word_t *right,
                                        wordcount_t num_words) {
    uECC_word_t diff = 0;
    wordcount_t i;
    for (i = num_words - 1; i >= 0; --i) {
        diff |= (left[i] ^ right[i]);
    }
    return (diff == 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq $0x0, -0x20(%rbp)
movsbl -0x11(%rbp), %eax
subl $0x1, %eax
movb %al, -0x21(%rbp)
movsbl -0x21(%rbp), %eax
cmpl $0x0, %eax
jl 0x2748
movq -0x8(%rbp), %rax
movsbq -0x21(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x10(%rbp), %rcx
movsbq -0x21(%rbp), %rdx
xorq (%rcx,%rdx,8), %rax
orq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movb -0x21(%rbp), %al
addb $-0x1, %al
movb %al, -0x21(%rbp)
jmp 0x2713
cmpq $0x0, -0x20(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_valid_public_key
int uECC_valid_public_key(const uint8_t *public_key, uECC_Curve curve) {
#if uECC_VLI_NATIVE_LITTLE_ENDIAN
    uECC_word_t *_public = (uECC_word_t *)public_key;
#else
    uECC_word_t _public[uECC_MAX_WORDS * 2];
#endif

#if uECC_VLI_NATIVE_LITTLE_ENDIAN == 0
    uECC_vli_bytesToNative(_public, public_key, curve->num_bytes);
    uECC_vli_bytesToNative(
        _public + curve->num_words, public_key + curve->num_bytes, curve->num_bytes);
#endif
    return uECC_valid_point(_public, curve);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x50(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %edx
callq 0x1d90
leaq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cltq
shlq $0x3, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cltq
addq %rax, %rsi
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %edx
callq 0x1d90
leaq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x2550
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_compute_public_key
int uECC_compute_public_key(const uint8_t *private_key, uint8_t *public_key, uECC_Curve curve) {
#if uECC_VLI_NATIVE_LITTLE_ENDIAN
    uECC_word_t *_private = (uECC_word_t *)private_key;
    uECC_word_t *_public = (uECC_word_t *)public_key;
#else
    uECC_word_t _private[uECC_MAX_WORDS];
    uECC_word_t _public[uECC_MAX_WORDS * 2];
#endif

#if uECC_VLI_NATIVE_LITTLE_ENDIAN == 0
    uECC_vli_bytesToNative(_private, private_key, BITS_TO_BYTES(curve->num_n_bits));
#endif

    /* Make sure the private key is in the range [1, n-1]. */
    if (uECC_vli_isZero(_private, BITS_TO_WORDS(curve->num_n_bits))) {
        return 0;
    }

    if (uECC_vli_cmp(curve->n, _private, BITS_TO_WORDS(curve->num_n_bits)) != 1) {
        return 0;
    }

    /* Compute public key. */
    if (!EccPoint_compute_public_key(_public, _private, curve)) {
        return 0;
    }

#if uECC_VLI_NATIVE_LITTLE_ENDIAN == 0
    uECC_vli_nativeToBytes(public_key, curve->num_bytes, _public);
    uECC_vli_nativeToBytes(
        public_key + curve->num_bytes, curve->num_bytes, _public + curve->num_words);
#endif
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
movswl 0x2(%rax), %eax
addl $0x7, %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %edx
callq 0x1d90
leaq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rax
movswl 0x2(%rax), %eax
addl $0x3f, %eax
movl $0x40, %ecx
cltd
idivl %ecx
movsbl %al, %esi
callq 0x22e0
cmpq $0x0, %rax
je 0x283a
movl $0x0, -0x4(%rbp)
jmp 0x28e0
movq -0x20(%rbp), %rdi
addq $0x28, %rdi
leaq -0x40(%rbp), %rsi
movq -0x20(%rbp), %rax
movswl 0x2(%rax), %eax
addl $0x3f, %eax
movl $0x40, %ecx
cltd
idivl %ecx
movsbl %al, %edx
callq 0x28f0
movsbl %al, %eax
cmpl $0x1, %eax
je 0x2872
movl $0x0, -0x4(%rbp)
jmp 0x28e0
leaq -0x80(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1a90
cmpq $0x0, %rax
jne 0x2892
movl $0x0, -0x4(%rbp)
jmp 0x28e0
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %esi
leaq -0x80(%rbp), %rdx
callq 0x1b50
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %eax
cltq
addq %rax, %rdi
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %esi
leaq -0x80(%rbp), %rdx
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cltq
shlq $0x3, %rax
addq %rax, %rdx
callq 0x1b50
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_vli_cmp(unsigned long const*, unsigned long const*, signed char)
uECC_VLI_API cmpresult_t uECC_vli_cmp(const uECC_word_t *left,
                                      const uECC_word_t *right,
                                      wordcount_t num_words) {
    uECC_word_t tmp[uECC_MAX_WORDS];
    uECC_word_t neg = !!uECC_vli_sub(tmp, left, right, num_words);
    uECC_word_t equal = uECC_vli_isZero(tmp, num_words);
    return (!equal - 2 * neg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
leaq -0x40(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movsbl -0x11(%rbp), %ecx
callq 0x24b0
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
movsbl -0x11(%rbp), %esi
callq 0x22e0
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movq -0x48(%rbp), %rcx
shlq %rcx
subq %rcx, %rax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_sign
int uECC_sign(const uint8_t *private_key,
              const uint8_t *message_hash,
              unsigned hash_size,
              uint8_t *signature,
              uECC_Curve curve) {
    uECC_word_t k[uECC_MAX_WORDS];
    uECC_word_t tries;

    for (tries = 0; tries < uECC_RNG_MAX_TRIES; ++tries) {
        if (!uECC_generate_random_int(k, curve->n, BITS_TO_WORDS(curve->num_n_bits))) {
            return 0;
        }

        if (uECC_sign_with_k(private_key, message_hash, hash_size, k, signature, curve)) {
            return 1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq $0x0, -0x58(%rbp)
cmpq $0x40, -0x58(%rbp)
jae 0x29f9
leaq -0x50(%rbp), %rdi
movq -0x30(%rbp), %rsi
addq $0x28, %rsi
movq -0x30(%rbp), %rax
movswl 0x2(%rax), %eax
addl $0x3f, %eax
movl $0x40, %ecx
cltd
idivl %ecx
movsbl %al, %edx
callq 0x1980
cmpl $0x0, %eax
jne 0x29bf
movl $0x0, -0x4(%rbp)
jmp 0x2a00
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
leaq -0x50(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
callq 0x2a10
cmpl $0x0, %eax
je 0x29e9
movl $0x1, -0x4(%rbp)
jmp 0x2a00
jmp 0x29eb
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x2983
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: HMAC_init(uECC_HashContext const*, unsigned char const*)
static void HMAC_init(const uECC_HashContext *hash_context, const uint8_t *K) {
    uint8_t *pad = hash_context->tmp + 2 * hash_context->result_size;
    unsigned i;
    for (i = 0; i < hash_context->result_size; ++i)
        pad[i] = K[i] ^ 0x36;
    for (; i < hash_context->block_size; ++i)
        pad[i] = 0x36;

    hash_context->init_hash(hash_context);
    hash_context->update_hash(hash_context, pad, hash_context->block_size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x1c(%rcx), %ecx
shll %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jae 0x30b2
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movzbl (%rax,%rcx), %eax
xorl $0x36, %eax
movb %al, %dl
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3081
jmp 0x30b4
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0x30d6
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
movb $0x36, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x30b4
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rcx
movl 0x18(%rcx), %edx
callq *%rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: HMAC_finish(uECC_HashContext const*, unsigned char const*, unsigned char*)
static void HMAC_finish(const uECC_HashContext *hash_context,
                        const uint8_t *K,
                        uint8_t *result) {
    uint8_t *pad = hash_context->tmp + 2 * hash_context->result_size;
    unsigned i;
    for (i = 0; i < hash_context->result_size; ++i)
        pad[i] = K[i] ^ 0x5c;
    for (; i < hash_context->block_size; ++i)
        pad[i] = 0x5c;

    hash_context->finish_hash(hash_context, result);

    hash_context->init_hash(hash_context);
    hash_context->update_hash(hash_context, pad, hash_context->block_size);
    hash_context->update_hash(hash_context, result, hash_context->result_size);
    hash_context->finish_hash(hash_context, result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x1c(%rcx), %ecx
shll %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jae 0x31a6
movq -0x10(%rbp), %rax
movl -0x24(%rbp), %ecx
movzbl (%rax,%rcx), %eax
xorl $0x5c, %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3175
jmp 0x31a8
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0x31ca
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
movb $0x5c, (%rax,%rcx)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x31a8
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x8(%rbp), %rcx
movl 0x18(%rcx), %edx
callq *%rax
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rcx
movl 0x1c(%rcx), %edx
callq *%rax
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: bits2int(unsigned long*, unsigned char const*, unsigned int, uECC_Curve_t const*)
static void bits2int(uECC_word_t *native,
                     const uint8_t *bits,
                     unsigned bits_size,
                     uECC_Curve curve) {
    unsigned num_n_bytes = BITS_TO_BYTES(curve->num_n_bits);
    unsigned num_n_words = BITS_TO_WORDS(curve->num_n_bits);
    int shift;
    uECC_word_t carry;
    uECC_word_t *ptr;

    if (bits_size > num_n_bytes) {
        bits_size = num_n_bytes;
    }

    uECC_vli_clear(native, num_n_words);
#if uECC_VLI_NATIVE_LITTLE_ENDIAN
    bcopy((uint8_t *) native, bits, bits_size);
#else
    uECC_vli_bytesToNative(native, bits, bits_size);
#endif    
    if (bits_size * 8 <= (unsigned)curve->num_n_bits) {
        return;
    }
    shift = bits_size * 8 - curve->num_n_bits;
    carry = 0;
    ptr = native + num_n_words;
    while (ptr-- > native) {
        uECC_word_t temp = *ptr;
        *ptr = (temp >> shift) | carry;
        carry = temp << (uECC_WORD_BITS - shift);
    }

    /* Reduce mod curve_n */
    if (uECC_vli_cmp_unsafe(curve->n, native, num_n_words) != 1) {
        uECC_vli_sub(native, native, curve->n, num_n_words);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movswl 0x2(%rax), %eax
addl $0x7, %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movswl 0x2(%rax), %eax
addl $0x3f, %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %eax, -0x28(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jbe 0x3c61
movl -0x24(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0x28(%rbp), %eax
movsbl %al, %esi
callq 0x4170
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x1d90
movl -0x14(%rbp), %eax
shll $0x3, %eax
movq -0x20(%rbp), %rcx
movswl 0x2(%rcx), %ecx
cmpl %ecx, %eax
ja 0x3c97
jmp 0x3d4d
movl -0x14(%rbp), %eax
shll $0x3, %eax
movq -0x20(%rbp), %rcx
movswl 0x2(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl -0x28(%rbp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, -0x40(%rbp)
cmpq -0x8(%rbp), %rax
jbe 0x3d13
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl -0x2c(%rbp), %ecx
shrq %cl, %rax
movq %rax, %rcx
orq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movl $0x40, %ecx
subl -0x2c(%rbp), %ecx
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x38(%rbp)
jmp 0x3cc4
movq -0x20(%rbp), %rdi
addq $0x28, %rdi
movq -0x8(%rbp), %rsi
movl -0x28(%rbp), %eax
movsbl %al, %edx
callq 0x2640
movsbl %al, %eax
cmpl $0x1, %eax
je 0x3d4d
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x28, %rdx
movl -0x28(%rbp), %eax
movsbl %al, %ecx
callq 0x24b0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_vli_modSub(unsigned long*, unsigned long const*, unsigned long const*, unsigned long const*, signed char)
uECC_VLI_API void uECC_vli_modSub(uECC_word_t *result,
                                  const uECC_word_t *left,
                                  const uECC_word_t *right,
                                  const uECC_word_t *mod,
                                  wordcount_t num_words) {
    uECC_word_t l_borrow = uECC_vli_sub(result, left, right, num_words);
    if (l_borrow) {
        /* In this case, result == -diff == (max int) - diff. Since -x % d == d - x,
           we can get the correct result from result + mod (with overflow). */
        uECC_vli_add(result, result, mod, num_words);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movb %al, -0x21(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movsbl -0x21(%rbp), %ecx
callq 0x24b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x3e53
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x20(%rbp), %rdx
movsbl -0x21(%rbp), %ecx
callq 0x48c0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: apply_z(unsigned long*, unsigned long*, unsigned long const*, uECC_Curve_t const*)
static void apply_z(uECC_word_t * X1,
                    uECC_word_t * Y1,
                    const uECC_word_t * const Z,
                    uECC_Curve curve) {
    uECC_word_t t1[uECC_MAX_WORDS];

    uECC_vli_modSquare_fast(t1, Z, curve);    /* z^2 */
    uECC_vli_modMult_fast(X1, X1, t1, curve); /* x1 * z^2 */
    uECC_vli_modMult_fast(t1, t1, Z, curve);  /* z^3 */
    uECC_vli_modMult_fast(Y1, Y1, t1, curve); /* y1 * z^3 */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x26c0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x41b0
leaq -0x40(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x41b0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x41b0
addq $0x40, %rsp
popq %rbp
retq
nop
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_vli_numBits(unsigned long const*, signed char)
uECC_VLI_API bitcount_t uECC_vli_numBits(const uECC_word_t *vli, const wordcount_t max_words) {
    uECC_word_t i;
    uECC_word_t digit;

    wordcount_t num_digits = vli_numDigits(vli, max_words);
    if (num_digits == 0) {
        return 0;
    }

    digit = vli[num_digits - 1];
    for (i = 0; digit; ++i) {
        digit >>= 1;
    }

    return (((bitcount_t)(num_digits - 1) << uECC_WORD_BITS_SHIFT) + i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rdi
movsbl -0x11(%rbp), %esi
callq 0x65d0
movb %al, -0x29(%rbp)
movsbl -0x29(%rbp), %eax
cmpl $0x0, %eax
jne 0x40d3
movw $0x0, -0x2(%rbp)
jmp 0x4126
movq -0x10(%rbp), %rax
movsbl -0x29(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x4111
movq -0x28(%rbp), %rax
shrq %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x40f1
movsbl -0x29(%rbp), %eax
subl $0x1, %eax
cwtl
shll $0x6, %eax
cltq
addq -0x20(%rbp), %rax
movw %ax, -0x2(%rbp)
movw -0x2(%rbp), %ax
addq $0x30, %rsp
popq %rbp
retq
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_vli_modAdd(unsigned long*, unsigned long const*, unsigned long const*, unsigned long const*, signed char)
uECC_VLI_API void uECC_vli_modAdd(uECC_word_t *result,
                                  const uECC_word_t *left,
                                  const uECC_word_t *right,
                                  const uECC_word_t *mod,
                                  wordcount_t num_words) {
    uECC_word_t carry = uECC_vli_add(result, left, right, num_words);
    if (carry || uECC_vli_cmp_unsafe(mod, result, num_words) != 1) {
        /* result > mod (result = mod + remainder), so subtract mod to get remainder. */
        uECC_vli_sub(result, result, mod, num_words);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %r8b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movb %al, -0x21(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movsbl -0x21(%rbp), %ecx
callq 0x48c0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x4897
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
movsbl -0x21(%rbp), %edx
callq 0x2640
movsbl %al, %eax
cmpl $0x1, %eax
je 0x48ac
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x20(%rbp), %rdx
movsbl -0x21(%rbp), %ecx
callq 0x24b0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_vli_add(unsigned long*, unsigned long const*, unsigned long const*, signed char)
uECC_VLI_API uECC_word_t uECC_vli_add(uECC_word_t *result,
                                      const uECC_word_t *left,
                                      const uECC_word_t *right,
                                      wordcount_t num_words) {
    uECC_word_t carry = 0;
    wordcount_t i;
    for (i = 0; i < num_words; ++i) {
        uECC_word_t sum = left[i] + right[i] + carry;
        if (sum != left[i]) {
            carry = (sum < left[i]);
        }
        result[i] = sum;
    }
    return carry;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq $0x0, -0x28(%rbp)
movb $0x0, -0x29(%rbp)
movsbl -0x29(%rbp), %eax
movsbl -0x19(%rbp), %ecx
cmpl %ecx, %eax
jge 0x495a
movq -0x10(%rbp), %rax
movsbq -0x29(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x18(%rbp), %rcx
movsbq -0x29(%rbp), %rdx
addq (%rcx,%rdx,8), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movsbq -0x29(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x493f
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movsbq -0x29(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
setb %al
andb $0x1, %al
movzbl %al, %eax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rdx
movq -0x8(%rbp), %rax
movsbq -0x29(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movb -0x29(%rbp), %al
addb $0x1, %al
movb %al, -0x29(%rbp)
jmp 0x48e1
movq -0x28(%rbp), %rax
popq %rbp
retq
// File: simap[P]ecctools/lib/uECC.c
// Function: uECC_vli_rshift1(unsigned long*, signed char)
uECC_VLI_API void uECC_vli_rshift1(uECC_word_t *vli, wordcount_t num_words) {
    uECC_word_t *end = vli;
    uECC_word_t carry = 0;

    vli += num_words;
    while (vli-- > end) {
        uECC_word_t temp = *vli;
        *vli = (temp >> 1) | carry;
        carry = temp << (uECC_WORD_BITS - 1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movsbl -0x9(%rbp), %ecx
movq -0x8(%rbp), %rax
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, -0x8(%rbp)
cmpq -0x18(%rbp), %rax
jbe 0x49d4
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
shrq %rcx
orq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
shlq $0x3f, %rax
movq %rax, -0x20(%rbp)
jmp 0x4994
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: muladd(unsigned long, unsigned long, unsigned long*, unsigned long*, unsigned long*)
static void muladd(uECC_word_t a,
                   uECC_word_t b,
                   uECC_word_t *r0,
                   uECC_word_t *r1,
                   uECC_word_t *r2) {
#if uECC_WORD_SIZE == 8 && !SUPPORTS_INT128
    uint64_t a0 = a & 0xffffffffull;
    uint64_t a1 = a >> 32;
    uint64_t b0 = b & 0xffffffffull;
    uint64_t b1 = b >> 32;

    uint64_t i0 = a0 * b0;
    uint64_t i1 = a0 * b1;
    uint64_t i2 = a1 * b0;
    uint64_t i3 = a1 * b1;

    uint64_t p0, p1;

    i2 += (i0 >> 32);
    i2 += i1;
    if (i2 < i1) { /* overflow */
        i3 += 0x100000000ull;
    }

    p0 = (i0 & 0xffffffffull) | (i2 << 32);
    p1 = i3 + (i2 >> 32);

    *r0 += p0;
    *r1 += (p1 + (*r0 < p0));
    *r2 += ((*r1 < p1) || (*r1 == p1 && *r0 < p0));
#else
    uECC_dword_t p = (uECC_dword_t)a * b;
    uECC_dword_t r01 = ((uECC_dword_t)(*r1) << uECC_WORD_BITS) | *r0;
    r01 += p;
    *r2 += (r01 < p);
    *r1 = r01 >> uECC_WORD_BITS;
    *r0 = (uECC_word_t)r01;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
mulq %rcx
movq %rdx, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rcx, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
addq %rsi, %rcx
adcq %rdx, %rax
movq %rcx, -0x50(%rbp)
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rcx
subq %rsi, %rdx
sbbq %rcx, %rax
movq -0x28(%rbp), %rax
adcq $0x0, (%rax)
movq -0x48(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: XYcZ_initial_double(unsigned long*, unsigned long*, unsigned long*, unsigned long*, unsigned long const*, uECC_Curve_t const*)
static void XYcZ_initial_double(uECC_word_t * X1,
                                uECC_word_t * Y1,
                                uECC_word_t * X2,
                                uECC_word_t * Y2,
                                const uECC_word_t * const initial_Z,
                                uECC_Curve curve) {
    uECC_word_t z[uECC_MAX_WORDS];
    wordcount_t num_words = curve->num_words;
    if (initial_Z) {
        uECC_vli_set(z, initial_Z, num_words);
    } else {
        uECC_vli_clear(z, num_words);
        z[0] = 1;
    }

    uECC_vli_set(X2, X1, num_words);
    uECC_vli_set(Y2, Y1, num_words);

    apply_z(X1, Y1, z, curve);
    curve->double_jacobian(X1, Y1, z, curve);
    apply_z(X2, Y2, z, curve);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x30(%rbp), %rax
movb (%rax), %al
movb %al, -0x51(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x5d83
leaq -0x50(%rbp), %rdi
movq -0x28(%rbp), %rsi
movsbl -0x51(%rbp), %edx
callq 0x3db0
jmp 0x5d98
leaq -0x50(%rbp), %rdi
movsbl -0x51(%rbp), %esi
callq 0x4170
movq $0x1, -0x50(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movsbl -0x51(%rbp), %edx
callq 0x3db0
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsbl -0x51(%rbp), %edx
callq 0x3db0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x50(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x3ff0
movq -0x30(%rbp), %rax
movq 0xa8(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x50(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq *%rax
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x50(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x3ff0
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: simap[P]ecctools/lib/uECC.c
// Function: vli_modInv_update(unsigned long*, unsigned long const*, signed char)
static void vli_modInv_update(uECC_word_t *uv,
                              const uECC_word_t *mod,
                              wordcount_t num_words) {
    uECC_word_t carry = 0;
    if (!EVEN(uv)) {
        carry = uECC_vli_add(uv, uv, mod, num_words);
    }
    uECC_vli_rshift1(uv, num_words);
    if (carry) {
        uv[num_words - 1] |= HIGH_BIT_SET;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x60c7
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movsbl -0x11(%rbp), %ecx
callq 0x48c0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movsbl -0x11(%rbp), %esi
callq 0x4960
cmpq $0x0, -0x20(%rbp)
je 0x60fb
movq -0x8(%rbp), %rax
movsbl -0x11(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)