LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/enchive.c
// Function: write_pubkey
static void
write_pubkey(char *file, uint8_t *key)
{
    FILE *f = fopen(file, "wb");
    if (!f)
        fatal("failed to open key file for writing '%s' -- %s",
              file, strerror(errno));
    cleanup_register(f, file);
    if (!fwrite(key, 32, 1, f))
        fatal("failed to write key file '%s'", file);
    cleanup_closed(f);
    if (fclose(f))
        fatal("failed to flush key file '%s' -- %s", file, strerror(errno));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x6d8b(%rip), %rsi      # 0xbda6
callq 0x22d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x5054
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
callq 0x2070
movl (%rax), %edi
callq 0x2350
movq -0x20(%rbp), %rsi
movq %rax, %rdx
leaq 0x6d5c(%rip), %rdi      # 0xbda9
movb $0x0, %al
callq 0x3340
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x62f0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl $0x20, %esi
movl $0x1, %edx
callq 0x2330
cmpq $0x0, %rax
jne 0x5090
movq -0x8(%rbp), %rsi
leaq 0x6cdb(%rip), %rdi      # 0xbd64
movb $0x0, %al
callq 0x3340
movq -0x18(%rbp), %rdi
callq 0x6380
movq -0x18(%rbp), %rdi
callq 0x2100
cmpl $0x0, %eax
je 0x50d0
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x2070
movl (%rax), %edi
callq 0x2350
movq -0x28(%rbp), %rsi
movq %rax, %rdx
leaq 0x6cb9(%rip), %rdi      # 0xbd82
movb $0x0, %al
callq 0x3340
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/enchive.c
// Function: storage_directory
static char *
storage_directory(char *file)
{
    static const char enchive[] = "/enchive/";
    static const char config[] = "/.config";
    char *xdg_config_home = getenv("XDG_CONFIG_HOME");
    char *path, *s;

    if (!xdg_config_home) {
        char *home = getenv("HOME");
        if (!home)
            fatal("no $HOME or $XDG_CONFIG_HOME, giving up");
        if (home[0] != '/')
            fatal("$HOME is not absolute");
        path = joinstr(4, home, config, enchive, file);
    } else {
        if (xdg_config_home[0] != '/')
            fatal("$XDG_CONFIG_HOME is not absolute");
        path = joinstr(3, xdg_config_home, enchive, file);
    }

    s = strchr(path + 1, '/');
    while (s) {
        *s = 0;
        if (mkdir(path, 0700) && !dir_exists(path))
            fatal("mkdir(%s) -- %s", path, strerror(errno));
        *s = '/';
        s = strchr(s + 1, '/');
    }

    return path;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x6729(%rip), %rdi      # 0xb81c
callq 0x2030
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x516a
leaq 0x671d(%rip), %rdi      # 0xb827
callq 0x2030
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x5128
leaq 0x670b(%rip), %rdi      # 0xb82c
movb $0x0, %al
callq 0x3340
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x5142
leaq 0x6719(%rip), %rdi      # 0xb854
movb $0x0, %al
callq 0x3340
movq -0x28(%rbp), %rsi
movq -0x8(%rbp), %r8
movl $0x4, %edi
leaq 0x6034(%rip), %rdx      # 0xb18a
leaq 0x6023(%rip), %rcx      # 0xb180
movb $0x0, %al
callq 0x5240
movq %rax, -0x18(%rbp)
jmp 0x51a3
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x5184
leaq 0x66ed(%rip), %rdi      # 0xb86a
movb $0x0, %al
callq 0x3340
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rcx
movl $0x3, %edi
leaq 0x5fe8(%rip), %rdx      # 0xb180
movb $0x0, %al
callq 0x5240
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movl $0x2f, %esi
callq 0x2130
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x5230
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x20b0
cmpl $0x0, %eax
je 0x5211
movq -0x18(%rbp), %rdi
callq 0x5480
cmpl $0x0, %eax
jne 0x5211
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x2070
movl (%rax), %edi
callq 0x2350
movq -0x30(%rbp), %rsi
movq %rax, %rdx
leaq 0x6681(%rip), %rdi      # 0xb88b
movb $0x0, %al
callq 0x3340
movq -0x20(%rbp), %rax
movb $0x2f, (%rax)
movq -0x20(%rbp), %rdi
addq $0x1, %rdi
movl $0x2f, %esi
callq 0x2130
movq %rax, -0x20(%rbp)
jmp 0x51b9
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/enchive.c
// Function: agent_read
static int
agent_read(uint8_t *key, const uint8_t *iv)
{
    int success;
    struct sockaddr_un addr;
    int fd = socket(AF_UNIX, SOCK_STREAM, 0);
    if (!agent_addr(&addr, iv)) {
        close(fd);
        return 0;
    }
    if (connect(fd, (struct sockaddr *)&addr, sizeof(addr))) {
        close(fd);
        return 0;
    }
    success = read(fd, key, 32) == 32;
    close(fd);
    return success;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x2370
movl %eax, -0x90(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x8a(%rbp), %rdi
callq 0x5870
cmpl $0x0, %eax
jne 0x5530
movl -0x90(%rbp), %edi
callq 0x2170
movl $0x0, -0x4(%rbp)
jmp 0x5594
movl -0x90(%rbp), %edi
leaq -0x8a(%rbp), %rsi
movl $0x6e, %edx
callq 0x2320
cmpl $0x0, %eax
je 0x5560
movl -0x90(%rbp), %edi
callq 0x2170
movl $0x0, -0x4(%rbp)
jmp 0x5594
movl -0x90(%rbp), %edi
movq -0x10(%rbp), %rsi
movl $0x20, %edx
callq 0x21b0
cmpq $0x20, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c(%rbp)
movl -0x90(%rbp), %edi
callq 0x2170
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/enchive.c
// Function: agent_addr
static int
agent_addr(struct sockaddr_un *addr, const uint8_t *iv)
{
    char *dir = getenv("XDG_RUNTIME_DIR");
    if (!dir) {
        dir = getenv("TMPDIR");
        if (!dir)
            dir = "/tmp";
    }

    addr->sun_family = AF_UNIX;
    if (strlen(dir) + 1 + 16 + 1 > sizeof(addr->sun_path)) {
        warning("agent socket path too long -- %s", dir);
        return 0;
    } else {
        sprintf(addr->sun_path, "%s/%02x%02x%02x%02x%02x%02x%02x%02x", dir,
                iv[0], iv[1], iv[2], iv[3], iv[4], iv[5], iv[6], iv[7]);
        return 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
leaq 0x60b1(%rip), %rdi      # 0xb93b
callq 0x2030
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x58be
leaq 0x60aa(%rip), %rdi      # 0xb94b
callq 0x2030
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x58bc
leaq 0x609a(%rip), %rax      # 0xb952
movq %rax, -0x30(%rbp)
jmp 0x58be
movq -0x20(%rbp), %rax
movw $0x1, (%rax)
movq -0x30(%rbp), %rdi
callq 0x2110
addq $0x1, %rax
addq $0x10, %rax
addq $0x1, %rax
cmpq $0x6c, %rax
jbe 0x58fd
movq -0x30(%rbp), %rsi
leaq 0x606a(%rip), %rdi      # 0xb957
movb $0x0, %al
callq 0x5990
movl $0x0, -0x14(%rbp)
jmp 0x5978
movq -0x20(%rbp), %rdi
addq $0x2, %rdi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rax
movzbl (%rax), %ecx
movq -0x28(%rbp), %rax
movzbl 0x1(%rax), %r8d
movq -0x28(%rbp), %rax
movzbl 0x2(%rax), %r9d
movq -0x28(%rbp), %rax
movzbl 0x3(%rax), %r14d
movq -0x28(%rbp), %rax
movzbl 0x4(%rax), %ebx
movq -0x28(%rbp), %rax
movzbl 0x5(%rax), %r11d
movq -0x28(%rbp), %rax
movzbl 0x6(%rax), %r10d
movq -0x28(%rbp), %rax
movzbl 0x7(%rax), %eax
leaq 0x6024(%rip), %rsi      # 0xb978
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq 0x2300
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/enchive.c
// Function: warning
static void
warning(const char *fmt, ...)
{
    va_list ap;
    va_start(ap, fmt);
    fprintf(stderr, "warning: ");
    vfprintf(stderr, fmt, ap);
    fputc('\n', stderr);
    va_end(ap);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x59c5
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq 0x95e4(%rip), %rax      # 0xeff8
movq %rax, -0xd8(%rbp)
movq (%rax), %rdi
leaq 0x5f77(%rip), %rsi      # 0xb99c
xorl %eax, %eax
callq 0x21f0
movq -0xd8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x22e0
movq -0xd8(%rbp), %rax
movq (%rax), %rsi
movl $0xa, %edi
callq 0x2190
addq $0xe0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/enchive.c
// Function: get_passphrase_dumb
static void
get_passphrase_dumb(char *buf, size_t len, char *prompt)
{
    size_t passlen;
    warning("reading passphrase from stdin with echo");
    fputs(prompt, stderr);
    fflush(stderr);
    if (!fgets(buf, len, stdin))
        fatal("could not read passphrase");
    passlen = strlen(buf);
    if (buf[passlen - 1] < ' ')
        buf[passlen - 1] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x5fda(%rip), %rdi      # 0xbc25
movb $0x0, %al
callq 0x5990
movq -0x18(%rbp), %rdi
movq 0x939b(%rip), %rax      # 0xeff8
movq (%rax), %rsi
callq 0x2150
movq 0x938c(%rip), %rax      # 0xeff8
movq (%rax), %rdi
callq 0x2250
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl %eax, %esi
movq 0x9353(%rip), %rax      # 0xefd8
movq (%rax), %rdx
callq 0x21d0
cmpq $0x0, %rax
jne 0x5ca1
leaq 0x5fb3(%rip), %rdi      # 0xbc4d
movb $0x0, %al
callq 0x3340
movq -0x8(%rbp), %rdi
callq 0x2110
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
jge 0x5cd3
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/enchive.c
// Function: pinentry_decode
static void
pinentry_decode(char *buf, size_t blen, const char *str)
{
    size_t i, j;

    for (i = 0, j = 0; str[i] && str[i] != '\n' && j < blen - 1; i++) {
        int c = str[i];
        if (c == '%') {
            static const char *hex = "0123456789ABCDEF";
            char *nibh, *nibl;
            if (!str[i + 1] || !str[i + 2])
                fatal("invalid data from pinentry");
            nibh = memchr(hex, str[i + 1], 16);
            nibl = memchr(hex, str[i + 2], 16);
            if (!nibh || !nibl)
                fatal("invalid data from pinentry");
            buf[j++] = (nibh - hex) * 16 + (nibl - hex);
            i += 2;
        } else {
            buf[j++] = c;
        }
    }
    buf[j] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x41(%rbp)
je 0x5fc5
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0xa, %ecx
movb %al, -0x41(%rbp)
je 0x5fc5
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
setb %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x5fd1
jmp 0x60ed
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x25, -0x2c(%rbp)
jne 0x60bf
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpb $0x0, 0x1(%rax,%rcx)
je 0x6008
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpb $0x0, 0x2(%rax,%rcx)
jne 0x6016
leaq 0x5bfb(%rip), %rdi      # 0xbc0a
movb $0x0, %al
callq 0x3340
movq 0x9263(%rip), %rdi      # 0xf280
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl 0x1(%rax,%rcx), %esi
movl $0x10, %edx
callq 0x21a0
movq %rax, -0x38(%rbp)
movq 0x9241(%rip), %rdi      # 0xf280
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl 0x2(%rax,%rcx), %esi
movl $0x10, %edx
callq 0x21a0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x6068
cmpq $0x0, -0x40(%rbp)
jne 0x6076
leaq 0x5b9b(%rip), %rdi      # 0xbc0a
movb $0x0, %al
callq 0x3340
movq -0x38(%rbp), %rax
movq 0x91ff(%rip), %rcx      # 0xf280
subq %rcx, %rax
shlq $0x4, %rax
movq -0x40(%rbp), %rcx
movq 0x91ed(%rip), %rdx      # 0xf280
subq %rdx, %rcx
addq %rcx, %rax
movb %al, %dl
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x28(%rbp)
movb %dl, (%rax,%rcx)
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x20(%rbp)
jmp 0x60da
movl -0x2c(%rbp), %eax
movb %al, %dl
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x28(%rbp)
movb %dl, (%rax,%rcx)
jmp 0x60dc
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x5f84
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movb $0x0, (%rax,%rcx)
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/enchive.c
// Function: hmac_init
static void
hmac_init(SHA256_CTX *ctx, const uint8_t *key)
{
    int i;
    uint8_t pad[SHA256_BLOCK_SIZE];
    sha256_init(ctx);
    for (i = 0; i < SHA256_BLOCK_SIZE; i++)
        pad[i] = key[i] ^ 0x36U;
    sha256_update(ctx, pad, sizeof(pad));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xa5d0
movl $0x0, -0x14(%rbp)
cmpl $0x20, -0x14(%rbp)
jge 0x614a
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movzbl (%rax,%rcx), %eax
xorl $0x36, %eax
movb %al, %cl
movslq -0x14(%rbp), %rax
movb %cl, -0x40(%rbp,%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6120
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x20, %edx
callq 0xa650
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/enchive.c
// Function: hmac_final
static void
hmac_final(SHA256_CTX *ctx, const uint8_t *key, uint8_t *hash)
{
    int i;
    uint8_t pad[SHA256_BLOCK_SIZE];
    sha256_final(ctx, hash);
    sha256_init(ctx);
    for (i = 0; i < SHA256_BLOCK_SIZE; i++)
        pad[i] = key[i] ^ 0x5cU;
    sha256_update(ctx, pad, sizeof(pad));
    sha256_update(ctx, hash, SHA256_BLOCK_SIZE);
    sha256_final(ctx, hash);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa6f0
movq -0x8(%rbp), %rdi
callq 0xa5d0
movl $0x0, -0x1c(%rbp)
cmpl $0x20, -0x1c(%rbp)
jge 0x61cb
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
xorl $0x5c, %eax
movb %al, %cl
movslq -0x1c(%rbp), %rax
movb %cl, -0x40(%rbp,%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x61a1
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movl $0x20, %edx
callq 0xa650
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x20, %edx
callq 0xa650
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa6f0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/enchive.c
// Function: secure_entropy
static void
secure_entropy(void *buf, size_t len)
{
    FILE *r = fopen("/dev/urandom", "rb");
    if (!r)
        fatal("failed to open %s", "/dev/urandom");
    if (!fread(buf, len, 1, r))
        fatal("failed to gather entropy");
    fclose(r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x5a65(%rip), %rdi      # 0xbc8c
leaq 0x5679(%rip), %rsi      # 0xb8a7
callq 0x22d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x6253
leaq 0x5a54(%rip), %rdi      # 0xbc99
leaq 0x5a40(%rip), %rsi      # 0xbc8c
movb $0x0, %al
callq 0x3340
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
callq 0x20e0
cmpq $0x0, %rax
jne 0x627d
leaq 0x5a35(%rip), %rdi      # 0xbcab
movb $0x0, %al
callq 0x3340
movq -0x18(%rbp), %rdi
callq 0x2100
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/enchive.c
// Function: secure_creat
static FILE *
secure_creat(const char *file)
{
    int fd = open(file, O_CREAT | O_WRONLY, 00600);
    if (fd == -1)
        return 0;
    return fdopen(fd, "wb");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x41, %esi
movl $0x180, %edx            # imm = 0x180
movb $0x0, %al
callq 0x22c0
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
jne 0x62c4
movq $0x0, -0x8(%rbp)
jmp 0x62d7
movl -0x14(%rbp), %edi
leaq 0x5ad8(%rip), %rsi      # 0xbda6
callq 0x2270
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/enchive.c
// Function: cleanup_register
static void
cleanup_register(FILE *file, char *name)
{
    if (file) {
        unsigned i;
        for (i = 0; i < sizeof(cleanup) / sizeof(*cleanup); i++) {
            if (!cleanup[i].name) {
                cleanup[i].name = name;
                cleanup[i].file = file;
                return;
            }
        }
    }
    abort();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x637a
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpq $0x2, %rax
jae 0x6378
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x8f9d(%rip), %rax      # 0xf2c0
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x636b
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %eax
movl %eax, %edx
leaq 0x8f80(%rip), %rax      # 0xf2c0
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rcx
movl -0x14(%rbp), %eax
movl %eax, %edx
leaq 0x8f66(%rip), %rax      # 0xf2c0
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
jmp 0x636d
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x630e
jmp 0x637a
callq 0x2060
nop
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/enchive.c
// Function: cleanup_closed
static void
cleanup_closed(FILE *file)
{
    unsigned i;
    for (i = 0; i < sizeof(cleanup) / sizeof(*cleanup); i++) {
        if (file == cleanup[i].file) {
            cleanup[i].file = 0;
            return;
        }
    }
    abort();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpq $0x2, %rax
jae 0x63e7
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, %edx
leaq 0x8f14(%rip), %rcx      # 0xf2c0
shlq $0x4, %rdx
addq %rdx, %rcx
cmpq 0x8(%rcx), %rax
jne 0x63da
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x8efb(%rip), %rax      # 0xf2c0
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
addq $0x10, %rsp
popq %rbp
retq
jmp 0x63dc
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6393
callq 0x2060
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/enchive.c
// Function: load_pubkey
static void
load_pubkey(const char *file, uint8_t *key)
{
    FILE *f = fopen(file, "rb");
    if (!f)
        fatal("failed to open key file for reading '%s' -- %s",
              file, strerror(errno));
    if (!fread(key, 32, 1, f))
        fatal("failed to read key file '%s'", file);
    fclose(f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x549c(%rip), %rsi      # 0xb8a7
callq 0x22d0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x6444
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
callq 0x2070
movl (%rax), %edi
callq 0x2350
movq -0x20(%rbp), %rsi
movq %rax, %rdx
leaq 0x546d(%rip), %rdi      # 0xb8aa
movb $0x0, %al
callq 0x3340
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl $0x20, %esi
movl $0x1, %edx
callq 0x20e0
cmpq $0x0, %rax
jne 0x6473
movq -0x8(%rbp), %rsi
leaq 0x596c(%rip), %rdi      # 0xbdd8
movb $0x0, %al
callq 0x3340
movq -0x18(%rbp), %rdi
callq 0x2100
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/enchive.c
// Function: symmetric_encrypt
static void
symmetric_encrypt(FILE *in, FILE *out, const uint8_t *key, const uint8_t *iv)
{
    static uint8_t buffer[2][CHACHA_BLOCKLENGTH * 1024];
    uint8_t mac[SHA256_BLOCK_SIZE];
    SHA256_CTX hmac[1];
    chacha_ctx ctx[1];

    chacha_keysetup(ctx, key, 256);
    chacha_ivsetup(ctx, iv);
    hmac_init(hmac, key);

    for (;;) {
        size_t z = fread(buffer[0], 1, sizeof(buffer[0]), in);
        if (!z) {
            if (ferror(in))
                fatal("error reading plaintext file");
            break;
        }
        sha256_update(hmac, buffer[0], z);
        chacha_encrypt(ctx, buffer[0], buffer[1], z);
        if (!fwrite(buffer[1], z, 1, out))
            fatal("error writing ciphertext file");
        if (z < sizeof(buffer[0]))
            break;
    }

    hmac_final(hmac, key, mac);

    if (!fwrite(mac, sizeof(mac), 1, out))
        fatal("error writing checksum to ciphertext file");
    if (fflush(out))
        fatal("error flushing to ciphertext file -- %s", strerror(errno));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0xf0(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x6890
leaq -0xf0(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x6b60
leaq -0xb0(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6100
movq -0x8(%rbp), %rcx
leaq 0x8dc5(%rip), %rdi      # 0xf2e0
movl $0x1, %esi
movl $0x10000, %edx          # imm = 0x10000
callq 0x20e0
movq %rax, -0xf8(%rbp)
cmpq $0x0, -0xf8(%rbp)
jne 0x655c
movq -0x8(%rbp), %rdi
callq 0x20d0
cmpl $0x0, %eax
je 0x6557
leaq 0x593e(%rip), %rdi      # 0xbe8e
movb $0x0, %al
callq 0x3340
jmp 0x65e7
leaq -0xb0(%rbp), %rdi
movq -0xf8(%rbp), %rdx
leaq 0x8d6f(%rip), %rsi      # 0xf2e0
callq 0xa650
leaq -0xf0(%rbp), %rdi
movq -0xf8(%rbp), %rax
movl %eax, %ecx
leaq 0x8d53(%rip), %rsi      # 0xf2e0
movq %rsi, %rdx
addq $0x10000, %rdx          # imm = 0x10000
callq 0x6bf0
movq -0xf8(%rbp), %rsi
movq -0x10(%rbp), %rcx
leaq 0x8d32(%rip), %rdi      # 0xf2e0
addq $0x10000, %rdi          # imm = 0x10000
movl $0x1, %edx
callq 0x2330
cmpq $0x0, %rax
jne 0x65d3
leaq 0x58df(%rip), %rdi      # 0xbeab
movb $0x0, %al
callq 0x3340
cmpq $0x10000, -0xf8(%rbp) # imm = 0x10000
jae 0x65e2
jmp 0x65e7
jmp 0x6510
leaq -0xb0(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x6170
leaq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rcx
movl $0x20, %esi
movl $0x1, %edx
callq 0x2330
cmpq $0x0, %rax
jne 0x6626
leaq 0x58aa(%rip), %rdi      # 0xbec9
movb $0x0, %al
callq 0x3340
movq -0x10(%rbp), %rdi
callq 0x2250
cmpl $0x0, %eax
je 0x6651
callq 0x2070
movl (%rax), %edi
callq 0x2350
movq %rax, %rsi
leaq 0x58a9(%rip), %rdi      # 0xbef3
movb $0x0, %al
callq 0x3340
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/chacha.c
// Function: chacha_encrypt
void
chacha_encrypt(chacha_ctx *x, const uint8_t *m, uint8_t *c, uint32_t bytes)
{
  uint8_t output[64];
  uint32_t i;

  if (!bytes) return;
  for (;;) {
    salsa20_wordtobyte(output,x->input);
    x->input[12] = PLUSONE(x->input[12]);
    if (!x->input[12]) {
      x->input[13] = PLUSONE(x->input[13]);
      /* stopping at 2^70 bytes per nonce is user's responsibility */
    }
    if (bytes <= 64) {
      for (i = 0;i < bytes;++i) c[i] = m[i] ^ output[i];
      return;
    }
    for (i = 0;i < 64;++i) c[i] = m[i] ^ output[i];
    bytes -= 64;
    c += 64;
    m += 64;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x6c12
jmp 0x6cf5
jmp 0x6c14
leaq -0x60(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x6d00
movq -0x8(%rbp), %rax
movl 0x30(%rax), %ecx
addl $0x1, %ecx
andl $-0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x6c53
movq -0x8(%rbp), %rax
movl 0x34(%rax), %ecx
addl $0x1, %ecx
andl $-0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x34(%rax)
cmpl $0x40, -0x1c(%rbp)
ja 0x6c96
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x6c94
movq -0x10(%rbp), %rax
movl -0x64(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movl -0x64(%rbp), %ecx
movzbl -0x60(%rbp,%rcx), %ecx
xorl %ecx, %eax
movb %al, %dl
movq -0x18(%rbp), %rax
movl -0x64(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x6c60
jmp 0x6cf5
movl $0x0, -0x64(%rbp)
cmpl $0x40, -0x64(%rbp)
jae 0x6ccf
movq -0x10(%rbp), %rax
movl -0x64(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movl -0x64(%rbp), %ecx
movzbl -0x60(%rbp,%rcx), %ecx
xorl %ecx, %eax
movb %al, %dl
movq -0x18(%rbp), %rax
movl -0x64(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x6c9d
movl -0x1c(%rbp), %eax
subl $0x40, %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x10(%rbp)
jmp 0x6c14
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/curve25519-donna.c
// Function: curve25519_donna
int
curve25519_donna(
        uint8_t *mypublic,
        const uint8_t *secret,
        const uint8_t *basepoint)
{
  int64_t bp[10], x[10], z[11], zmone[10];
  uint8_t e[32];
  int i;

  for (i = 0; i < 32; ++i) e[i] = secret[i];
  e[0] &= 248;
  e[31] &= 127;
  e[31] |= 64;

  fexpand(bp, basepoint);
  cmult(x, z, e, bp);
  crecip(zmone, z);
  fmul(z, x, zmone);
  fcontract(mypublic, z);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x194(%rbp)
cmpl $0x20, -0x194(%rbp)
jge 0x7367
movq -0x10(%rbp), %rax
movslq -0x194(%rbp), %rcx
movb (%rax,%rcx), %cl
movslq -0x194(%rbp), %rax
movb %cl, -0x190(%rbp,%rax)
movl -0x194(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x194(%rbp)
jmp 0x7331
movzbl -0x190(%rbp), %eax
andl $0xf8, %eax
movb %al, -0x190(%rbp)
movzbl -0x171(%rbp), %eax
andl $0x7f, %eax
movb %al, -0x171(%rbp)
movzbl -0x171(%rbp), %eax
orl $0x40, %eax
movb %al, -0x171(%rbp)
leaq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7410
leaq -0xc0(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0x190(%rbp), %rdx
leaq -0x70(%rbp), %rcx
callq 0x7700
leaq -0x170(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x7a90
leaq -0x120(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
leaq -0x170(%rbp), %rdx
callq 0x7f70
movq -0x8(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x7fe0
xorl %eax, %eax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/curve25519-donna.c
// Function: fmul
static void
fmul(int64_t *output, const int64_t *in, const int64_t *in2)
{
  int64_t t[19];
  fproduct(t, in, in2);
  /* |t[i]| < 14*2^54 */
  freduce_degree(t);
  freduce_coefficients(t);
  /* |t[i]| < 2^26 */
  memcpy(output, t, sizeof(int64_t) * 10);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0xb0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x8aa0
leaq -0xb0(%rbp), %rdi
callq 0x9620
leaq -0xb0(%rbp), %rdi
callq 0x98a0
movq -0x8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movl $0x50, %edx
callq 0x2230
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/curve25519-donna.c
// Function: swap_conditional
static void
swap_conditional(int64_t a[19], int64_t b[19], int64_t iswap)
{
  unsigned i;
  const int32_t swap = (int32_t) -iswap;

  for (i = 0; i < 10; ++i) {
    const int32_t x = swap & ( ((int32_t)a[i]) ^ ((int32_t)b[i]) );
    a[i] = ((int32_t)a[i]) ^ x;
    b[i] = ((int32_t)b[i]) ^ x;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
xorl %eax, %eax
subq -0x18(%rbp), %rax
movl %eax, -0x20(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0xa, -0x1c(%rbp)
jae 0x8739
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
movl -0x1c(%rbp), %edx
movq (%rcx,%rdx,8), %rcx
movq -0x10(%rbp), %rdx
movl -0x1c(%rbp), %esi
movq (%rdx,%rsi,8), %rdx
xorl %edx, %ecx
andl %ecx, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
xorl -0x24(%rbp), %eax
movslq %eax, %rdx
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
xorl -0x24(%rbp), %eax
movslq %eax, %rdx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x86d0
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/curve25519-donna.c
// Function: fsum
static void
fsum(int64_t *output, const int64_t *in)
{
  unsigned i;
  for (i = 0; i < 10; i += 2) {
    output[0+i] = output[0+i] + in[0+i];
    output[1+i] = output[1+i] + in[1+i];
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0xa, -0x14(%rbp)
jae 0x8a44
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x0, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x0, %ecx
movl %ecx, %ecx
addq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x0, %ecx
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
addq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0x89d3
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/curve25519-donna.c
// Function: fsquare
static void
fsquare(int64_t *output, const int64_t *in)
{
  int64_t t[19];
  fsquare_inner(t, in);
  /* |t[i]| < 14*2^54 because the largest product of two limbs will be <
   * 2^(27+27) and fsquare_inner adds together, at most, 14 of those
   * products. */
  freduce_degree(t);
  freduce_coefficients(t);
  /* |t[i]| < 2^26 */
  memcpy(output, t, sizeof(int64_t) * 10);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xb0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x9b30
leaq -0xb0(%rbp), %rdi
callq 0x9620
leaq -0xb0(%rbp), %rdi
callq 0x98a0
movq -0x8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movl $0x50, %edx
callq 0x2230
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/curve25519-donna.c
// Function: div_by_2_26
static int64_t
div_by_2_26(const int64_t v)
{
  /* High word of v; no shift needed. */
  const uint32_t highword = (uint32_t) (((uint64_t) v) >> 32);
  /* Set to all 1s if v was negative; else set to 0s. */
  const int32_t sign = ((int32_t) highword) >> 31;
  /* Set to 0x3ffffff if v was negative; else set to 0. */
  const int32_t roundoff = ((uint32_t) sign) >> 6;
  /* Should return v / (1<<26) */
  return (v + roundoff) >> 26;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
shrq $0x20, %rax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
sarl $0x1f, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
shrl $0x6, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
addq %rcx, %rax
sarq $0x1a, %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/curve25519-donna.c
// Function: s32_eq
static int32_t
s32_eq(int32_t a, int32_t b)
{
  a = ~(a ^ b);
  a &= a << 16;
  a &= a << 8;
  a &= a << 4;
  a &= a << 2;
  a &= a << 1;
  return a >> 31;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %eax
xorl -0x8(%rbp), %eax
xorl $-0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shll $0x10, %eax
andl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shll $0x8, %eax
andl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shll $0x4, %eax
andl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shll $0x2, %eax
andl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shll %eax
andl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
sarl $0x1f, %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/sha256.c
// Function: sha256_init
void sha256_init(SHA256_CTX *ctx)
{
	ctx->datalen = 0;
	ctx->bitlen = 0;
	ctx->state[0] = 0x6a09e667;
	ctx->state[1] = 0xbb67ae85;
	ctx->state[2] = 0x3c6ef372;
	ctx->state[3] = 0xa54ff53a;
	ctx->state[4] = 0x510e527f;
	ctx->state[5] = 0x9b05688c;
	ctx->state[6] = 0x1f83d9ab;
	ctx->state[7] = 0x5be0cd19;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x40(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movl $0x6a09e667, 0x50(%rax) # imm = 0x6A09E667
movq -0x8(%rbp), %rax
movl $0xbb67ae85, 0x54(%rax) # imm = 0xBB67AE85
movq -0x8(%rbp), %rax
movl $0x3c6ef372, 0x58(%rax) # imm = 0x3C6EF372
movq -0x8(%rbp), %rax
movl $0xa54ff53a, 0x5c(%rax) # imm = 0xA54FF53A
movq -0x8(%rbp), %rax
movl $0x510e527f, 0x60(%rax) # imm = 0x510E527F
movq -0x8(%rbp), %rax
movl $0x9b05688c, 0x64(%rax) # imm = 0x9B05688C
movq -0x8(%rbp), %rax
movl $0x1f83d9ab, 0x68(%rax) # imm = 0x1F83D9AB
movq -0x8(%rbp), %rax
movl $0x5be0cd19, 0x6c(%rax) # imm = 0x5BE0CD19
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/skeeto[P]enchive/src/sha256.c
// Function: sha256_update
void sha256_update(SHA256_CTX *ctx, const uint8_t data[], size_t len)
{
	uint32_t i;

	for (i = 0; i < len; ++i) {
		ctx->data[ctx->datalen] = data[i];
		ctx->datalen++;
		if (ctx->datalen == 64) {
			sha256_transform(ctx, ctx->data);
			ctx->bitlen += 512;
			ctx->datalen = 0;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpq -0x18(%rbp), %rax
jae 0xa6db
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x40(%rcx), %ecx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl 0x40(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rax
cmpl $0x40, 0x40(%rax)
jne 0xa6ce
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xa270
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rcx
addq $0x200, %rcx            # imm = 0x200
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x40(%rax)
jmp 0xa6d0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xa66b
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/janmojzis[P]mcencrypt/mcdecrypt.c
// Function: cleanup
void cleanup(void) {
    randombytes(&g, sizeof g);

    if (map != MAP_FAILED) {
        munmap(map, maplen);
        map = MAP_FAILED;
        maplen = 0;
    }

    if (buf) {
        free(buf);
        buf = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x10e7d(%rip), %rdi     # 0x120c8
movl $0x1037d8, %esi         # imm = 0x1037D8
callq 0xd500
movq $-0x1, %rax
cmpq %rax, 0x10e4d(%rip)     # 0x120b0
je 0x1291
movq 0x10e44(%rip), %rdi     # 0x120b0
movq 0x11462d(%rip), %rsi    # 0x1158a0
callq 0x10e0
movq $-0x1, %rax
movq %rax, 0x10e2a(%rip)     # 0x120b0
movq $0x0, 0x11460f(%rip) # 0x1158a0
cmpq $0x0, 0x11460f(%rip)    # 0x1158a8
je 0x12b2
movq 0x114606(%rip), %rdi    # 0x1158a8
callq 0x1030
movq $0x0, 0x1145f6(%rip) # 0x1158a8
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lengjingzju[P]json/json.c
// Function: item_total_get
static inline int _item_total_get(json_object *json)
{
    int cnt = 0;
    json_object *item = NULL;

    switch (json->type_member) {
    case JSON_ARRAY:
    case JSON_OBJECT:
        json_list_for_each_entry(item, &json->value.head, list, json_object) {
            cnt += _item_total_get(item);
        }
        break;
    default:
        break;
    }
    ++cnt;

    return cnt;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movq $0x0, (%rsp)
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
andl $0xf, %eax
addl $-0x8, %eax
subl $0x1, %eax
ja 0x247d
jmp 0x243e
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
addq $0x18, %rcx
cmpq %rcx, %rax
je 0x247b
movq (%rsp), %rdi
callq 0x2410
addl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movq (%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
jmp 0x244b
jmp 0x247f
jmp 0x247f
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/lengjingzju[P]json/json.c
// Function: json_new_object
json_object *json_new_object(json_type_t type)
{
    json_object *json = NULL;

    if ((json = (json_object *)json_calloc(1, sizeof(json_object))) == NULL) {
        JsonErr("malloc failed!\n");
        return NULL;
    }

    json->type_member = type;
    switch (type) {
    case JSON_ARRAY:
    case JSON_OBJECT:
        INIT_JSON_LIST_HEAD(&json->value.head);
        break;
    default:
        break;
    }

    return json;
}

// Assembly:
subq $0x18, %rsp
movl %edi, 0xc(%rsp)
movq $0x0, (%rsp)
movl $0x1, %edi
movl $0x28, %esi
callq 0x2170
movq %rax, (%rsp)
cmpq $0x0, %rax
jne 0x267e
jmp 0x264b
leaq 0x111e6(%rip), %rdi     # 0x13838
leaq 0x112ac(%rip), %rsi     # 0x13905
movl $0x137, %edx            # imm = 0x137
movb $0x0, %al
callq 0x2100
leaq 0x111de(%rip), %rdi     # 0x1384a
movb $0x0, %al
callq 0x2100
movq $0x0, 0x10(%rsp)
jmp 0x26bc
movl 0xc(%rsp), %edx
movq (%rsp), %rax
movl 0x8(%rax), %ecx
andl $0xf, %edx
andl $-0x10, %ecx
orl %edx, %ecx
movl %ecx, 0x8(%rax)
movl 0xc(%rsp), %eax
addl $-0x8, %eax
subl $0x1, %eax
ja 0x26b1
jmp 0x26a2
movq (%rsp), %rdi
addq $0x18, %rdi
callq 0x26d0
jmp 0x26b3
jmp 0x26b3
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lengjingzju[P]json/json.c
// Function: json_create_item
json_object *json_create_item(json_type_t type, void *value)
{
    json_object *json = NULL;

    if ((json = (json_object *)json_calloc(1, sizeof(json_object))) == NULL) {
        JsonErr("malloc failed!\n");
        return NULL;
    }

    json->type_member = type;
    switch (type) {
    case JSON_NULL:
        break;
    case JSON_BOOL:   json->value.vnum.vbool = *(bool *)value;      break;
    case JSON_INT:    json->value.vnum.vint  = *(int32_t *)value;   break;
    case JSON_HEX:    json->value.vnum.vhex  = *(uint32_t *)value;  break;
    case JSON_LINT:   json->value.vnum.vlint = *(int64_t *)value;   break;
    case JSON_LHEX:   json->value.vnum.vlhex = *(uint64_t *)value;  break;
    case JSON_DOUBLE: json->value.vnum.vdbl  = *(double *)value;    break;
    case JSON_STRING:
        if (json_set_string_value(json, (json_string_t *)value) < 0)
            return NULL;
        break;
    case JSON_ARRAY:
    case JSON_OBJECT:
        INIT_JSON_LIST_HEAD(&json->value.head);
        break;
    default:
        break;
    }

    return json;
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x1c(%rsp)
movq %rsi, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movl $0x1, %edi
movl $0x28, %esi
callq 0x2170
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x2768
jmp 0x2732
leaq 0x110ff(%rip), %rdi     # 0x13838
leaq 0x111d6(%rip), %rsi     # 0x13916
movl $0x14d, %edx            # imm = 0x14D
movb $0x0, %al
callq 0x2100
leaq 0x110f7(%rip), %rdi     # 0x1384a
movb $0x0, %al
callq 0x2100
movq $0x0, 0x20(%rsp)
jmp 0x285b
movl 0x1c(%rsp), %edx
movq 0x8(%rsp), %rax
movl 0x8(%rax), %ecx
andl $0xf, %edx
andl $-0x10, %ecx
orl %edx, %ecx
movl %ecx, 0x8(%rax)
movl 0x1c(%rsp), %eax
movq %rax, (%rsp)
subq $0x9, %rax
ja 0x284f
movq (%rsp), %rax
leaq 0x10864(%rip), %rcx     # 0x13000
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x2851
movq 0x10(%rsp), %rax
movb (%rax), %cl
movq 0x8(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x18(%rax)
jmp 0x2851
movq 0x10(%rsp), %rax
movl (%rax), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x18(%rax)
jmp 0x2851
movq 0x10(%rsp), %rax
movl (%rax), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x18(%rax)
jmp 0x2851
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x2851
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x2851
movq 0x10(%rsp), %rax
movsd (%rax), %xmm0
movq 0x8(%rsp), %rax
movsd %xmm0, 0x18(%rax)
jmp 0x2851
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x2870
cmpl $0x0, %eax
jge 0x283d
movq $0x0, 0x20(%rsp)
jmp 0x285b
jmp 0x2851
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
callq 0x26d0
jmp 0x2851
jmp 0x2851
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/lengjingzju[P]json/json.c
// Function: json_string_hash_code
uint32_t json_string_hash_code(json_string_t *jstr)
{
    uint32_t i = 0, hash = 0;

    json_string_info_update(jstr);
    if (!jstr->len)
        return 0;

    for (i = 0; i < jstr->len; ++i)
        hash = (hash << 5) - hash + jstr->str[i];
    return hash;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movl $0x0, (%rsp)
movq 0x8(%rsp), %rdi
callq 0x20a0
movq 0x8(%rsp), %rax
movl (%rax), %eax
shrl $0x8, %eax
cmpl $0x0, %eax
jne 0x2c5b
movl $0x0, 0x14(%rsp)
jmp 0x2ca8
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movq 0x8(%rsp), %rcx
movl (%rcx), %ecx
shrl $0x8, %ecx
cmpl %ecx, %eax
jae 0x2ca1
movl (%rsp), %eax
shll $0x5, %eax
subl (%rsp), %eax
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rcx
movl 0x4(%rsp), %edx
movsbl (%rcx,%rdx), %ecx
addl %ecx, %eax
movl %eax, (%rsp)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x2c63
movl (%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lengjingzju[P]json/json.c
// Function: json_set_number_value
int json_set_number_value(json_object *json, json_type_t type, void *value)
{
    int ret = 0;

    switch (json->type_member) {
    case JSON_BOOL:
    case JSON_INT:
    case JSON_HEX:
    case JSON_LINT:
    case JSON_LHEX:
    case JSON_DOUBLE:
        break;
    default:
        JsonErr("wrong type!\n");
        return -1;
    }

    switch (type) {
    case JSON_BOOL:   json->value.vnum.vbool = *(bool *)value;      break;
    case JSON_INT:    json->value.vnum.vint  = *(int32_t *)value;   break;
    case JSON_HEX:    json->value.vnum.vhex  = *(uint32_t *)value;  break;
    case JSON_LINT:   json->value.vnum.vlint = *(int64_t *)value;   break;
    case JSON_LHEX:   json->value.vnum.vlhex = *(uint64_t *)value;  break;
    case JSON_DOUBLE: json->value.vnum.vdbl  = *(double *)value;    break;
    default:                                                    return -1;
    }

    if (json->type_member != type) {
        ret = json->type_member;
        json->type_member = type;
    }

    return ret;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x28(%rsp), %rax
movl 0x8(%rax), %eax
andl $0xf, %eax
decl %eax
subl $0x5, %eax
ja 0x35e0
jmp 0x35de
jmp 0x3617
jmp 0x35e2
leaq 0x1024f(%rip), %rdi     # 0x13838
leaq 0x102d0(%rip), %rsi     # 0x138c0
movl $0x203, %edx            # imm = 0x203
movb $0x0, %al
callq 0x2100
leaq 0x102b0(%rip), %rdi     # 0x138b3
movb $0x0, %al
callq 0x2100
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x36fc
movl 0x24(%rsp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x5, %eax
ja 0x36b3
movq 0x8(%rsp), %rax
leaq 0xfae7(%rip), %rcx      # 0x13120
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rsp), %rax
movb (%rax), %cl
movq 0x28(%rsp), %rax
andb $0x1, %cl
movb %cl, 0x18(%rax)
jmp 0x36bd
movq 0x18(%rsp), %rax
movl (%rax), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x18(%rax)
jmp 0x36bd
movq 0x18(%rsp), %rax
movl (%rax), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x18(%rax)
jmp 0x36bd
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x36bd
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x18(%rax)
jmp 0x36bd
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
movq 0x28(%rsp), %rax
movsd %xmm0, 0x18(%rax)
jmp 0x36bd
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x36fc
movq 0x28(%rsp), %rax
movl 0x8(%rax), %eax
andl $0xf, %eax
cmpl 0x24(%rsp), %eax
je 0x36f4
movq 0x28(%rsp), %rax
movl 0x8(%rax), %eax
andl $0xf, %eax
movl %eax, 0x14(%rsp)
movl 0x24(%rsp), %edx
movq 0x28(%rsp), %rax
movl 0x8(%rax), %ecx
andl $0xf, %edx
andl $-0x10, %ecx
orl %edx, %ecx
movl %ecx, 0x8(%rax)
movl 0x14(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/lengjingzju[P]json/json.c
// Function: json_get_array_size
int json_get_array_size(json_object *json)
{
    int count = 0;
    json_object *pos = NULL;

    if (json->type_member == JSON_ARRAY) {
        json_list_for_each_entry(pos, &json->value.head, list, json_object) {
            ++count;
        }
    }

    return count;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl $0x0, -0xc(%rsp)
movq $0x0, -0x18(%rsp)
movq -0x8(%rsp), %rax
movl 0x8(%rax), %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x3773
movq -0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rsp)
movq -0x18(%rsp), %rax
movq -0x8(%rsp), %rcx
addq $0x18, %rcx
cmpq %rcx, %rax
je 0x3771
movl -0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rsp)
movq -0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rsp)
jmp 0x3744
jmp 0x3773
movl -0xc(%rsp), %eax
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/lengjingzju[P]json/json.c
// Function: json_get_object_size
int json_get_object_size(json_object *json)
{
    int count = 0;
    json_object *pos = NULL;

    if (json->type_member == JSON_OBJECT) {
        json_list_for_each_entry(pos, &json->value.head, list, json_object) {
            ++count;
        }
    }

    return count;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl $0x0, -0xc(%rsp)
movq $0x0, -0x18(%rsp)
movq -0x8(%rsp), %rax
movl 0x8(%rax), %eax
andl $0xf, %eax
cmpl $0x9, %eax
jne 0x37e3
movq -0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rsp)
movq -0x18(%rsp), %rax
movq -0x8(%rsp), %rcx
addq $0x18, %rcx
cmpq %rcx, %rax
je 0x37e1
movl -0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rsp)
movq -0x18(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rsp)
jmp 0x37b4
jmp 0x37e3
movl -0xc(%rsp), %eax
retq
nopl (%rax,%rax)