LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/game.c
// Function: game_unbuild
void
game_unbuild(game_t *game, int x, int y)
{
    uint16_t building = map_building(game->map, x, y);
    switch (building) {
    case C_HAMLET:
        add_population(game, -HAMLET_INC);
        break;
    case C_STABLE:
        game->max_hero -= STABLE_INC;
        break;
    case C_MINE:
    case C_LUMBERYARD:
    case C_ROAD:
    case C_FARM:
        /* Nothing special */
        break;
    case C_CASTLE:
        add_population(game, -50);
        return; // don't destroy
    }
    game->map->high[x][y].building = C_NONE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
callq 0x4ce1
cmpw $0x43, %ax
je 0x52e5
movzwl %ax, %eax
cmpl $0x53, %eax
je 0x52bc
cmpl $0x48, %eax
jne 0x52c3
movq %rbx, %rdi
movq $-0xc8, %rsi
callq 0x5187
jmp 0x52c3
addl $-0x2, 0x3c8(%rbx)
movslq %r14d, %rax
movslq %ebp, %rcx
leaq (%rax,%rax,2), %rax
shlq $0x7, %rax
addq 0x38(%rbx), %rax
shlq $0x4, %rcx
movw $0x0, 0x2(%rcx,%rax)
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
movq $-0x32, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x5187
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/game.c
// Function: game_date
void
game_date(game_t *game, char *buffer)
{
    long time = game->time;
    long day = game->time / DAY;
    time -= day * DAY;
    long hour = time / HOUR;
    time -= hour * HOUR;
    long minute = time / MINUTE;
    char *ampm = hour < 12 ? "am" : "pm";
    long hour12 = hour == 0 ? 12 : hour;
    if (hour12 > 12)
        hour12 -= 12;
    sprintf(buffer, "Day %ld, %ld:%02ld%s", day, hour12, minute, ampm);
}

// Assembly:
cvtsi2sdq 0x8(%rdi), %xmm0
movq %rsi, %rdi
movsd 0x268f(%rip), %xmm1     # 0x7998
movapd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvttsd2si %xmm2, %rdx
xorps %xmm2, %xmm2
cvtsi2sd %rdx, %xmm2
mulsd %xmm1, %xmm2
subsd %xmm2, %xmm0
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd 0x2665(%rip), %xmm1     # 0x79a0
movapd %xmm0, %xmm2
divsd %xmm1, %xmm2
cvttsd2si %xmm2, %rax
testq %rax, %rax
movl $0xc, %esi
cmovneq %rax, %rsi
leaq -0xc(%rsi), %rcx
cmpq $0xd, %rsi
cmovlq %rsi, %rcx
cmpq $0xc, %rax
leaq 0x269d(%rip), %rsi      # 0x7a08
leaq 0x2699(%rip), %r9       # 0x7a0b
cmovlq %rsi, %r9
xorps %xmm2, %xmm2
cvtsi2sd %rax, %xmm2
mulsd %xmm1, %xmm2
subsd %xmm2, %xmm0
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x260d(%rip), %xmm0     # 0x79a8
cvttsd2si %xmm0, %r8
leaq 0x2667(%rip), %rsi      # 0x7a0e
xorl %eax, %eax
jmp 0x1230
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/game.c
// Function: yield_string
void
yield_string(char *b, yield_t yield, bool rate)
{
    char *end = b;
    int count = 0;
    if (yield.gold)
        end += sprintf(end, "%s%d gold%s",
                       count++ > 0 ? ", " : "",
                       yield.gold,
                       rate ? "/day" : "");
    if (yield.wood)
        end += sprintf(end, "%s%d wood%s",
                       count++ > 0 ? ", " : "",
                       yield.wood,
                       rate ? "/day" : "");
    if (yield.food)
        end += sprintf(end, "%s%d food%s",
                       count++ > 0 ? ", " : "",
                       yield.food,
                       rate ? "/day" : "");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r14
movl %ebx, %r12d
testl %ebx, %ebx
je 0x53fd
leaq 0x2663(%rip), %r8       # 0x7a32
leaq 0x26cd(%rip), %rdx      # 0x7aa3
testb %bpl, %bpl
cmoveq %rdx, %r8
leaq 0x263f(%rip), %rsi      # 0x7a23
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x1230
cltq
addq %rax, %r14
movl $0x1, %eax
jmp 0x53ff
xorl %eax, %eax
shrq $0x20, %rbx
testl %r15d, %r15d
je 0x5449
testl %r12d, %r12d
leaq 0x2691(%rip), %rax      # 0x7aa3
leaq 0x2616(%rip), %rdx      # 0x7a2f
cmoveq %rax, %rdx
leaq 0x260e(%rip), %r8       # 0x7a32
testb %bpl, %bpl
cmoveq %rax, %r8
leaq 0x2605(%rip), %rsi      # 0x7a37
movq %r14, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x1230
cltq
addq %rax, %r14
movl $0x1, %eax
testq %rbx, %rbx
jne 0x5457
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testl %eax, %eax
leaq 0x2643(%rip), %rax      # 0x7aa3
leaq 0x25c8(%rip), %rdx      # 0x7a2f
cmoveq %rax, %rdx
leaq 0x25c0(%rip), %r8       # 0x7a32
testb %bpl, %bpl
cmoveq %rax, %r8
leaq 0x25c3(%rip), %rsi      # 0x7a43
movq %r14, %rdi
movl %ebx, %ecx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1230
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/game.c
// Function: game_hero_push
bool
game_hero_push(game_t *game, hero_t hero)
{
    for (int i = 0; i < game->max_hero; i++) {
        if (!game->heroes[i].active) {
            game->heroes[i] = hero;
            return true;
        }
    }
    return false;
}

// Assembly:
movslq 0x3c8(%rdi), %rcx
testq %rcx, %rcx
jle 0x54d5
leaq 0x3cc(%rdi), %rsi
movb $0x1, %al
cmpb $0x1, 0x3cc(%rdi)
jne 0x54d8
leaq -0x1(%rcx), %rdi
xorl %eax, %eax
cmpq %rax, %rdi
je 0x54d5
leaq 0x34(%rsi), %rdx
incq %rax
cmpb $0x0, 0x34(%rsi)
movq %rdx, %rsi
jne 0x54b8
cmpq %rcx, %rax
setb %al
jmp 0x54db
xorl %eax, %eax
retq
movq %rsi, %rdx
leaq 0x8(%rsp), %rcx
movl 0x30(%rcx), %esi
movl %esi, 0x30(%rdx)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x20(%rcx), %xmm2
movups %xmm2, 0x20(%rdx)
movups %xmm1, 0x10(%rdx)
movups %xmm0, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/game.c
// Function: building_yield
yield_t
building_yield(uint16_t building)
{
    switch (building) {
    case C_CASTLE:
        return YIELD_CASTLE;
    case C_LUMBERYARD:
        return YIELD_LUMBERYARD;
    case C_FARM:
        return YIELD_FARM;
    case C_STABLE:
        return YIELD_STABLE;
    case C_MINE:
        return YIELD_MINE;
    case C_ROAD:
        return YIELD_ROAD;
    case C_HAMLET:
        return YIELD_HAMLET;
    case C_NONE:
        break;
    }
    return (yield_t){0, 0, 0};
}

// Assembly:
movl $0x2, %eax
cmpl $0x47, %edi
jle 0x5c67
cmpl $0x52, %edi
jg 0x5c84
cmpl $0x48, %edi
je 0x5ca8
cmpl $0x4d, %edi
jne 0x5ca2
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x5, %eax
jmp 0x5c95
cmpl $0x2b, %edi
je 0x5c99
cmpl $0x43, %edi
je 0x5cc8
cmpl $0x46, %edi
jne 0x5ca2
xorl %eax, %eax
movabsq $0x400000000, %rcx      # imm = 0x400000000
jmp 0x5cc2
cmpl $0x53, %edi
je 0x5cb6
cmpl $0x57, %edi
jne 0x5ca2
movl $0x5, %edx
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x5cc4
xorl %ecx, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x5cc2
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x5cc2
xorl %edx, %edx
movabsq $-0x200000000, %rcx     # imm = 0xFFFFFFFE00000000
jmp 0x5cc4
xorl %eax, %eax
movabsq $-0x200000000, %rcx     # imm = 0xFFFFFFFE00000000
xorl %edx, %edx
orq %rcx, %rax
retq
movl $0x2, %edx
movabsq $0x200000000, %rcx      # imm = 0x200000000
jmp 0x5cc4
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/game.c
// Function: game_draw_units
void
game_draw_units(game_t *game, panel_t *p, bool id)
{
    font_t land = FONT(R, k);
    font_t sea  = FONT(r, y);
    for (int i = 0; i < (int)countof(game->invaders); i++) {
        invader_t *inv = game->invaders + i;
        if (inv->active)
            panel_putc(p, inv->x, inv->y, inv->embarked ? sea : land,
                       id ? i + 'A' : inv->type);
    }
    for (int i = 0; i < (int)countof(game->squads); i++) {
        squad_t *s = game->squads + i;
        if (s->member_count > 0 &&
            !((int)s->x == CASTLE_X && (int)s->y == CASTLE_Y))
            panel_putc(p, s->x, s->y, FONT(k, M), i + 'A');
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movw $0x41, %r15w
xorl %r12d, %r12d
movl $0x301, %r13d           # imm = 0x301
cmpb $0x1, 0x48(%r14,%r12)
jne 0x5d39
cmpb $0x0, 0x68(%r14,%r12)
movl $0x10001, %ecx          # imm = 0x10001
cmovnel %r13d, %ecx
movl %r15d, %eax
testb %bpl, %bpl
jne 0x5d1f
movzwl 0x5c(%r14,%r12), %eax
cvttss2si 0x4c(%r14,%r12), %esi
cvttss2si 0x50(%r14,%r12), %edx
movzwl %ax, %r8d
movq %rbx, %rdi
callq 0x31b0
incl %r15d
addq $0x28, %r12
cmpq $0x280, %r12            # imm = 0x280
jne 0x5cfa
movw $0x41, %bp
xorl %r15d, %r15d
movdqa 0x1c28(%rip), %xmm2     # 0x7980
cmpl $0x0, 0x2d4(%r14,%r15)
je 0x5da9
movsd 0x2c8(%r14,%r15), %xmm0
cvttps2dq %xmm0, %xmm0
pshufd $0x50, %xmm0, %xmm1     # xmm1 = xmm0[0,0,1,1]
pcmpeqd %xmm2, %xmm1
movmskpd %xmm1, %eax
cmpl $0x3, %eax
je 0x5da9
movd %xmm0, %esi
pshufd $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movd %xmm0, %edx
movzwl %bp, %r8d
movq %rbx, %rdi
movl $0x1000500, %ecx        # imm = 0x1000500
callq 0x31b0
movdqa 0x1bd7(%rip), %xmm2     # 0x7980
incl %ebp
addq $0x10, %r15
cmpq $0x100, %r15            # imm = 0x100
jne 0x5d58
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/game.c
// Function: invader_find_target
static void
invader_find_target(game_t *game, invader_t *i)
{
    int ix = i->x;
    int iy = i->y;
    int best_x = ix + rand_uniform(-INVADER_VISION, INVADER_VISION);
    int best_y = iy + rand_uniform(-INVADER_VISION, INVADER_VISION);
    float best_d = INFINITY;
    for (int y = -INVADER_VISION; y <= INVADER_VISION; y++) {
        for (int x = -INVADER_VISION; x <= INVADER_VISION; x++) {
            float xx = ix + x;
            float yy = iy + y;
            uint16_t building = map_building(game->map, xx, yy);
            if (building != C_NONE) {
                float d = xx * xx + yy * yy;
                if (d < best_d) {
                    best_x = xx;
                    best_y = yy;
                    best_d = d;
                }
            }
        }
    }
    i->tx = best_x;
    i->ty = best_y;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %r14
movq %rsi, 0x40(%rsp)
movsd 0x4(%rsi), %xmm0
cvttps2dq %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movss 0x1c0d(%rip), %xmm0     # 0x7a00
movss 0x1c01(%rip), %xmm1     # 0x79fc
callq 0x6073
movaps %xmm0, 0x20(%rsp)
cvtdq2ps 0x30(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
movss 0x1be9(%rip), %xmm0     # 0x7a00
movss 0x1bdd(%rip), %xmm1     # 0x79fc
callq 0x6073
movaps 0x20(%rsp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
addps 0x10(%rsp), %xmm1
cvttps2dq %xmm1, %xmm0
movaps %xmm0, 0x10(%rsp)
movdqa 0x30(%rsp), %xmm1
pshufd $0x55, %xmm1, %xmm0     # xmm0 = xmm1[1,1,1,1]
movd %xmm0, %eax
movq %rax, 0x48(%rsp)
movd %xmm1, %r13d
movl $0xfffffff6, %ebx       # imm = 0xFFFFFFF6
movd 0x1ba4(%rip), %xmm0     # 0x7a04
movd %xmm0, 0x20(%rsp)
movq 0x48(%rsp), %rax
addl %ebx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
cvttss2si %xmm0, %ebp
mulss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
movd %ebp, %xmm0
movdqa %xmm0, 0x50(%rsp)
movl $0xfffffff6, %r12d      # imm = 0xFFFFFFF6
leal (%r12,%r13), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movq 0x38(%r14), %rdi
movss %xmm0, 0x30(%rsp)
cvttss2si %xmm0, %r15d
movl %r15d, %esi
movl %ebp, %edx
callq 0x4ce1
testw %ax, %ax
je 0x5f15
movss 0x30(%rsp), %xmm2
mulss %xmm2, %xmm2
addss 0xc(%rsp), %xmm2
xorl %eax, %eax
movss 0x20(%rsp), %xmm0
ucomiss %xmm2, %xmm0
seta %al
minss %xmm0, %xmm2
movd %eax, %xmm0
pshufd $0x50, %xmm0, %xmm0     # xmm0 = xmm0[0,0,1,1]
pslld $0x1f, %xmm0
psrad $0x1f, %xmm0
movd %r15d, %xmm1
punpckldq 0x50(%rsp), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
pand %xmm0, %xmm1
pandn 0x10(%rsp), %xmm0
por %xmm1, %xmm0
movss %xmm2, 0x20(%rsp)
movdqa %xmm0, 0x10(%rsp)
incl %r12d
cmpl $0xb, %r12d
jne 0x5e92
incl %ebx
cmpl $0xb, %ebx
jne 0x5e66
cvtdq2ps 0x10(%rsp), %xmm0
movq 0x40(%rsp), %rax
movlps %xmm0, 0xc(%rax)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/rand.c
// Function: xorshift_fill
void
xorshift_fill(uint64_t *state, void *buffer, size_t size)
{
    char *p = buffer;
    while (size) {
        uint64_t entropy = xorshift(state);
        size_t amount = MIN(size, sizeof(entropy));
        memcpy(p, &entropy, amount);
        size -= amount;
        p += amount;
    }
}

// Assembly:
testq %rdx, %rdx
je 0x6003
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movabsq $0x2545f4914f6cdd1d, %rbp # imm = 0x2545F4914F6CDD1D
movq %rsp, %r12
movq (%r15), %rax
movq %rax, %rcx
shrq $0xc, %rcx
xorq %rax, %rcx
movq %rcx, %rax
shlq $0x19, %rax
xorq %rcx, %rax
movq %rax, %rcx
shrq $0x1b, %rcx
xorq %rax, %rcx
movq %rcx, (%r15)
imulq %rbp, %rcx
movq %rcx, (%rsp)
cmpq $0x8, %rbx
movl $0x8, %r13d
cmovbq %rbx, %r13
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1180
addq %r13, %r14
subq %r13, %rbx
jne 0x5fa5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/device_unix.c
// Function: device_init
void
device_init(void)
{
    printf("\e[2J");
    tcgetattr(STDIN_FILENO, &termios_orig);
    struct termios raw;
    memcpy(&raw, &termios_orig, sizeof(raw));
    raw.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
    raw.c_oflag &= ~OPOST;
    raw.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
    raw.c_cflag &= ~(CSIZE|PARENB);
    raw.c_cflag |= CS8;
    tcsetattr(STDIN_FILENO, TCSANOW, &raw);
    fputs("\e[?25l", stdout);
}

// Assembly:
subq $0x48, %rsp
leaq 0x1735(%rip), %rdi      # 0x7a7c
xorl %eax, %eax
callq 0x10c0
leaq 0xce9b(%rip), %rsi      # 0x131f0
xorl %edi, %edi
callq 0x11f0
movups 0xce8d(%rip), %xmm0     # 0x131f0
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movups 0xceac(%rip), %xmm0     # 0x1321c
movups %xmm0, 0x2c(%rdx)
movups 0xce95(%rip), %xmm0     # 0x13210
movaps %xmm0, 0x20(%rdx)
movups 0xce7a(%rip), %xmm0     # 0x13200
movaps %xmm0, 0x10(%rdx)
movabsq $-0x1000005ec, %rax     # imm = 0xFFFFFFFEFFFFFA14
andq %rax, (%rdx)
andl $0xffff7fb4, 0xc(%rdx)  # imm = 0xFFFF7FB4
movl $0xfffffecf, %eax       # imm = 0xFFFFFECF
andl 0x8(%rdx), %eax
orl $0x30, %eax
movl %eax, 0x8(%rdx)
xorl %edi, %edi
xorl %esi, %esi
callq 0x1200
movq 0x3c24(%rip), %rax      # 0x9fe0
movq (%rax), %rsi
leaq 0x16bb(%rip), %rdi      # 0x7a81
callq 0x10f0
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/device_unix.c
// Function: device_move
void
device_move(int x, int y)
{
    cursor_x = x;
    cursor_y = y;
    device_font_last = (font_t)FONT_INVALID;
    printf("\e[%d;%dH", y + 1, x + 1);
}

// Assembly:
movl %edi, 0xce38(%rip)      # 0x1322c
movl %esi, 0xce36(%rip)      # 0x13230
movl $0x101ffff, 0x645c(%rip) # imm = 0x101FFFF
incl %esi
leal 0x1(%rdi), %edx
leaq 0x1678(%rip), %rdi      # 0x7a88
xorl %eax, %eax
jmp 0x10c0
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/device_unix.c
// Function: device_cursor_get
void
device_cursor_get(int *x, int *y)
{
    if (x)
        *x = cursor_x;
    if (y)
        *y = cursor_y;
}

// Assembly:
testq %rdi, %rdi
je 0x6424
movl 0xce0a(%rip), %eax      # 0x1322c
movl %eax, (%rdi)
testq %rsi, %rsi
je 0x6431
movl 0xce01(%rip), %eax      # 0x13230
movl %eax, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/device_unix.c
// Function: device_putc
void
device_putc(font_t font, uint16_t c)
{
    uint8_t utf8[7];
    utf8[utf32_to_8(c, utf8)] = '\0';
    if (font_equal(device_font_last, font))
        fputs((char *)utf8, stdout);
    else
        printf("\e[%d;%dm%s",
               font.fore + 30 + (font.fore_bright ? 60 : 0),
               font.back + 40 + (font.back_bright ? 60 : 0),
               (char *)utf8);
    device_font_last = font;
    cursor_x++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movl %edi, %ebp
shrl $0x8, %ebp
cmpw $0x7f, %si
ja 0x644d
leaq 0x2(%rsp), %rax
jmp 0x648b
movzwl %si, %ecx
cmpl $0x7ff, %ecx            # imm = 0x7FF
ja 0x6467
leaq 0x3(%rsp), %rax
movl %esi, %ecx
shrl $0x6, %ecx
orb $-0x40, %cl
jmp 0x6480
leaq 0x4(%rsp), %rax
movl %ecx, %edx
shrl $0xc, %edx
orb $-0x20, %dl
movb %dl, -0x3(%rax)
shrl $0x6, %ecx
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, -0x2(%rax)
andb $0x3f, %sil
orb $-0x80, %sil
movb %sil, -0x1(%rax)
movl %ebx, %r14d
shrl $0x10, %r14d
movl %ebx, %r15d
shrl $0x18, %r15d
movb $0x0, (%rax)
movl 0x63ba(%rip), %edx      # 0xc860
movl %ebx, %edi
andl $0xffff0000, %edi       # imm = 0xFFFF0000
movl $0xff, %ecx
movl %ebp, %eax
andl %ecx, %eax
movl %eax, %esi
shll $0x8, %esi
orl %edi, %esi
andl %ebx, %ecx
orl %ecx, %esi
xorl %edx, %esi
testw %si, %si
je 0x6522
leal 0x3c(%rcx), %esi
testb $0x1, %r14b
cmovel %ecx, %esi
addl $0x1e, %esi
leal 0x3c(%rax), %edx
testb $0x1, %r15b
cmovel %eax, %edx
addl $0x28, %edx
leaq 0x15a7(%rip), %rdi      # 0x7a91
leaq 0x1(%rsp), %rcx
xorl %eax, %eax
callq 0x10c0
movb %bl, 0x6364(%rip)       # 0xc860
movb %bpl, 0x635e(%rip)      # 0xc861
movb %r14b, 0x6358(%rip)     # 0xc862
movb %r15b, 0x6352(%rip)     # 0xc863
incl 0xcd15(%rip)            # 0x1322c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
andl %ebx, %edx
btl $0x18, %edx
jae 0x64c9
andl $0x10000, %esi          # imm = 0x10000
jne 0x64c9
movq 0x3aa7(%rip), %rax      # 0x9fe0
movq (%rax), %rsi
leaq 0x1(%rsp), %rdi
callq 0x10f0
jmp 0x64f6
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/device_unix.c
// Function: device_getch
int
device_getch(void)
{
    int r;
    unsigned char c;
    if ((r = read(STDIN_FILENO, &c, sizeof(c))) < 0) {
        return r;
    } else if (c == '\e') {
        if (!device_kbhit(0))
            return c;
        unsigned char code[2];
        read(STDIN_FILENO, code, sizeof(code));
        return code[1] + 256;
    } else {
        if (c == 3) {
            /* SIGINT */
            device_free();
            exit(EXIT_FAILURE);
        }
        return c;
    }
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
xorl %edi, %edi
callq 0x1150
testl %eax, %eax
js 0x660c
movzbl 0xf(%rsp), %eax
cmpl $0x1b, %eax
je 0x659a
cmpl $0x3, %eax
jne 0x660c
callq 0x63d0
movl $0x1, %edi
callq 0x1240
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r8
movaps %xmm0, (%r8)
leaq 0x20(%rsp), %rsi
movups %xmm0, 0x68(%rsi)
movups %xmm0, 0x58(%rsi)
movups %xmm0, 0x48(%rsi)
movups %xmm0, 0x38(%rsi)
movups %xmm0, 0x28(%rsi)
movups %xmm0, 0x18(%rsi)
movups %xmm0, 0x8(%rsi)
movq $0x0, 0x78(%rsi)
movq $0x1, (%rsi)
movl $0x1, %edi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1190
testl %eax, %eax
jle 0x6607
leaq 0x20(%rsp), %rbx
movl $0x2, %edx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x1150
movzbl 0x1(%rbx), %eax
orl $0x100, %eax            # imm = 0x100
jmp 0x660c
movl $0x1b, %eax
addq $0xa0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/device_unix.c
// Function: device_kbhit
bool
device_kbhit(uint64_t useconds)
{
    struct timeval tv = {useconds / 1000000, useconds % 1000000};
    fd_set fds;
    FD_ZERO(&fds);
    FD_SET(STDIN_FILENO, &fds);
    return select(1, &fds, NULL, NULL, &tv) > 0;
}

// Assembly:
subq $0x98, %rsp
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
movq %rdi, %rax
mulq %rcx
shrq $0x12, %rdx
leaq 0x8(%rsp), %r8
movq %rdx, (%r8)
imulq $0xf4240, %rdx, %rax    # imm = 0xF4240
subq %rax, %rdi
movq %rdi, 0x8(%r8)
xorps %xmm0, %xmm0
leaq 0x18(%rsp), %rsi
movups %xmm0, 0x68(%rsi)
movups %xmm0, 0x58(%rsi)
movups %xmm0, 0x48(%rsi)
movups %xmm0, 0x38(%rsi)
movups %xmm0, 0x28(%rsi)
movups %xmm0, 0x18(%rsi)
movups %xmm0, 0x8(%rsi)
movq $0x0, 0x78(%rsi)
movq $0x1, (%rsi)
movl $0x1, %edi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1190
testl %eax, %eax
setg %al
addq $0x98, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/skeeto[P]goblin-com/src/device_unix.c
// Function: device_entropy
void
device_entropy(void *buffer, size_t size)
{
    FILE *in = fopen("/dev/urandom", "r");
    if (in == NULL || fread(buffer, size, 1, in) != 1) {
        /* Fallback */
        uint32_t pid = getpid();
        uint64_t state = device_uepoch() ^ (pid < 32);
        xorshift_fill(&state, buffer, size);
    }
    if (in)
        fclose(in);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x1383(%rip), %rdi      # 0x7aa4
leaq 0xcfb(%rip), %rsi       # 0x7423
callq 0x1210
movq %rax, %r14
testq %rax, %rax
je 0x674e
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x1080
cmpq $0x1, %rax
je 0x6791
callq 0x10a0
movl %eax, %ebp
movq %rsp, %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x10d0
imulq $0xf4240, (%r12), %rax  # imm = 0xF4240
addq 0x8(%r12), %rax
xorl %ecx, %ecx
cmpl $0x20, %ebp
setb %cl
xorq %rax, %rcx
movq %rcx, (%r12)
movq %rsp, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x5f7f
testq %r14, %r14
je 0x6799
movq %r14, %rdi
callq 0x10b0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/elmd1001v2/ref/aes_round_6.h
// Function: AES_set_encrypt_key_6
int AES_set_encrypt_key_6(const unsigned char *userKey, const int bits,
			AES_KEY *key) {

	u32 *rk;
   	int i = 0;
	u32 temp;

	if (!userKey || !key)
		return -1;
	if (bits != 128 )
		return -2;

	rk = key->rd_key;

	key->rounds = 6;
	
	rk[0] = GETU32(userKey     );
	rk[1] = GETU32(userKey +  4);
	rk[2] = GETU32(userKey +  8);
	rk[3] = GETU32(userKey + 12);
	while (1) {
		temp  = rk[3];
		rk[4] = rk[0] ^
			(Te2[(temp >> 16) & 0xff] & 0xff000000) ^
			(Te3[(temp >>  8) & 0xff] & 0x00ff0000) ^
			(Te0[(temp      ) & 0xff] & 0x0000ff00) ^
			(Te1[(temp >> 24)       ] & 0x000000ff) ^
			rcon[i];
		rk[5] = rk[1] ^ rk[4];
		rk[6] = rk[2] ^ rk[5];
		rk[7] = rk[3] ^ rk[6];
		if (++i == 6) {
			return 0;
		}
		rk += 4;
	}
	
	return 0;
}

// Assembly:
testq %rdi, %rdi
sete %cl
testq %rdx, %rdx
sete %r8b
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
orb %cl, %r8b
jne 0x1283
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmpl $0x80, %esi
jne 0x1283
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movl $0x6, 0xf0(%rdx)
movl (%rdi), %ebx
movbel %ebx, (%rdx)
movl 0x4(%rdi), %eax
movbel %eax, 0x4(%rdx)
bswapl %ebx
movl 0x8(%rdi), %eax
movbel %eax, 0x8(%rdx)
movl 0xc(%rdi), %eax
movbel %eax, 0xc(%rdx)
xorl %eax, %eax
leaq 0x2e4f(%rip), %rcx      # 0x4020
movl $0xff, %esi
leaq 0x3243(%rip), %rdi      # 0x4420
leaq 0x363c(%rip), %r8       # 0x4820
leaq 0x3a35(%rip), %r9       # 0x4c20
leaq 0x3e2e(%rip), %r10      # 0x5020
xorl %r11d, %r11d
movl 0xc(%rdx,%r11,4), %ebp
movl %ebp, %r14d
shrl $0xe, %r14d
andl $0x3fc, %r14d           # imm = 0x3FC
movzbl 0x3(%r14,%rcx), %r14d
shll $0x18, %r14d
xorl %ebx, %r14d
movl %ebp, %ebx
shrl $0x8, %ebx
andl %esi, %ebx
movzbl 0x2(%rdi,%rbx,4), %ebx
shll $0x10, %ebx
movl %ebp, %r15d
andl %esi, %r15d
movzbl 0x1(%r8,%r15,4), %r15d
shll $0x8, %r15d
xorl %ebx, %r15d
xorl %r14d, %r15d
movl %ebp, %ebx
shrl $0x18, %ebx
movzbl (%r9,%rbx,4), %ebx
xorl %r15d, %ebx
xorl (%r11,%r10), %ebx
movl %ebx, 0x10(%rdx,%r11,4)
movl 0x4(%rdx,%r11,4), %r14d
xorl %ebx, %r14d
movl %r14d, 0x14(%rdx,%r11,4)
xorl 0x8(%rdx,%r11,4), %r14d
movl %r14d, 0x18(%rdx,%r11,4)
xorl %ebp, %r14d
movl %r14d, 0x1c(%rdx,%r11,4)
addq $0x4, %r11
cmpq $0x18, %r11
jne 0x11f5
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/elmd1001v2/ref/module.h
// Function: mult_3
static void mult_2(block b, block s) {int i; block d; unsigned char temp = s[0]>>7;
   	for (i=0; i<15; i++)	{d[i] = (s[i] << 1) | (s[i+1] >> 7);}
 	d[15] = (s[15] << 1); if(temp==1){d[15] ^= alpha_128;} 
	copy_block(b,d);}

// Assembly:
movb (%rsi), %al
vmovd %eax, %xmm0
movw $0x7fff, %cx            # imm = 0x7FFF
kmovd %ecx, %k1
vmovdqu8 0x1(%rsi), %xmm1 {%k1} {z}
vpbroadcastb %xmm0, %xmm0
vpalignr $0xf, %xmm0, %xmm1, %xmm0 # xmm0 = xmm0[15],xmm1[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]
vpaddw %xmm0, %xmm0, %xmm0
vpsrlw $0x7, %xmm1, %xmm1
vpternlogd $0xd8, 0x1a56(%rip){1to4}, %xmm0, %xmm1 # 0x4010
vmovdqu8 %xmm1, -0x18(%rsp) {%k1}
movb 0xf(%rsi), %cl
addb %cl, %cl
movzbl %cl, %edx
xorb $-0x79, %cl
testb %al, %al
movzbl %cl, %eax
cmovnsl %edx, %eax
movb %al, -0x9(%rsp)
vmovups (%rsi), %xmm0
vxorps -0x18(%rsp), %xmm0, %xmm0
vmovaps %xmm0, -0x18(%rsp)
vmovups %xmm0, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/elmd1001v2/ref/encrypt.c
// Function: process_AD
static void process_AD(
	block W, block Delta_1, const block npub, block param, 
	const u8 *ad, u64 adlen) {	

	block Delta_2, blk, result;
	u8 Is_complete = 1, ozs[16];
	int i; for(i=1; i<16; i++){ozs[i]=0x00;} ozs[0] = 0x80; 

	

	/* ===== make the first block blk based on npub and param ===== */
	load_block(blk, npub, param, 8, 8);
	
	while(1){ 
		
		/* ============= Process the current Block ==================== */
		process_block(Delta_1, Delta_2, result, blk, W, Is_complete, ENCRYPT, 0, AD);
				
		/* === Compute the next Block and updating the pointers and counters ===*/
		if(adlen==0) break; 
		
		else if(adlen <= 16) {
			load_block(blk, ad, ozs, adlen, 16-adlen); 
			if(adlen != 16) Is_complete = 0;
			adlen = 0; 
		}

		else {load_block(blk, ad, ozs, 16, 0); ad +=16; adlen -=16;}
	}

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %r15
movq %r8, %r12
movq %rsi, %r9
movq %rdi, %r8
xorl %ebp, %ebp
movq %rbp, 0x18(%rsp)
movq %rbp, 0x11(%rsp)
movb $-0x80, 0x10(%rsp)
movq (%rdx), %rdx
leaq 0x20(%rsp), %rax
movq %rdx, (%rax)
movq (%rcx), %rcx
movq %rcx, 0x8(%rax)
subq $0x8, %rsp
leaq 0x48(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %r9, 0x10(%rsp)
movq %r9, %rdi
movq %rax, %rcx
movq %r8, %r14
movl $0x1, %r9d
pushq %rbp
pushq %rbp
pushq $0x1
callq 0x2811
addq $0x20, %rsp
testq %r15, %r15
je 0x27a2
xorl %ebx, %ebx
xorl %r13d, %r13d
leaq (%r15,%rbx), %rax
cmpq $0x11, %rax
jb 0x2738
vmovups (%r12,%r13), %xmm0
vmovaps %xmm0, 0x20(%rsp)
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
leaq 0x48(%rsp), %rsi
leaq 0x38(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %r14, %r8
movl $0x1, %r9d
pushq %rbp
pushq %rbp
pushq $0x1
callq 0x2811
addq $0x20, %rsp
addq $0x10, %r13
addq $-0x10, %rbx
cmpq %r13, %r15
jne 0x26e5
jmp 0x27a2
movl %r15d, %ecx
subl %r13d, %ecx
movb $0x10, %al
subb %r15b, %al
movzbl %al, %r8d
addl %r13d, %r8d
addq %r13, %r12
movl $0xff, %eax
andl %eax, %ecx
andl %eax, %r8d
leaq 0x20(%rsp), %rbp
leaq 0x10(%rsp), %rdx
movq %rbp, %rdi
movq %r12, %rsi
callq 0x27b1
addq $-0x10, %r15
xorl %r9d, %r9d
cmpq %r13, %r15
sete %r9b
subq $0x8, %rsp
xorl %eax, %eax
leaq 0x48(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq 0x10(%rsp), %rdi
movq %rbp, %rcx
movq %r14, %r8
pushq %rax
pushq %rax
pushq $0x1
callq 0x2811
addq $0x20, %rsp
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ikbenlike[P]nngutils/src/sh.c
// Function: hashmap_standalone_hash
size_t hashmap_standalone_hash(char *inp){
    size_t output = 0;
    size_t i = 0;
    size_t l = strlen(inp);
    while((i + 1) <= l){
        output = output*17 + inp[i++];
    }
    return output;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1090
testq %rax, %rax
je 0x1412
incq %rax
cmpq $0x3, %rax
movl $0x2, %ecx
cmovaeq %rax, %rcx
decq %rcx
xorl %edx, %edx
xorl %eax, %eax
movq %rax, %rsi
shlq $0x4, %rsi
addq %rax, %rsi
movsbq (%rbx,%rdx), %rax
addq %rsi, %rax
incq %rdx
cmpq %rdx, %rcx
jne 0x13f6
jmp 0x1414
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ikbenlike[P]nngutils/src/sh.c
// Function: hashmap_hash
size_t hashmap_hash(hashmap_t *hm, char *inp){
    size_t output = 0;
    size_t i = 0;
    size_t l = strlen(inp);
    while((i + 1) <= l){
        output = output*17 + inp[i++];
    }
    return output % hm->size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x1090
testq %rax, %rax
je 0x1468
incq %rax
cmpq $0x3, %rax
movl $0x2, %ecx
cmovaeq %rax, %rcx
decq %rcx
xorl %edx, %edx
xorl %eax, %eax
movq %rax, %rsi
shlq $0x4, %rsi
addq %rax, %rsi
movsbq (%r14,%rdx), %rax
addq %rsi, %rax
incq %rdx
cmpq %rdx, %rcx
jne 0x144c
jmp 0x146a
xorl %eax, %eax
xorl %edx, %edx
divq (%rbx)
movq %rdx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ikbenlike[P]nngutils/src/sh.c
// Function: hashmap_free
int hashmap_free(hashmap_t *hm){
    for(int i = 0; i < hm->size; i++){
        free(hm->map[i].list);
    }
    free(hm->map);
    free(hm);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x1524
movl $0x10, %r14d
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq (%rax,%r14), %rdi
callq 0x1040
incq %r15
addq $0x18, %r14
cmpq %r15, (%rbx)
ja 0x150b
movq 0x8(%rbx), %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x1040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ikbenlike[P]nngutils/src/sh.c
// Function: hashmap_set
int hashmap_set(hashmap_t *hm, char *name, char *command){
    size_t c = hashmap_standalone_hash(name);
    size_t n = hashmap_hash(hm, name);
    hm->map[n].list[hm->map[n].cursor].id = c;
    hm->map[n].list[hm->map[n].cursor].name = name;
    hm->map[n].list[hm->map[n].cursor++].command = command;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x13cc
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x141b
movq 0x8(%r15), %rcx
leaq (%rax,%rax,2), %rax
movq 0x8(%rcx,%rax,8), %rdx
movq 0x10(%rcx,%rax,8), %rsi
leaq (%rdx,%rdx,2), %rdi
movq %r12, (%rsi,%rdi,8)
movq %r14, 0x8(%rsi,%rdi,8)
incq %rdx
movq %rdx, 0x8(%rcx,%rax,8)
movq %rbx, 0x10(%rsi,%rdi,8)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ikbenlike[P]nngutils/src/sh.c
// Function: hashmap_item_exists
ssize_t hashmap_item_exists(hashmap_t *hm, char *inp){
    size_t c = hashmap_standalone_hash(inp);
    size_t n = hashmap_hash(hm, inp);
    hashmap_vector_t a = hm->map[n];
    for(size_t i = 0; i < a.len; i++){
        if(a.list[i].id == c){
            return i;
        }
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x13cc
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x141b
movq 0x8(%r15), %rdx
leaq (%rax,%rax,2), %rsi
movq (%rdx,%rsi,8), %rcx
movq $-0x1, %rax
testq %rcx, %rcx
je 0x15fe
movq 0x10(%rdx,%rsi,8), %rsi
xorl %edx, %edx
cmpq %rbx, (%rsi)
je 0x15fb
incq %rdx
addq $0x18, %rsi
cmpq %rdx, %rcx
jne 0x15e8
jmp 0x15fe
movq %rdx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ikbenlike[P]nngutils/src/sh.c
// Function: hashmap_get
struct sh_alias *hashmap_get(hashmap_t *hm, char *name){
    if(hashmap_item_exists(hm, name) != -1){
        size_t id = hashmap_standalone_hash(name);
        hashmap_vector_t v = hm->map[hashmap_hash(hm, name)];
        for(size_t i = 0; i < v.len; i++){
            if(v.list[i].id == id){
                return &v.list[i];
            }
        }
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x15a3
cmpq $-0x1, %rax
je 0x165f
movq %r14, %rdi
callq 0x13cc
movq %rax, %rbx
movq 0x8(%r15), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x141b
leaq (%rax,%rax,2), %rax
movq (%r12,%rax,8), %rcx
testq %rcx, %rcx
je 0x165f
movq 0x10(%r12,%rax,8), %rax
cmpq %rbx, (%rax)
je 0x1661
addq $0x18, %rax
decq %rcx
jne 0x1651
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ikbenlike[P]nngutils/src/sh.c
// Function: parse_arg
struct sh_args *parse_arg(struct sh_args *args, int argc, char **argv){
    for(int i = 1; i < argc; i++){
        if(argv[i][0] == '-'){
            if(!strcmp(argv[i], "-c")){
                args->has_command = true;
                if(i + 1 < argc){
                    args->command = argv[++i];
                }
                else {
                    fprintf(stderr, "%s: -c option requires an argument\n", argv[i]);
                }
            }
            else if(!strcmp(argv[i], "-s")){
                args->standard_input = true;
            }
            else if(!strcmp(argv[i], "-i")){
                args->interactive = true;
            }
        }
        else {
            fprintf(stderr, "%s: invalid argument %s\n", argv[0], argv[i]);
        }
    }
    return args;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpl $0x2, %esi
jl 0x1776
movq %rdx, %rbx
movl %esi, %r15d
movl $0x1, %r13d
movq 0x2915(%rip), %r12      # 0x3ff8
movslq %r13d, %rax
movq (%rbx,%rax,8), %rcx
cmpb $0x2d, (%rcx)
jne 0x173b
cmpb $0x63, 0x1(%rcx)
jne 0x16fb
cmpb $0x0, 0x2(%rcx)
je 0x1719
cmpb $0x73, 0x1(%rcx)
jne 0x1707
cmpb $0x0, 0x2(%rcx)
je 0x1734
cmpb $0x69, 0x1(%rcx)
jne 0x1750
cmpb $0x0, 0x2(%rcx)
jne 0x1750
movb $0x1, (%r14)
jmp 0x1750
movb $0x1, 0x2(%r14)
leal 0x1(%r13), %eax
cmpl %r15d, %eax
jge 0x175f
movslq %eax, %rcx
movq (%rbx,%rcx,8), %rcx
movq %rcx, 0x8(%r14)
jmp 0x1753
movb $0x1, 0x1(%r14)
jmp 0x1750
movq (%r12), %rdi
movq (%rbx), %rdx
leaq 0x8f0(%rip), %rsi       # 0x2039
xorl %eax, %eax
callq 0x1110
movl %r13d, %eax
incl %eax
movl %eax, %r13d
cmpl %r15d, %eax
jl 0x16e3
jmp 0x1776
movq (%r12), %rdi
leaq 0x8ab(%rip), %rsi       # 0x2015
movq %rcx, %rdx
xorl %eax, %eax
callq 0x1110
jmp 0x1750
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ikbenlike[P]nngutils/src/sh.c
// Function: command_get_argc
int command_get_argc(char *buffer){
    int n = 0;
    char *p;
    while(p = strchr(buffer, ' ')){
        n++;
        buffer = p + 1;
    }
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x20, %esi
callq 0x10b0
xorl %ebx, %ebx
testq %rax, %rax
je 0x17b3
incl %ebx
incq %rax
movq %rax, %rdi
movl $0x20, %esi
callq 0x10b0
jmp 0x179a
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ikbenlike[P]nngutils/src/sh.c
// Function: parse_command
struct sh_command *parse_command(char *buffer, size_t len){
    struct sh_command *command = calloc(1, sizeof(struct sh_command));
    command->argc = command_get_argc(buffer) + 1;
    command->argv = calloc(command->argc + 1, sizeof(char*));
    char *token = calloc(len + 2, sizeof(char));
    for(int i = 0, n = 0; i < command->argc && n < len; i++ && n++){
        int x = 0;
        while(buffer[n] != ' ' && buffer[n] != EOF && buffer[n] != '\0'){
            token[x++] = buffer[n++];
        }
        if(i < 1){
            n++;
        }
        token[x++] = '\0';
        command->argv[i] = calloc(x, sizeof(char));
        memcpy(command->argv[i], token, x);
    }
    command->argv[command->argc] = NULL;
    free(token);
    return command;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %edi
movl $0x18, %esi
callq 0x10e0
movq %rax, %r15
movq %r14, -0x60(%rbp)
movq %r14, %rdi
callq 0x1788
movl %eax, %r14d
leal 0x1(%r14), %eax
movl %eax, -0x30(%rbp)
movl %eax, 0x10(%r15)
leal 0x2(%r14), %eax
movslq %eax, %rdi
movl $0x8, %esi
callq 0x10e0
movq %r15, -0x48(%rbp)
movq %rax, -0x38(%rbp)
movq %rax, 0x8(%r15)
leaq 0x2(%rbx), %rdi
movl $0x1, %esi
callq 0x10e0
movq %rax, %r13
testl %r14d, %r14d
sets %al
movq %rbx, -0x58(%rbp)
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x18f6
movl %r14d, %eax
movq %rax, -0x50(%rbp)
xorl %edx, %edx
xorl %r12d, %r12d
movslq %r12d, %rax
addq -0x60(%rbp), %rax
xorl %r15d, %r15d
movzbl (%rax,%r15), %ecx
testl %ecx, %ecx
je 0x187b
cmpl $0x20, %ecx
je 0x187b
cmpl $0xff, %ecx
je 0x187b
movb %cl, (%r13,%r15)
incq %r15
jmp 0x185b
xorl %r14d, %r14d
xorl %ebx, %ebx
testq %rdx, %rdx
setne -0x2a(%rbp)
sete -0x29(%rbp)
movl %r15d, %eax
leal 0x1(%r15), %edi
movq %rdi, -0x68(%rbp)
movb $0x0, (%r13,%rax)
movl $0x1, %esi
movq %rdx, -0x40(%rbp)
callq 0x10e0
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rdx
movq %rax, (%rcx,%rdx,8)
movq %rax, %rdi
movq %r13, %rsi
movq -0x68(%rbp), %rdx
callq 0x1130
movq -0x40(%rbp), %rdx
cmpq -0x50(%rbp), %rdx
jae 0x18f6
movb -0x29(%rbp), %al
movb %al, %bl
incq %rdx
movb -0x2a(%rbp), %al
movb %al, %r14b
addl %ebx, %r14d
movl %r12d, %r12d
addq %r15, %r12
addq %r14, %r12
movslq %r12d, %rax
cmpq -0x58(%rbp), %rax
jb 0x1851
movslq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movq $0x0, (%rcx,%rax,8)
movq %r13, %rdi
callq 0x1040
movq -0x48(%rbp), %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ikbenlike[P]nngutils/src/sh.c
// Function: sh_is_builtin
int sh_is_builtin(char *command){
    if(!strcmp(command, "exit")){
        return shb_exit;
    }
    else if(!strcmp(command, "cd")){
        return shb_cd;
    }
    else if(!strcmp(command, "alias")){
        puts("alias");
        return shb_alias;
    }
    else if(!strcmp(command, "unalias")){
        return shb_unalias;
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x6df(%rip), %rsi       # 0x2010
callq 0x10f0
testl %eax, %eax
je 0x197a
cmpb $0x63, (%rbx)
jne 0x194b
cmpb $0x64, 0x1(%rbx)
jne 0x194b
cmpb $0x0, 0x2(%rbx)
je 0x1991
leaq 0x702(%rip), %rsi       # 0x2054
movq %rbx, %rdi
callq 0x10f0
testl %eax, %eax
je 0x197e
leaq 0x6ed(%rip), %rsi       # 0x2052
movq %rbx, %rdi
callq 0x10f0
movl %eax, %ecx
xorl %eax, %eax
negl %ecx
sbbl %eax, %eax
orl $0x2, %eax
jmp 0x1996
xorl %eax, %eax
jmp 0x1996
leaq 0x6cf(%rip), %rdi       # 0x2054
callq 0x1070
movl $0x1, %eax
jmp 0x1996
movl $0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ikbenlike[P]nngutils/src/sh.c
// Function: sh_cd
int sh_cd(char *path){
    if(!path){
        char *res = getenv("HOME");
        if(res){
            path = res;
        }
        else {
            return 0;
        }
    }
    int cd_res = chdir(path);
    if(cd_res == -1){
        fprintf(stderr, "cd: %s: %s\n", strerror(errno), path);
        return errno;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x1b88
leaq 0x517(%rip), %rdi       # 0x2092
callq 0x1030
movq %rax, %rbx
testq %rax, %rax
je 0x1b95
movq %rbx, %rdi
callq 0x10a0
cmpl $-0x1, %eax
je 0x1ba2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x244f(%rip), %rax      # 0x3ff8
movq (%rax), %r14
callq 0x1050
movq %rax, %r15
movl (%rax), %edi
callq 0x1170
leaq 0x4d5(%rip), %rsi       # 0x2097
movq %r14, %rdi
movq %rax, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1110
movl (%r15), %eax
jmp 0x1b97
// File: /workspace/github_c_makefile_star2_O3/ikbenlike[P]nngutils/src/sh.c
// Function: run_builtin
int run_builtin(enum sh_builtins code, struct sh_command *command){
    if(code == shb_exit){
        if(command->argc == 2){
            char **end;
            int ret = (int)strtol(command->argv[1], end, 10);
            if(end[0][0] == command->argv[1][0]){
                fprintf(stderr, "sh: exit: %s: numeric argument required\n", command->argv[1]);
                sh_exit(2);
            }
            sh_exit(ret);
        }
        sh_exit(0);
    }
    else if(code == shb_cd){
        return sh_cd(command->argv[1]);
    }
    else if(code == shb_alias){
        if(command->argc == 2){
            return sh_add_alias(command->argv[1]);
        }
        else {
            puts("else");
            return 1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
xorl %r14d, %r14d
cmpl $0x1, %edi
je 0x1c30
cmpl $0x3, %edi
je 0x1c1f
testl %edi, %edi
jne 0x1c57
cmpl $0x2, 0x10(%rbx)
jne 0x1c5f
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
movl $0xa, %edx
callq 0x1120
movq %rax, %r14
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
cmpb $0x0, (%rdi)
jne 0x1c72
callq 0x11a0
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1b62
cmpl $0x2, 0x10(%rbx)
jne 0x1c45
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x199d
jmp 0x1c57
leaq 0x480(%rip), %rdi       # 0x20cc
callq 0x1070
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3aa(%rip), %rdi       # 0x2010
callq 0x1070
xorl %edi, %edi
callq 0x1160
leaq 0x397(%rip), %rdi       # 0x2010
callq 0x1070
movl %r14d, %edi
callq 0x1160
// File: /workspace/github_c_makefile_star2_O3/ikbenlike[P]nngutils/src/sh.c
// Function: call_command
int call_command(struct sh_command *command){
    int status = 0;
    int builtin = sh_is_builtin(command->argv[0]);
    if(builtin != -1){
        status = run_builtin(builtin, command);
        return status;
    }
    pid_t pid = fork();
    if(pid == -1){
        fprintf(stderr, "sh: %s\n", strerror(errno));
        return 1;
    }
    else if(pid){
        waitpid(pid, &status, 0);
        if(WIFEXITED(status)){
            status = WEXITSTATUS(status);
        }
    }
    else {
        if(execvp(command->argv[0], command->argv) == -1){
            fprintf(stderr, "sh: %s: %s\n", command->argv[0], strerror(errno));
            for(int i = -1; command->argv[++i] != NULL; free(command->argv[i]));
            free(command->argv);
            free(command);
            exit(1);
        }
    }
    return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x0, -0x14(%rbp)
movq 0x8(%rdi), %rax
movq (%rax), %rdi
callq 0x1921
cmpl $-0x1, %eax
je 0x1cbe
movl %eax, %edi
movq %rbx, %rsi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x1bd7
callq 0x1180
testl %eax, %eax
je 0x1ce7
cmpl $-0x1, %eax
je 0x1d08
leaq -0x14(%rbp), %rbx
movl %eax, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1140
movl (%rbx), %eax
testb $0x7f, %al
jne 0x1cff
movzbl %ah, %eax
jmp 0x1cff
leaq 0x8(%rbx), %r14
movq (%r14), %rsi
movq (%rsi), %rdi
callq 0x1150
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
je 0x1d14
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x1253
movl $0x1, %eax
jmp 0x1cff
movq %r14, %rdi
movq %rbx, %rsi
callq 0x11d3
// File: /workspace/github_c_makefile_star2_O3/ikbenlike[P]nngutils/src/sh.c
// Function: main
int main(int argc, char **argv){
    signal(SIGINT, sigint_handler);
    alias_hashmap = hashmap_init(100);
    struct sh_command *command = NULL;
    if(argc > 1){
        struct sh_args *args = calloc(1, sizeof(struct sh_args));
        if(args == NULL){
            fprintf(stderr, "%s: %s\n", argv[0], strerror(errno));
        }
        args = parse_arg(args, argc, argv);
        if(args->command){
            command = parse_command(args->command, strlen(args->command));
            call_command(command);
            free(command);
            return 0;
        }
    }
    char *buffer = calloc(4096, sizeof(char));
    while(1){
        write(STDOUT_FILENO, SH_PROMPT, strlen(SH_PROMPT));
        ssize_t n = 0;
        n += read(STDIN_FILENO, buffer, 4096);
        if(n == 0){
            sh_exit(0);
        }
        else if(n == 1){
            continue;
        }
        buffer[n-1] = '\0';
        command = parse_command(buffer, n);
        call_command(command);
        free(command);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
leaq -0x6cc(%rip), %rsi      # 0x166a
movl $0x2, %edi
callq 0x1100
movl $0x64, %edi
callq 0x1477
movq %rax, 0x238f(%rip)      # 0x40e0
cmpl $0x2, %r14d
jl 0x1dbc
movl $0x1, %edi
movl $0x10, %esi
callq 0x10e0
testq %rax, %rax
je 0x1e39
movq %rax, %r15
movq %rax, %rdi
movl %r14d, %esi
movq %rbx, %rdx
callq 0x16b6
movq 0x8(%r15), %rbx
testq %rbx, %rbx
je 0x1dbc
movq %rbx, %rdi
callq 0x1090
movq %rbx, %rdi
movq %rax, %rsi
callq 0x17bc
movq %rax, %rbx
movq %rax, %rdi
callq 0x1c86
movq %rbx, %rdi
callq 0x1040
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x1000, %edi           # imm = 0x1000
movl $0x1, %esi
callq 0x10e0
movq %rax, %rbx
leaq 0x22f(%rip), %r14       # 0x2004
movl $0xb, %edx
movl $0x1, %edi
movq %r14, %rsi
callq 0x1080
movl $0x1000, %edx           # imm = 0x1000
xorl %edi, %edi
movq %rbx, %rsi
callq 0x10d0
cmpq $0x1, %rax
je 0x1dd5
testq %rax, %rax
je 0x1e26
movb $0x0, -0x1(%rbx,%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x17bc
movq %rax, %r15
movq %rax, %rdi
callq 0x1c86
movq %r15, %rdi
callq 0x1040
jmp 0x1dd5
leaq 0x1e3(%rip), %rdi       # 0x2010
callq 0x1070
xorl %edi, %edi
callq 0x1160
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1289
// File: /workspace/github_c_makefile_star2_O3/cktan[P]tomlc99/toml_cat.c
// Function: main
int main(int argc, const char *argv[]) {
  int i;
  if (argc == 1) {
    cat(stdin);
  } else {
    for (i = 1; i < argc; i++) {

      FILE *fp = fopen(argv[i], "r");
      if (!fp) {
        fprintf(stderr, "ERROR: cannot open %s: %s\n", argv[i],
                strerror(errno));
        exit(1);
      }
      cat(fp);
      fclose(fp);
    }
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x1, %edi
jne 0x13cb
movq 0x7c17(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
callq 0x1423
jmp 0x140c
jle 0x140c
movq %rsi, %rbx
movl %edi, %r13d
movl $0x1, %r14d
leaq 0x4d07(%rip), %r15      # 0x60e7
movq (%rbx,%r14,8), %rdi
movq %r15, %rsi
callq 0x11a0
testq %rax, %rax
je 0x1418
movq %rax, %r12
movq %rax, %rdi
callq 0x1423
movq %r12, %rdi
callq 0x10a0
incq %r14
cmpq %r14, %r13
jne 0x13e0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1210
// File: /workspace/github_c_makefile_star2_O3/cktan[P]tomlc99/toml_cat.c
// Function: cat
static void cat(FILE *fp) {
  char errbuf[200];

  toml_table_t *tab = toml_parse_file(fp, errbuf, sizeof(errbuf));
  if (!tab) {
    fprintf(stderr, "ERROR: %s\n", errbuf);
    return;
  }

  stack[stacktop].tab = tab;
  stack[stacktop].key = "";
  stacktop++;
  printf("{\n");
  indent++;
  print_table(tab);
  indent--;
  printf("}\n");
  stacktop--;

  toml_free(tab);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rsp, %rsi
movl $0xc8, %edx
callq 0x3328
testq %rax, %rax
je 0x14ae
movq %rax, %rbx
movslq 0x7ce9(%rip), %rax      # 0x9130
leal 0x1(%rax), %ecx
shlq $0x4, %rax
leaq 0x7ceb(%rip), %rdx      # 0x9140
movq %rbx, 0x8(%rax,%rdx)
leaq 0x520e(%rip), %rsi      # 0x666f
movq %rsi, (%rax,%rdx)
movl %ecx, 0x7cc5(%rip)      # 0x9130
leaq 0x4cad(%rip), %rdi      # 0x611f
callq 0x1060
incl 0x7cb7(%rip)            # 0x9134
movq %rbx, %rdi
callq 0x14cb
decl 0x7ca9(%rip)            # 0x9134
leaq 0x4c8b(%rip), %rdi      # 0x611d
callq 0x1060
decl 0x7c93(%rip)            # 0x9130
movq %rbx, %rdi
callq 0x3323
addq $0xd0, %rsp
popq %rbx
retq
movq 0x7b43(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
leaq 0x4b78(%rip), %rsi      # 0x6037
movq %rsp, %rdx
xorl %eax, %eax
callq 0x1160
jmp 0x14a5