LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/thudlib.c
// Function: movedwarf
void movedwarf(struct thudboard * board, struct coord from, struct coord to)
{
    unset(board->dwarfs, from);
    hashdwarf(board, from);
    board->dwarfclump -= countneighbors(board->dwarfs, from);
    board->dwarfclump += countneighbors(board->dwarfs, to);
    hashdwarf(board, to);
    set(board->dwarfs, to);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x2, %rdi
movq -0x8(%rbp), %rsi
callq 0x48f0
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x57a0
movq -0x18(%rbp), %rdi
addq $0x2, %rdi
movq -0x8(%rbp), %rsi
callq 0x4860
movl %eax, %edx
movq -0x18(%rbp), %rax
movl 0x64(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x64(%rax)
movq -0x18(%rbp), %rdi
addq $0x2, %rdi
movq -0x10(%rbp), %rsi
callq 0x4860
movl %eax, %ecx
movq -0x18(%rbp), %rax
addl 0x64(%rax), %ecx
movl %ecx, 0x64(%rax)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x57a0
movq -0x18(%rbp), %rdi
addq $0x2, %rdi
movq -0x10(%rbp), %rsi
callq 0x3de0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/thudlib.c
// Function: undodwarf
void undodwarf(struct thudboard * board, struct move * move)
{
    movedwarf(board, move->to, move->from);
    if (move->numcapts > 0) placetroll(board, move->capts[0]);
    board->isdwarfturn = true;
    hashturn(board);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0xc(%rcx), %rsi
movq 0x4(%rax), %rdx
callq 0x3910
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jle 0x39f4
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x3a10
movq -0x8(%rbp), %rax
movb $0x1, (%rax)
movq -0x8(%rbp), %rdi
callq 0x5780
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/thudlib.c
// Function: hasneighbor
bool hasneighbor(bitboard bits, struct coord pos)
{
    for (int i=0; i < NUMDIRS; ++i)
    {
        struct coord neighbor = {pos.x + DX[i], pos.y + DY[i]};
        if (inbounds(neighbor) && get(bits, neighbor)) return true;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0xc(%rbp)
movq %rdi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x8, -0x1c(%rbp)
jge 0x3ada
movl -0xc(%rbp), %eax
movslq -0x1c(%rbp), %rdx
leaq 0x56a5(%rip), %rcx      # 0x9130
addl (%rcx,%rdx,4), %eax
movl %eax, -0x24(%rbp)
movl -0x8(%rbp), %eax
movslq -0x1c(%rbp), %rdx
leaq 0x56b1(%rip), %rcx      # 0x9150
addl (%rcx,%rdx,4), %eax
movl %eax, -0x20(%rbp)
movq -0x24(%rbp), %rdi
callq 0x3730
testb $0x1, %al
jne 0x3ab4
jmp 0x3acd
movq -0x18(%rbp), %rdi
movq -0x24(%rbp), %rsi
callq 0x4930
testb $0x1, %al
jne 0x3ac7
jmp 0x3acd
movb $0x1, -0x1(%rbp)
jmp 0x3ade
jmp 0x3acf
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3a77
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/thudlib.c
// Function: dotroll
void dotroll(struct thudboard * board, struct move * move)
{
    captdwarfs(board, move->numcapts, move->capts);
    movetroll(board, move->from, move->to);
    board->isdwarfturn = true;
    hashturn(board);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %esi
movq -0x10(%rbp), %rdx
addq $0x18, %rdx
callq 0x3b50
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x4(%rcx), %rsi
movq 0xc(%rax), %rdx
callq 0x3bf0
movq -0x8(%rbp), %rax
movb $0x1, (%rax)
movq -0x8(%rbp), %rdi
callq 0x5780
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/thudlib.c
// Function: captdwarfs
void captdwarfs(struct thudboard * board, int num, struct coord * froms)
{
    for (int i=0; i < num; ++i)
    {
        unset(board->dwarfs, froms[i]);
        hashdwarf(board, froms[i]);
        board->dwarfclump -= countneighbors(board->dwarfs, froms[i]);
    }
    board->numdwarfs -= num;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x3bd2
movq -0x8(%rbp), %rdi
addq $0x2, %rdi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x48f0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x57a0
movq -0x8(%rbp), %rdi
addq $0x2, %rdi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4860
movl %eax, %edx
movq -0x8(%rbp), %rax
movl 0x64(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x64(%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3b6a
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x5c(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/thudlib.c
// Function: movetroll
void movetroll(struct thudboard * board, struct coord from, struct coord to)
{
    unset(board->trolls, from);
    hashtroll(board, from);
    hashtroll(board, to);
    set(board->trolls, to);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
movq -0x8(%rbp), %rsi
callq 0x48f0
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x57d0
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x57d0
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rsi
callq 0x3de0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/thudlib.c
// Function: undotroll
void undotroll(struct thudboard * board, struct move * move)
{
    movetroll(board, move->to, move->from);
    placedwarfs(board, move->numcapts, move->capts);
    board->isdwarfturn = false;
    hashturn(board);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0xc(%rcx), %rsi
movq 0x4(%rax), %rdx
callq 0x3bf0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %esi
movq -0x10(%rbp), %rdx
addq $0x18, %rdx
callq 0x3cb0
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rdi
callq 0x5780
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/thudlib.c
// Function: placedwarfs
void placedwarfs(struct thudboard * board, int num, struct coord * tos)
{
    for (int i=0; i < num; ++i)
    {
        board->dwarfclump += countneighbors(board->dwarfs, tos[i]);
        hashdwarf(board, tos[i]);
        set(board->dwarfs, tos[i]);
    }
    board->numdwarfs += num;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x3d30
movq -0x8(%rbp), %rdi
addq $0x2, %rdi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4860
movl %eax, %ecx
movq -0x8(%rbp), %rax
addl 0x64(%rax), %ecx
movl %ecx, 0x64(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x57a0
movq -0x8(%rbp), %rdi
addq $0x2, %rdi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3de0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3cca
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x5c(%rax), %ecx
movl %ecx, 0x5c(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/thudlib.c
// Function: placedwarf
void placedwarf(struct thudboard * board, struct coord to)
{
    board->dwarfclump += countneighbors(board->dwarfs, to);
    hashdwarf(board, to);
    set(board->dwarfs, to);
    board->numdwarfs += 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rsi, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x2, %rdi
movq -0x8(%rbp), %rsi
callq 0x4860
movl %eax, %ecx
movq -0x10(%rbp), %rax
addl 0x64(%rax), %ecx
movl %ecx, 0x64(%rax)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x57a0
movq -0x10(%rbp), %rdi
addq $0x2, %rdi
movq -0x8(%rbp), %rsi
callq 0x3de0
movq -0x10(%rbp), %rax
movl 0x5c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x5c(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/thudlib.c
// Function: show
void show(struct thudboard * board)
{
    puts("   A B C D E F G H J K L M N O P");
    for (int y=0; y < SIZE; ++y)
    {
        printf("%2d", y+1);
        for (int x=0; x < SIZE; ++x)
        {
            putchar(' ');

            if (dwarfat(board, (struct coord) {x,y})) putchar('d');
            else if (trollat(board, (struct coord) {x,y})) putchar('T');
            else if (blockat(board, (struct coord) {x,y})) putchar('#');
            else putchar('.');
        }
        putchar('\n');
    }

    putchar('\n');
    printf("%d Dwarf%s and %d Troll%s have been captured.\n",
           board->dwarfscaptured, pl(board->dwarfscaptured),
           board->trollscaptured, pl(board->trollscaptured));
    printf("It is the %s player's turn\n",
           board->isdwarfturn ? "Dwarf" : "Troll");

    fflush(stdout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x230d(%rip), %rdi      # 0x6170
callq 0x1050
movl $0x0, -0xc(%rbp)
cmpl $0xf, -0xc(%rbp)
jge 0x3f5f
movl -0xc(%rbp), %esi
addl $0x1, %esi
leaq 0x230b(%rip), %rdi      # 0x6191
movb $0x0, %al
callq 0x1030
movl $0x0, -0x10(%rbp)
cmpl $0xf, -0x10(%rbp)
jge 0x3f47
movl $0x20, %edi
callq 0x10a0
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3770
testb $0x1, %al
jne 0x3ec7
jmp 0x3ed3
movl $0x64, %edi
callq 0x10a0
jmp 0x3f37
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x20(%rbp), %rsi
callq 0x37d0
testb $0x1, %al
jne 0x3ef2
jmp 0x3efe
movl $0x54, %edi
callq 0x10a0
jmp 0x3f35
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x28(%rbp), %rsi
callq 0x37a0
testb $0x1, %al
jne 0x3f1d
jmp 0x3f29
movl $0x23, %edi
callq 0x10a0
jmp 0x3f33
movl $0x2e, %edi
callq 0x10a0
jmp 0x3f35
jmp 0x3f37
jmp 0x3f39
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3e94
movl $0xa, %edi
callq 0x10a0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3e6f
movl $0xa, %edi
callq 0x10a0
movq -0x8(%rbp), %rax
movl 0x70(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movl 0x70(%rax), %edi
callq 0x3e20
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl 0x74(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movl 0x74(%rax), %edi
callq 0x3e20
movl -0x3c(%rbp), %esi
movq -0x38(%rbp), %rdx
movl -0x2c(%rbp), %ecx
movq %rax, %r8
leaq 0x21e8(%rip), %rdi      # 0x6195
movb $0x0, %al
callq 0x1030
movq -0x8(%rbp), %rax
movb (%rax), %cl
leaq 0x2225(%rip), %rsi      # 0x61e6
leaq 0x2218(%rip), %rax      # 0x61e0
testb $0x1, %cl
cmovneq %rax, %rsi
leaq 0x21ee(%rip), %rdi      # 0x61c4
movb $0x0, %al
callq 0x1030
movq 0x5014(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
callq 0x11f0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/thudlib.c
// Function: legalmove
bool legalmove(struct thudboard * board, struct move * move)
{
    // board and move must agree on whose turn it is
    if (board->isdwarfturn != move->isdwarfmove) return false;
    // move source must be in bounds
    else if (! inbounds(move->from)) return false;
    // move target must be in bounds
    else if (! inbounds(move->to)) return false;
    // check move details
    else if (move->isdwarfmove) return legaldwarfmove(board, move);
    else return legaltrollmove(board, move);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
movq -0x18(%rbp), %rcx
movb (%rcx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x4091
movb $0x0, -0x1(%rbp)
jmp 0x40ee
movq -0x18(%rbp), %rax
movq 0x4(%rax), %rdi
callq 0x3730
testb $0x1, %al
jne 0x40a8
movb $0x0, -0x1(%rbp)
jmp 0x40ee
movq -0x18(%rbp), %rax
movq 0xc(%rax), %rdi
callq 0x3730
testb $0x1, %al
jne 0x40bf
movb $0x0, -0x1(%rbp)
jmp 0x40ee
movq -0x18(%rbp), %rax
testb $0x1, (%rax)
je 0x40dc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4100
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x40ee
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4320
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/thudlib.c
// Function: adjacent
static bool adjacent(struct coord a, struct coord b)
{
    int dx = b.x - a.x;
    int dy = b.y - a.y;

    if (dx == 0 && dy == 0) return false;
    else if (abs(dx) > 1 || abs(dy) > 1) return false;
    else return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0xc(%rbp)
movq %rsi, -0x14(%rbp)
movl -0x14(%rbp), %eax
subl -0xc(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x10(%rbp), %eax
subl -0x8(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0x45d0
cmpl $0x0, -0x1c(%rbp)
jne 0x45d0
movb $0x0, -0x1(%rbp)
jmp 0x45f8
movl -0x18(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl $0x1, %eax
jg 0x45ee
movl -0x1c(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
cmpl $0x1, %eax
jle 0x45f4
movb $0x0, -0x1(%rbp)
jmp 0x45f8
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/thudlib.c
// Function: domoveupdatecapts
void domoveupdatecapts(struct thudboard * board, struct move * move)
{
    if (board->isdwarfturn)
    {
        dodwarf(board, move);
        board->trollscaptured += move->numcapts;
    }
    else
    {
        dotroll(board, move);
        board->dwarfscaptured += move->numcapts;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
testb $0x1, (%rax)
je 0x4639
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3860
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x8(%rbp), %rax
addl 0x74(%rax), %ecx
movl %ecx, 0x74(%rax)
jmp 0x4657
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3af0
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x8(%rbp), %rax
addl 0x70(%rax), %ecx
movl %ecx, 0x70(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/thudlib.c
// Function: getpos
bool getpos(char ** input, struct coord * pos)
{
    pos->x = lettertocolumn(** input);
    if (pos->x == -1) return false;
    * input += 1;

    int numchars;
    int numconvs = sscanf(* input, "%2d%n", & pos->y, & numchars);
    if (numconvs < 1) return false;
    pos->y -= 1;
    if (pos->y < 0 || pos->y >= SIZE) return false;

    * input += numchars;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %edi
callq 0x4690
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
cmpl $-0x1, (%rax)
jne 0x4736
movb $0x0, -0x1(%rbp)
jmp 0x47b2
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
addq $0x4, %rdx
leaq 0x1a92(%rip), %rsi      # 0x61ec
leaq -0x1c(%rbp), %rcx
movb $0x0, %al
callq 0x1070
movl %eax, -0x20(%rbp)
cmpl $0x1, -0x20(%rbp)
jge 0x4774
movb $0x0, -0x1(%rbp)
jmp 0x47b2
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
subl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jl 0x4795
movq -0x18(%rbp), %rax
cmpl $0xf, 0x4(%rax)
jl 0x479b
movb $0x0, -0x1(%rbp)
jmp 0x47b2
movl -0x1c(%rbp), %edx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/thudlib.c
// Function: countneighbors
int countneighbors(bitboard bits, struct coord pos)
{
    int neighbors = 0;
    for (int i=0; i < NUMDIRS; ++i)
    {
        struct coord neighbor = {pos.x + DX[i], pos.y + DY[i]};
        if (inbounds(neighbor)) neighbors += get(bits, neighbor);
    }
    return neighbors;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rsi, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x8, -0x18(%rbp)
jge 0x48e0
movl -0x8(%rbp), %eax
movslq -0x18(%rbp), %rdx
leaq 0x489e(%rip), %rcx      # 0x9130
addl (%rcx,%rdx,4), %eax
movl %eax, -0x20(%rbp)
movl -0x4(%rbp), %eax
movslq -0x18(%rbp), %rdx
leaq 0x48aa(%rip), %rcx      # 0x9150
addl (%rcx,%rdx,4), %eax
movl %eax, -0x1c(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3730
testb $0x1, %al
jne 0x48bb
jmp 0x48d3
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x4930
andb $0x1, %al
movzbl %al, %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x48d5
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x487e
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/heap.c
// Function: heapup
static void heapup(struct moveheap * heap, int i)
{
    if (i > 0)
    {
        int p = parent(i);
        if (score(heap, i) > score(heap, p))
        {
            swap(heap, i, p);
            heapup(heap, p);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0x4b71
movl -0xc(%rbp), %edi
callq 0x4d40
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4d60
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x4d60
movl %eax, %ecx
movl -0x14(%rbp), %eax
cmpl %ecx, %eax
jle 0x4b6f
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x4d90
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x4b10
jmp 0x4b71
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/heap.c
// Function: pop
struct move * pop(struct moveheap * heap)
{
    struct move * move = heap->moves[0].move;

    heap->moves[0] = heap->moves[--heap->used];
    heapdown(heap, 0);

    return move;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x8(%rbp), %rsi
movl (%rsi), %edx
addl $-0x1, %edx
movl %edx, (%rsi)
movslq %edx, %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x4bf0
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/heap.c
// Function: heapdown
static void heapdown(struct moveheap * heap, int i)
{
    int l = left(i);
    int r = right(i);

    if (r < heap->used)
    {
        int j = i;
        if (score(heap, l) > score(heap, i)) j = l;
        if (score(heap, r) > score(heap, j)) j = r;

        if (i != j)
        {
            swap(heap, i, j);
            heapdown(heap, j);
        }
    }
    else if (l < heap->used
             && score(heap, i) < score(heap, l))
    {
        swap(heap, i, l);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %edi
callq 0x4e20
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %edi
callq 0x4e40
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x4c9f
movl -0xc(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x4d60
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4d60
movl %eax, %ecx
movl -0x1c(%rbp), %eax
cmpl %ecx, %eax
jle 0x4c50
movl -0x10(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x4d60
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x4d60
movl %eax, %ecx
movl -0x20(%rbp), %eax
cmpl %ecx, %eax
jle 0x4c7a
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x18(%rbp), %eax
je 0x4c9d
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x4d90
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x4bf0
jmp 0x4cdf
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x4cdd
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4d60
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
callq 0x4d60
movl %eax, %ecx
movl -0x24(%rbp), %eax
cmpl %ecx, %eax
jge 0x4cdd
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x4d90
jmp 0x4cdf
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/heap.c
// Function: popscored
struct scoredmove popscored(struct moveheap * heap)
{
    struct scoredmove move = heap->moves[0];

    heap->moves[0] = heap->moves[--heap->used];
    heapdown(heap, 0);

    return move;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x10(%rbp)
movq -0x18(%rbp), %rdx
movq 0x8(%rdx), %rax
movslq (%rdx), %rcx
movl %ecx, %esi
shlq $0x4, %rcx
decl %esi
movl %esi, (%rdx)
movups -0x10(%rcx,%rax), %xmm0
movups %xmm0, (%rax)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x4bf0
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/mctree.c
// Function: initmctree
void initmctree(struct mctreenode * node, struct thudboard * board) {
    node->boardstate = * board;
    node->allmoves = allmoves(board);
    int movecount = node->allmoves.used;
    node->unexplored_moves = movecount;
    node->children = malloc(movecount * sizeof(struct mctreenode));
    node->scoreguess = 0;
    node->visits = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x80, %edx
callq 0x11c0
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x22f0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x20(%rbp), %rcx
movq %rcx, 0x80(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x88(%rax)
movq -0x8(%rbp), %rax
movl 0x80(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x90(%rax)
movslq -0x24(%rbp), %rax
imulq $0xb0, %rax, %rdi
callq 0x10b0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x8(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0xa0(%rax)
movq -0x8(%rbp), %rax
movsd 0xbc5(%rip), %xmm0      # 0x6210
movsd %xmm0, 0xa8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/mctree.c
// Function: closemctree
void closemctree(struct mctreenode * node) {
    for (int ix=0 ; ix<node->allmoves.used ; ix+=1) {
        closemctree(& node->children[ix]);
    }
    free(node->children);

    closelist(& (node->allmoves));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x80(%rcx), %eax
jge 0x56ab
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rdi
movslq -0xc(%rbp), %rax
imulq $0xb0, %rax, %rax
addq %rax, %rdi
callq 0x5660
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5673
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rdi
callq 0x10f0
movq -0x8(%rbp), %rdi
addq $0x80, %rdi
callq 0x4f40
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/ttable.c
// Function: inithash
void inithash(void)
{
    // hashes should be "random" yet must be the same every run
    // otherwise the opening book file will be unusable
    srandom(1);

    turnhash = randomhash();

    for (int i=0; i < SIZE*SIZE; ++i)
    {
        dwarfhash[i] = randomhash();
        trollhash[i] = randomhash();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
callq 0x10d0
callq 0x56e0
movq %rax, 0x3b82(%rip)      # 0x92b0
movl $0x0, -0x4(%rbp)
cmpl $0xe1, -0x4(%rbp)
jge 0x5777
callq 0x56e0
movq %rax, %rdx
movslq -0x4(%rbp), %rcx
leaq 0x3b6f(%rip), %rax      # 0x92c0
movq %rdx, (%rax,%rcx,8)
callq 0x56e0
movq %rax, %rdx
movslq -0x4(%rbp), %rcx
leaq 0x4268(%rip), %rax      # 0x99d0
movq %rdx, (%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x5735
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/ttable.c
// Function: initttable
void initttable(int memuse)
{
    TTABLESIZE = memuse / sizeof(struct tableentry);

    // allocate memory for table
    void * mem = mmap(NULL, memuse, PROT_READ | PROT_WRITE,
                      MAP_ANON | MAP_PRIVATE, -1, 0);
    ttable = (struct tableentry *) mem;

    // read in table data if present
    FILE * book = fopen(BOOKFILENAME, "r");
    if (book)
    {
        //printf("Reading opening book...");
        //fflush(stdout);
        struct tableentry temp;
        while (fread(& temp, sizeof(struct tableentry), 1, book))
        {
            int index = ttindex(temp.hash);
            ttable[index] = temp;
        }
        //printf(" done.\n");
        //fflush(stdout);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movslq -0x4(%rbp), %rax
shrq $0x5, %rax
movl %eax, 0x489f(%rip)      # 0xa0d8
movslq -0x4(%rbp), %rsi
xorl %eax, %eax
movl %eax, %r9d
movl $0x3, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movq %r9, %rdi
callq 0x11d0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, 0x4877(%rip)      # 0xa0e0
movq 0x3980(%rip), %rdi      # 0x91f0
leaq 0x9fe(%rip), %rsi       # 0x6275
callq 0x10c0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x58e7
jmp 0x5889
movq -0x18(%rbp), %rcx
leaq -0x38(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
callq 0x1130
cmpq $0x0, %rax
je 0x58e5
movq -0x38(%rbp), %rdi
callq 0x5800
movl %eax, -0x3c(%rbp)
movq 0x4827(%rip), %rax      # 0xa0e0
movslq -0x3c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq -0x38(%rbp), %rcx
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x18(%rax)
jmp 0x5889
jmp 0x58e7
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/ttable.c
// Function: ttput
void ttput(struct tableentry newentry)
{
    int index = ttindex(newentry.hash);
    struct tableentry * entry = & ttable[index];

    if (newentry.worth >= entry->worth) * entry = newentry;
    else entry->worth -= newentry.worth;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq (%rax), %rdi
callq 0x5800
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, -0x4(%rbp)
movq 0x47c8(%rip), %rcx      # 0xa0e0
movslq -0x4(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movq %rcx, -0x10(%rbp)
movl 0xc(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jl 0x595b
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
jmp 0x596e
movq -0x18(%rbp), %rax
movl 0xc(%rax), %edx
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/icarroll[P]clunk/ttable.c
// Function: ttget
struct tableentry * ttget(hash_t hash)
{
    struct tableentry * entry = & ttable[ttindex(hash)];

    if (entry->hash == hash)
    {
      entry->worth = entry->depth;
      return entry;
    }
    else return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq 0x474d(%rip), %rax      # 0xa0e0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5800
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x59d9
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x59e1
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/deoxyseq256128v13/ref/deoxys.c
// Function: get_block_number_from_tag
uint64_t get_block_number_from_tag(uint8_t *tweak) {
  return 
    ((uint64_t)tweak[ 0] << 56 ) ^
    ((uint64_t)tweak[ 1] << 48 ) ^
    ((uint64_t)tweak[ 2] << 40 ) ^
    ((uint64_t)tweak[ 3] << 32 ) ^
    ((uint64_t)tweak[ 4] << 24 ) ^
    ((uint64_t)tweak[ 5] << 16 ) ^
    ((uint64_t)tweak[ 6] <<  8 ) ^
    ((uint64_t)tweak[ 7]       )
    ;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movzbl (%rax), %eax
shlq $0x38, %rax
movq -0x8(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
shlq $0x30, %rcx
xorq %rcx, %rax
movq -0x8(%rsp), %rcx
movzbl 0x2(%rcx), %ecx
shlq $0x28, %rcx
xorq %rcx, %rax
movq -0x8(%rsp), %rcx
movzbl 0x3(%rcx), %ecx
shlq $0x20, %rcx
xorq %rcx, %rax
movq -0x8(%rsp), %rcx
movzbl 0x4(%rcx), %ecx
shlq $0x18, %rcx
xorq %rcx, %rax
movq -0x8(%rsp), %rcx
movzbl 0x5(%rcx), %ecx
shlq $0x10, %rcx
xorq %rcx, %rax
movq -0x8(%rsp), %rcx
movzbl 0x6(%rcx), %ecx
shlq $0x8, %rcx
xorq %rcx, %rax
movq -0x8(%rsp), %rcx
movzbl 0x7(%rcx), %ecx
xorq %rcx, %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/deoxyseq256128v13/ref/tweakableBC.c
// Function: multi
uint8_t multi (uint8_t x, uint8_t alpha) {
  if( 1 == alpha ) return x;
  if( 2 == alpha ) return mul2[x];
  if( 4 == alpha ) return mul2[mul2[x]];

  printf("Incorrect alpha (%d) passed to the function g in the tweakey schedule. Exiting...\n", alpha); exit(2);
}

// Assembly:
pushq %rax
movb %sil, %al
movb %dil, %cl
movb %cl, 0x6(%rsp)
movb %al, 0x5(%rsp)
movzbl 0x5(%rsp), %ecx
movl $0x1, %eax
cmpl %ecx, %eax
jne 0x2617
movb 0x6(%rsp), %al
movb %al, 0x7(%rsp)
jmp 0x268b
movzbl 0x5(%rsp), %ecx
movl $0x2, %eax
cmpl %ecx, %eax
jne 0x263c
movzbl 0x6(%rsp), %eax
movl %eax, %ecx
leaq 0x59cd(%rip), %rax      # 0x8000
movb (%rax,%rcx), %al
movb %al, 0x7(%rsp)
jmp 0x268b
movzbl 0x5(%rsp), %ecx
movl $0x4, %eax
cmpl %ecx, %eax
jne 0x266e
movzbl 0x6(%rsp), %eax
movl %eax, %ecx
leaq 0x59a8(%rip), %rax      # 0x8000
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x599b(%rip), %rax      # 0x8000
movb (%rax,%rcx), %al
movb %al, 0x7(%rsp)
jmp 0x268b
movzbl 0x5(%rsp), %esi
leaq 0x82b6(%rip), %rdi      # 0xa930
movb $0x0, %al
callq 0x1040
movl $0x2, %edi
callq 0x1070
movb 0x7(%rsp), %al
popq %rcx
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/eridanhq[P]miraclelib/setsamplerate.c
// Function: main
int main(int argc, char *argv[])
{
	int memfd;
	void *mapped_base;

	double rate; 

	rate = atof(argv[1]);

	memfd = open("/dev/mem", O_RDWR | O_SYNC);
	if (memfd == -1) {
		printf("Can't open /dev/mem.\n");
		exit(0);
	}

	// Map one page of memory into user space such that the device is in that page, but it may not
	// be at the start of the page

	mapped_base = mmap( (void *) MEM0_BASE_ADDRESS, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, memfd, FIFO_BASE_ADDRESS);
	if (mapped_base == (void *) -1) {
		printf("Can't map the memory to user space.\n");
		exit(0);
	}
	
	/* ----------- INSERT CODE BELOW THIS LINE ------------ */

	set_sample_rate_tx(rate,mapped_base);

	/* ----------- INSERT CODE ABOVE THIS LINE ------------ */

	if (munmap(mapped_base, MAP_SIZE) == -1) {
		printf("Can't unmap memory from user space.\n");
		exit(0);
	}
	close(memfd);
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1060
movsd %xmm0, -0x28(%rbp)
leaq 0x1d95(%rip), %rdi      # 0x3004
movl $0x101002, %esi         # imm = 0x101002
movb $0x0, %al
callq 0x10f0
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
jne 0x1299
leaq 0x1d82(%rip), %rdi      # 0x300d
movb $0x0, %al
callq 0x10a0
xorl %edi, %edi
callq 0x1120
movl -0x14(%rbp), %r8d
movl $0x40000000, %edi       # imm = 0x40000000
movl $0x400000, %esi         # imm = 0x400000
movl $0x3, %edx
movl $0x11, %ecx
movl $0x60000000, %r9d       # imm = 0x60000000
callq 0x1080
movq %rax, -0x20(%rbp)
movq $-0x1, %rax
cmpq %rax, -0x20(%rbp)
jne 0x12e2
leaq 0x1d4f(%rip), %rdi      # 0x3023
movb $0x0, %al
callq 0x10a0
xorl %edi, %edi
callq 0x1120
movsd -0x28(%rbp), %xmm0
movq -0x20(%rbp), %rdi
callq 0x13c0
movq -0x20(%rbp), %rdi
movl $0x400000, %esi         # imm = 0x400000
callq 0x10e0
cmpl $-0x1, %eax
jne 0x1318
leaq 0x1d3e(%rip), %rdi      # 0x3048
movb $0x0, %al
callq 0x10a0
xorl %edi, %edi
callq 0x1120
movl -0x14(%rbp), %edi
callq 0x10c0
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/tests/nc-client/main.c
// Function: callback_connected
static int
callback_connected(void * cookie, int socket)
{
	struct senddata * send = (struct senddata *)cookie;

	/* We are no longer connecting. */
	send->connect_cookie = NULL;

	/* Check that the connection did not fail. */
	if (socket == -1) {
		warn0("failed to connect");
		goto err0;
	}

	/* Record socket for future use. */
	send->socket = socket;

	return send_input(cookie);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x18(%rax)
cmpl $-0x1, -0x14(%rbp)
jne 0x26c6
jmp 0x26ab
leaq 0x79c5(%rip), %rdi      # 0xa077
movb $0x0, %al
callq 0x7cb0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x26de
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rdi
callq 0x26f0
movl %eax, -0x4(%rbp)
jmp 0x26e5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/tests/nc-client/main.c
// Function: send_input
static int
send_input(void * cookie)
{
	struct senddata * send = (struct senddata *)cookie;
	size_t len = 0;

	/* Read data from stdin. */
	if ((send->nchars = getline(&send->buffer, &len, stdin)) != -1) {
		/* Send data to server. */
		if ((send->write_cookie = network_write(send->socket,
		    (uint8_t *)send->buffer, (size_t)send->nchars,
		    (size_t)send->nchars, callback_wrote, cookie)) == NULL) {
			warn0("network_write failure");
			goto err0;
		}
	} else {
		/* If we didn't get an EOF, then there was an error. */
		if (!feof(stdin)) {
			warn0("getline(..., ..., stdin)");
			goto err0;
		}

		/* We're not going to send anything else. */
		if (shutdown(send->socket, SHUT_WR)) {
			warnp("shutdown");
			goto err0;
		}

		/*
		 * The server should not send any data back, but attempting to
		 * read will detect when the other end of the socket is closed.
		 */
		if ((send->read_cookie = network_read(send->socket,
		    send->dummybuf, 1, 1, callback_stopping, cookie))
		    == NULL) {
			warn0("network_read initialize");
			goto err0;
		}

	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq 0xb8c1(%rip), %rax      # 0xdfd8
movq (%rax), %rdx
leaq -0x20(%rbp), %rsi
callq 0x22d0
movq -0x18(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $-0x1, %rax
je 0x2792
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %r9
leaq 0x136(%rip), %r8        # 0x2890
callq 0x54f0
movq -0x18(%rbp), %rcx
movq %rax, 0x20(%rcx)
cmpq $0x0, %rax
jne 0x278d
jmp 0x276f
leaq 0x7913(%rip), %rdi      # 0xa089
movb $0x0, %al
callq 0x7cb0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x2872
jmp 0x2869
movq 0xb83f(%rip), %rax      # 0xdfd8
movq (%rax), %rdi
callq 0x21f0
cmpl $0x0, %eax
jne 0x27c6
jmp 0x27a8
leaq 0x78f0(%rip), %rdi      # 0xa09f
movb $0x0, %al
callq 0x7cb0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x2872
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edi
movl $0x1, %esi
callq 0x2100
cmpl $0x0, %eax
je 0x2815
jmp 0x27de
callq 0x20a0
cmpl $0x0, (%rax)
je 0x2803
leaq 0x78c9(%rip), %rdi      # 0xa0b8
movb $0x0, %al
callq 0x7a60
callq 0x20a0
movl $0x0, (%rax)
jmp 0x2811
leaq 0x78ae(%rip), %rdi      # 0xa0b8
movb $0x0, %al
callq 0x7cb0
jmp 0x2813
jmp 0x2872
movq -0x18(%rbp), %rax
movl 0x10(%rax), %edi
movq -0x18(%rbp), %rsi
addq $0x30, %rsi
movq -0x10(%rbp), %r9
movl $0x1, %ecx
leaq 0x12c(%rip), %r8        # 0x2960
movq %rcx, %rdx
callq 0x4f10
movq -0x18(%rbp), %rcx
movq %rax, 0x28(%rcx)
cmpq $0x0, %rax
jne 0x2867
jmp 0x284c
leaq 0x786e(%rip), %rdi      # 0xa0c1
movb $0x0, %al
callq 0x7cb0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x2872
jmp 0x2869
movl $0x0, -0x4(%rbp)
jmp 0x2879
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/tests/nc-client/main.c
// Function: callback_wrote
static int
callback_wrote(void * cookie, ssize_t lenwrit)
{
	struct senddata * send = (struct senddata *)cookie;

	/* We are no longer writing. */
	send->write_cookie = NULL;

	/* Check results. */
	if (lenwrit == -1) {
		warnp("network_write send");
		goto err0;
	} else {
		/* We should have sent everything. */
		assert(lenwrit == send->nchars);
	}

	/* Clear the buffer that was used. */
	free(send->buffer);
	send->buffer = NULL;

	return send_input(cookie);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x20(%rax)
cmpq $-0x1, -0x18(%rbp)
jne 0x28f4
jmp 0x28bd
callq 0x20a0
cmpl $0x0, (%rax)
je 0x28e2
leaq 0x780b(%rip), %rdi      # 0xa0d9
movb $0x0, %al
callq 0x7a60
callq 0x20a0
movl $0x0, (%rax)
jmp 0x28f0
leaq 0x77f0(%rip), %rdi      # 0xa0d9
movb $0x0, %al
callq 0x7cb0
jmp 0x28f2
jmp 0x294a
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x2904
jmp 0x2923
leaq 0x77e1(%rip), %rdi      # 0xa0ec
leaq 0x77f2(%rip), %rsi      # 0xa104
movl $0x7c, %edx
leaq 0x77ed(%rip), %rcx      # 0xa10b
callq 0x2170
jmp 0x2925
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x2040
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rdi
callq 0x26f0
movl %eax, -0x4(%rbp)
jmp 0x2951
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/tests/nc-client/main.c
// Function: callback_stopping
static int
callback_stopping(void * cookie, ssize_t lenread)
{
	struct senddata * send = (struct senddata *)cookie;

	/* We are no longer reading. */
	send->read_cookie = NULL;

	/* Check results. */
	if (lenread == -1) {
		warnp("network_read received");
		goto err0;
	} else {
		/* We should have received nothing. */
		if (lenread != 0) {
			warn0("network_read received non-zero data");
			goto err0;
		}
	}

	/* Close connection. */
	send->conndone = 1;

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, 0x28(%rax)
cmpq $-0x1, -0x18(%rbp)
jne 0x29c4
jmp 0x298d
callq 0x20a0
cmpl $0x0, (%rax)
je 0x29b2
leaq 0x7791(%rip), %rdi      # 0xa12f
movb $0x0, %al
callq 0x7a60
callq 0x20a0
movl $0x0, (%rax)
jmp 0x29c0
leaq 0x7776(%rip), %rdi      # 0xa12f
movb $0x0, %al
callq 0x7cb0
jmp 0x29c2
jmp 0x29fe
cmpq $0x0, -0x18(%rbp)
je 0x29e8
jmp 0x29cd
leaq 0x7771(%rip), %rdi      # 0xa145
movb $0x0, %al
callq 0x7cb0
callq 0x20a0
movl $0x0, (%rax)
jmp 0x29fe
jmp 0x29ea
movq -0x20(%rbp), %rax
movl $0x1, 0x14(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x2a05
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../libcperciva/network/network_connect.c
// Function: network_connect_internal
static void *
network_connect_internal(struct sock_addr * const * sas,
    const struct sock_addr * sa_b, const struct timeval * timeo,
    int (* callback)(void *, int), void * cookie)
{
	struct connect_cookie * C;

	/* Bake a cookie. */
	if ((C = malloc(sizeof(struct connect_cookie))) == NULL)
		goto err0;
	C->callback = callback;
	C->cookie = cookie;
	C->sas = sas;
	C->sa_b = sa_b;
	C->cookie_immediate = NULL;
	C->cookie_timeo = NULL;
	C->s = -1;

	/* Do we have a timeout? */
	if (timeo != NULL) {
		memcpy(&C->timeo, timeo, sizeof(struct timeval));
		C->timeo_enabled = 1;
	} else {
		C->timeo_enabled = 0;
	}

	/* Try to connect to the first address. */
	if (tryconnect(C))
		goto err0;

	/* Success! */
	return (C);

err0:
	/* Failure! */
	return (NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl $0x48, %edi
callq 0x2220
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x4915
jmp 0x49b7
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x38(%rbp), %rax
movl $0xffffffff, 0x38(%rax) # imm = 0xFFFFFFFF
cmpq $0x0, -0x20(%rbp)
je 0x4992
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x20(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x28(%rax)
movq -0x38(%rbp), %rax
movl $0x1, 0x3c(%rax)
jmp 0x499d
movq -0x38(%rbp), %rax
movl $0x0, 0x3c(%rax)
movq -0x38(%rbp), %rdi
callq 0x4b80
cmpl $0x0, %eax
je 0x49ad
jmp 0x49b7
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x49bf
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../libcperciva/network/network_connect.c
// Function: network_connect_cancel
void
network_connect_cancel(void * cookie)
{
	struct connect_cookie * C = cookie;

	/* We should have either an immediate callback or a socket. */
	assert((C->cookie_immediate != NULL) || (C->s != -1));
	assert((C->cookie_immediate == NULL) || (C->s == -1));

	/* Cancel any timer. */
	if (C->cookie_timeo != NULL)
		events_timer_cancel(C->cookie_timeo);

	/* Cancel any immediate callback. */
	if (C->cookie_immediate != NULL)
		events_immediate_cancel(C->cookie_immediate);

	/* Close any socket. */
	if (C->s != -1) {
		events_network_cancel(C->s, EVENTS_NETWORK_OP_WRITE);
		if (close(C->s))
			warnp("close");
	}

	/* Free the cookie. */
	free(C);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x4a79
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x38(%rax)
je 0x4a7b
jmp 0x4a9a
leaq 0x592e(%rip), %rdi      # 0xa3b0
leaq 0x5955(%rip), %rsi      # 0xa3de
movl $0x11e, %edx            # imm = 0x11E
leaq 0x5972(%rip), %rcx      # 0xa407
callq 0x2170
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x4aaf
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x38(%rax)
jne 0x4ab1
jmp 0x4ad0
leaq 0x5973(%rip), %rdi      # 0xa42b
leaq 0x591f(%rip), %rsi      # 0xa3de
movl $0x11f, %edx            # imm = 0x11F
leaq 0x593c(%rip), %rcx      # 0xa407
callq 0x2170
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x4ae8
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x4610
movq -0x10(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x4b00
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x3170
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x38(%rax)
je 0x4b67
movq -0x10(%rbp), %rax
movl 0x38(%rax), %edi
movl $0x1, %esi
callq 0x3b20
movq -0x10(%rbp), %rax
movl 0x38(%rax), %edi
callq 0x2190
cmpl $0x0, %eax
je 0x4b65
jmp 0x4b2e
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4b53
leaq 0x591a(%rip), %rdi      # 0xa459
movb $0x0, %al
callq 0x7a60
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4b61
leaq 0x58ff(%rip), %rdi      # 0xa459
movb $0x0, %al
callq 0x7cb0
jmp 0x4b63
jmp 0x4b65
jmp 0x4b67
movq -0x10(%rbp), %rdi
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../libcperciva/network/network_connect.c
// Function: callback_timeo
static int
callback_timeo(void * cookie)
{
	struct connect_cookie * C = cookie;

	/* We're not waiting for a timer callback any more. */
	C->cookie_timeo = NULL;

	/* Stop listening for this socket. */
	events_network_cancel(C->s, EVENTS_NETWORK_OP_WRITE);

	/* This connect attempt failed. */
	return (dofailed(C));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x10(%rbp), %rax
movl 0x38(%rax), %edi
movl $0x1, %esi
callq 0x3b20
movq -0x10(%rbp), %rdi
callq 0x4e90
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/liball/../libcperciva/network/network_connect.c
// Function: callback_connect
static int
callback_connect(void * cookie)
{
	struct connect_cookie * C = cookie;
	int sockerr;
	socklen_t sockerrlen = sizeof(int);

	/* Stop waiting for the timer callback. */
	if (C->cookie_timeo != NULL) {
		events_timer_cancel(C->cookie_timeo);
		C->cookie_timeo = NULL;
	}

	/* Did we succeed? */
	if (getsockopt(C->s, SOL_SOCKET, SO_ERROR, &sockerr, &sockerrlen))
		goto err1;
	if (sockerr != 0)
		return (dofailed(C));

	/*
	 * Perform the callback (this can be done here rather than being
	 * scheduled as an immediate callback, as we're already running from
	 * callback context).
	 */
	return (docallback(C));

err1:
	if (close(C->s))
		warnp("close");
	free(C);

	/* Fatal error! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x4, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x4d8f
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x4610
movq -0x18(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x18(%rbp), %rax
movl 0x38(%rax), %edi
movl $0x1, %esi
movl $0x4, %edx
leaq -0x1c(%rbp), %rcx
leaq -0x20(%rbp), %r8
callq 0x21c0
cmpl $0x0, %eax
je 0x4db4
jmp 0x4dd6
cmpl $0x0, -0x1c(%rbp)
je 0x4dc8
movq -0x18(%rbp), %rdi
callq 0x4e90
movl %eax, -0x4(%rbp)
jmp 0x4e30
movq -0x18(%rbp), %rdi
callq 0x4e40
movl %eax, -0x4(%rbp)
jmp 0x4e30
movq -0x18(%rbp), %rax
movl 0x38(%rax), %edi
callq 0x2190
cmpl $0x0, %eax
je 0x4e20
jmp 0x4de9
callq 0x20a0
cmpl $0x0, (%rax)
je 0x4e0e
leaq 0x565f(%rip), %rdi      # 0xa459
movb $0x0, %al
callq 0x7a60
callq 0x20a0
movl $0x0, (%rax)
jmp 0x4e1c
leaq 0x5644(%rip), %rdi      # 0xa459
movb $0x0, %al
callq 0x7cb0
jmp 0x4e1e
jmp 0x4e20
movq -0x18(%rbp), %rdi
callq 0x2040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)