LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/commands.c
// Function: cmd_inv
void cmd_inv (int pindex, struct Message * msg) {
    char *out, action[12];
    CALLEXIT(!(out = malloc(MAX_MESSAGE_BUFFER)))

    if (matches_regex(msg->message, CMD_LIT" fav (\\d+)")) {
        is_favorite(pindex, atoi(regex_group[1])) ? strcpy(action, "unfavorited") : strcpy(action, "favorited");
        favorite_toggle(pindex, atoi(regex_group[1]));
        snprintf(out, MAX_MESSAGE_BUFFER, "PRIVMSG %s :%s, you have %s %s\r\n",
                dawn->active_room, msg->sender_nick, action, dawn->players[pindex].inventory[atoi(regex_group[1])].name);
        add_msg(out, strlen(out));
        free(out);
    } else {
        print_inventory(msg);
    }
    free(out);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movl %edi, %ebp
movl $0x190, %edi            # imm = 0x190
callq 0x22b0
testq %rax, %rax
je 0x637d
movq %rax, %rbx
leaq 0x100(%r14), %rdi
leaq 0xd1db(%rip), %rsi      # 0x13446
callq 0xd3aa
testl %eax, %eax
je 0x62ab
movl $0x190, %edi            # imm = 0x190
addq 0x18d60(%rip), %rdi     # 0x1efe0
callq 0x2360
movl %ebp, %edi
movl %eax, %esi
callq 0x7b6d
testl %eax, %eax
je 0x62b8
movabsq $0x69726f7661666e75, %rax # imm = 0x69726F7661666E75
movq %rax, 0x8(%rsp)
movl $0x646574, 0x10(%rsp)   # imm = 0x646574
jmp 0x62ce
movq %r14, %rdi
callq 0x7bc2
jmp 0x6366
movabsq $0x657469726f766166, %rax # imm = 0x657469726F766166
movq %rax, 0x8(%rsp)
movw $0x64, 0x10(%rsp)
movl $0x190, %eax            # imm = 0x190
leaq 0x1a006(%rip), %r15     # 0x202e0
addq %rax, %r15
movq %r15, %rdi
callq 0x2360
movl %ebp, %edi
movl %eax, %esi
callq 0x7b46
leaq 0x1b78b(%rip), %rax     # 0x21a80
movq (%rax), %rax
leaq 0x100(%rax), %r12
movslq %ebp, %rcx
imulq $0x26a8, %rcx, %r13     # imm = 0x26A8
addq %rax, %r13
movq %r15, %rdi
callq 0x2360
cltq
imulq $0x9c, %rax, %rax
addq %r13, %rax
addq $0x330, %rax            # imm = 0x330
movq %rax, (%rsp)
leaq 0xd136(%rip), %rdx      # 0x13467
leaq 0x8(%rsp), %r9
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
movq %r12, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x2390
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcefe
movq %rbx, %rdi
callq 0x2240
movq %rbx, %rdi
callq 0x2240
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x278f
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/commands.c
// Function: cmd_make
void cmd_make(int pindex, struct Message * msg) {
    char * out;
    CALLEXIT(!(out = malloc(MAX_MESSAGE_BUFFER)))
    if (matches_regex(msg->message, CMD_LIT" snow angels")) {
        if (dawn->weather == SNOWING) {
            int yeti_chance = rand() % 100;
            if (yeti_chance >= 75) {
                snprintf(out, MAX_MESSAGE_BUFFER, "PRIVMSG %s :%s falls to the ground and begins making snow angels!"
                        " Unfortunately, they were mauled by a yeti in the process. -25 HP\r\n", msg->receiver,
                        msg->sender_nick);
                dawn->players[pindex].health -= 25;
                add_msg(out, strlen(out));
                check_alive(msg);
                return;
            }
            snprintf(out, MAX_MESSAGE_BUFFER, "PRIVMSG %s :%s falls to the ground and begins making snow angels!\r\n",
                    msg->receiver, msg->sender_nick);
            add_msg(out, strlen(out));
        } else {
            snprintf(out, MAX_MESSAGE_BUFFER, "PRIVMSG %s :There is no snow\r\n", msg->receiver);
            add_msg(out, strlen(out));
        }
    }
    free(out);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebp
movl $0x190, %edi            # imm = 0x190
callq 0x22b0
testq %rax, %rax
je 0x64c3
movq %rax, %rbx
leaq 0x100(%r14), %rdi
leaq 0xc9ae(%rip), %rsi      # 0x12d71
callq 0xd3aa
testl %eax, %eax
je 0x645d
leaq 0x1b6a9(%rip), %r15     # 0x21a80
movq (%r15), %rax
cmpl $0x2, 0x14c(%rax)
jne 0x642a
callq 0x2080
cltq
imulq $0x51eb851f, %rax, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
imull $0x64, %ecx, %ecx
subl %ecx, %eax
leaq 0xc0(%r14), %rcx
cmpl $0x4a, %eax
jg 0x646f
leaq 0xc9f7(%rip), %rdx      # 0x12e0d
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
movq %r14, %r8
xorl %eax, %eax
callq 0x2390
jmp 0x644a
addq $0xc0, %r14
leaq 0xca19(%rip), %rdx      # 0x12e51
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2390
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcefe
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2240
leaq 0xc912(%rip), %rdx      # 0x12d88
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
movq %r14, %r8
xorl %eax, %eax
callq 0x2390
movq (%r15), %rax
movslq %ebp, %rcx
imulq $0x26a8, %rcx, %rcx     # imm = 0x26A8
addq $-0x19, 0x27f0(%rax,%rcx)
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcefe
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x45bc
callq 0x27a4
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/commands.c
// Function: cmd_market
void cmd_market(int pindex __attribute__((unused)), struct Message * msg) {
    if (matches_regex(msg->message, CMD_LIT" sell (\\w+) (\\d+)")) {
        char *eptr;
        long amount = strtol(regex_group[2], &eptr, 10);
        market_buysell(msg, 0, regex_group[1], amount);
    } else if (matches_regex(msg->message, CMD_LIT" buy (\\w+) (\\d+)")) {
        char *eptr;
        long amount = strtol(regex_group[2], &eptr, 10);
        market_buysell(msg, 1, regex_group[1], amount);
    } else {
        print_market();
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x100(%rsi), %r14
leaq 0xcd68(%rip), %rsi      # 0x13245
movq %r14, %rdi
callq 0xd3aa
testl %eax, %eax
je 0x6512
leaq 0x19df0(%rip), %r14     # 0x202e0
leaq 0x320(%r14), %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x22e0
addq $0x190, %r14            # imm = 0x190
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x654f
leaq 0xcd48(%rip), %rsi      # 0x13261
movq %r14, %rdi
callq 0xd3aa
testl %eax, %eax
je 0x6562
leaq 0x19db4(%rip), %r14     # 0x202e0
leaq 0x320(%r14), %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x22e0
addq $0x190, %r14            # imm = 0x190
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
movq %rax, %rcx
callq 0xb842
addq $0x8, %rsp
popq %rbx
popq %r14
retq
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb727
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/commands.c
// Function: cmd_sheet
void cmd_sheet(int pindex __attribute__((unused)), struct Message * msg) {
    if (matches_regex(msg->message, CMD_LIT" (.*)")) {
        if (strcmp(regex_group[1], dawn->nickname) == 0) {
            strncpy(msg->sender_nick, to_lower(regex_group[1]), MAX_NICK_LENGTH);
            print_sheet(msg);
            return;
        }
        strncpy(msg->sender_nick, to_lower(regex_group[1]), MAX_NICK_LENGTH);
        if (get_pindex(regex_group[1]) != -1) {
            print_sheet(msg);
        }
    } else {
        print_sheet(msg);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
leaq 0x100(%rsi), %rdi
leaq 0xc5c8(%rip), %rsi      # 0x12b65
callq 0xd3aa
testl %eax, %eax
je 0x65f4
leaq 0x1b4d3(%rip), %rax     # 0x21a80
movq (%rax), %rsi
movl $0x190, %r14d           # imm = 0x190
addq 0x18a23(%rip), %r14     # 0x1efe0
movq %r14, %rdi
callq 0x22d0
movl %eax, %ebp
movq %r14, %rdi
callq 0xd1f8
leaq 0x18c8e(%rip), %rcx     # 0x1f264
movl (%rcx), %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x20e0
testl %ebp, %ebp
je 0x65f4
movq %r14, %rdi
callq 0xda6c
cmpl $-0x1, %eax
je 0x6600
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xdf61
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/commands.c
// Function: cmd_umbrella
void cmd_umbrella (int pindex __attribute__((unused)), struct Message *msg) {
    char *out;
    CALLEXIT(!(out = malloc(MAX_MESSAGE_BUFFER)))
    if (dawn->weather == RAINING) {
        snprintf(out, MAX_MESSAGE_BUFFER, "PRIVMSG %s :%s throws up an umbrella and becomes a little less wet\r\n",
                dawn->active_room, msg->sender_nick);
        add_msg(out, strlen(out));
    } else {
        snprintf(out, MAX_MESSAGE_BUFFER, "PRIVMSG %s :You throw up your umbrella. You look silly.\r\n", dawn->active_room);
        add_msg(out, strlen(out));
    }
    free(out);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl $0x190, %edi            # imm = 0x190
callq 0x22b0
testq %rax, %rax
je 0x6922
movq %rax, %rbx
leaq 0x1b1c4(%rip), %rax     # 0x21a80
movq (%rax), %rax
leaq 0x100(%rax), %rcx
cmpl $0x1, 0x14c(%rax)
jne 0x68ea
leaq 0xd181(%rip), %rdx      # 0x13a57
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
movq %r14, %r8
xorl %eax, %eax
callq 0x2390
jmp 0x6900
leaq 0xd1ab(%rip), %rdx      # 0x13a9c
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2390
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcefe
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2240
callq 0x27ce
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/commands.c
// Function: cmd_weather
void cmd_weather (int pindex __attribute__((unused)), struct Message *msg) {
    char *out;
    CALLEXIT(!(out = malloc(MAX_MESSAGE_BUFFER)))
    snprintf(out, MAX_MESSAGE_BUFFER, "PRIVMSG %s :%s, the current weather is: ", dawn->active_room, msg->sender_nick);
    switch (dawn->weather) {
        case SUNNY:
            strcat(out, "warm and sunny!\r\n");
            break;
        case RAINING:
            strcat(out, "pouring rain\r\n");
            break;
        case SNOWING:
            strcat(out, "snowing, perfect for making snow angels!\r\n");
            break;
        default:
            strcat(out, "wejustdontknow.gif\r\n");
    }
    add_msg(out, strlen(out));
    free(out);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl $0x190, %edi            # imm = 0x190
callq 0x22b0
testq %rax, %rax
je 0x6a73
movq %rax, %rbx
leaq 0x1b0de(%rip), %r15     # 0x21a80
movl $0x100, %ecx            # imm = 0x100
addq (%r15), %rcx
leaq 0xcfd1(%rip), %rdx      # 0x13982
movl $0x190, %esi            # imm = 0x190
movq %rax, %rdi
movq %r14, %r8
xorl %eax, %eax
callq 0x2390
movq (%r15), %rax
movl 0x14c(%rax), %ebp
movq %rbx, %rdi
callq 0x20c0
addq %rbx, %rax
cmpl $0x2, %ebp
je 0x6a14
cmpl $0x1, %ebp
je 0x69f7
testl %ebp, %ebp
jne 0x6a36
movups 0xcfbf(%rip), %xmm0     # 0x139ab
movups %xmm0, (%rax)
movw $0xa, 0x10(%rax)
jmp 0x6a4e
movabsq $0xa0d6e69617220, %rcx  # imm = 0xA0D6E69617220
movq %rcx, 0x7(%rax)
movabsq $0x20676e6972756f70, %rcx # imm = 0x20676E6972756F70
movq %rcx, (%rax)
jmp 0x6a4e
movups 0xcfcc(%rip), %xmm0     # 0x139e7
movups %xmm0, 0x1b(%rax)
movups 0xcfb6(%rip), %xmm0     # 0x139dc
movups %xmm0, 0x10(%rax)
movups 0xcf9b(%rip), %xmm0     # 0x139cc
movups %xmm0, (%rax)
jmp 0x6a4e
movups 0xcfba(%rip), %xmm0     # 0x139f7
movups %xmm0, (%rax)
movabsq $0xa0d6669672e77, %rcx  # imm = 0xA0D6669672E77
movq %rcx, 0xd(%rax)
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcefe
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2240
callq 0x27e3
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/commands.c
// Function: cmd_gib
void cmd_gib(int pindex, struct Message * msg) {
    if(matches_regex(msg->message, CMD_LIT" gold (\\d+)")) {
        dawn->players[pindex].gold += atoi(regex_group[1]);
    } else if(matches_regex(msg->message, CMD_LIT" ap (\\d+)")) {
        dawn->players[pindex].attr_pts += atoi(regex_group[1]);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
addq $0x100, %r14            # imm = 0x100
leaq 0xc90b(%rip), %rsi      # 0x133d1
movq %r14, %rdi
callq 0xd3aa
testl %eax, %eax
je 0x6b03
movl $0x190, %edi            # imm = 0x190
addq 0x18502(%rip), %rdi     # 0x1efe0
callq 0x2360
cltq
leaq 0x1af94(%rip), %rcx     # 0x21a80
movq (%rcx), %rcx
movslq %ebx, %rdx
imulq $0x26a8, %rdx, %rdx     # imm = 0x26A8
addq %rax, 0x27e8(%rcx,%rdx)
jmp 0x6b42
leaq 0xc8dd(%rip), %rsi      # 0x133e7
movq %r14, %rdi
callq 0xd3aa
testl %eax, %eax
je 0x6b42
movl $0x190, %edi            # imm = 0x190
addq 0x184be(%rip), %rdi     # 0x1efe0
callq 0x2360
leaq 0x1af52(%rip), %rcx     # 0x21a80
movq (%rcx), %rcx
movslq %ebx, %rdx
imulq $0x26a8, %rdx, %rdx     # imm = 0x26A8
addl %eax, 0x2838(%rcx,%rdx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/commands.c
// Function: cmd_givexp
void cmd_givexp(int pindex __attribute__((unused)), struct Message * msg) {
    if (matches_regex(msg->message, CMD_LIT" (\\w+) (\\d+)")) {
        char * username;
        CALLEXIT(!(username = calloc(MAX_NICK_LENGTH, 1)))
        char *eptr;
        int index;
        unsigned long long amount = strtoull(regex_group[2], &eptr, 10);

        strncpy(username, to_lower(regex_group[1]), MAX_NICK_LENGTH);
        index = get_pindex(username);
        dawn->players[index].experience += amount;

        if (index == -1) return;

        while (dawn->players[index].experience > get_nextlvl_exp(username)) {
            struct Message temp;
            strncpy(temp.sender_nick, username, MAX_NICK_LENGTH);
            strncpy(temp.receiver, dawn->active_room, MAX_CHANNEL_LENGTH);
            check_levelup(&temp);
        }
        free(username);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x908, %rsp            # imm = 0x908
leaq 0x100(%rsi), %rdi
leaq 0xc0b2(%rip), %rsi      # 0x12c1b
callq 0xd3aa
testl %eax, %eax
je 0x6c76
leaq 0x186e7(%rip), %r12     # 0x1f264
movl (%r12), %edi
movl $0x1, %esi
callq 0x2110
testq %rax, %rax
je 0x6c88
movq %rax, %rbx
leaq 0x19742(%rip), %r15     # 0x202e0
leaq 0x320(%r15), %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x22c0
movq %rax, %r14
addq $0x190, %r15            # imm = 0x190
movq %r15, %rdi
callq 0xd1f8
movl (%r12), %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x20e0
movq %rbx, %rdi
callq 0xda6c
leaq 0x1ae9e(%rip), %r13     # 0x21a80
movq (%r13), %rcx
cltq
imulq $0x26a8, %rax, %rbp     # imm = 0x26A8
addq 0x27f8(%rcx,%rbp), %r14
movq %r14, 0x27f8(%rcx,%rbp)
cmpl $-0x1, %eax
je 0x6c76
movq %rbx, %rdi
callq 0xdf0a
cmpq %rax, %r14
jbe 0x6c6e
leaq 0x8(%rsp), %r15
movl (%r12), %edx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x20e0
movq (%r13), %rsi
movl $0x100, %eax            # imm = 0x100
addq %rax, %rsi
leaq 0x18628(%rip), %rax     # 0x1f260
movl (%rax), %edx
leaq 0xc8(%rsp), %rdi
callq 0x20e0
movq %r15, %rdi
callq 0xe32c
movq (%r13), %rax
movq %r12, %r14
movq 0x27f8(%rax,%rbp), %r12
movq %rbx, %rdi
callq 0xdf0a
cmpq %rax, %r12
movq %r14, %r12
ja 0x6c16
movq %rbx, %rdi
callq 0x2240
addq $0x908, %rsp            # imm = 0x908
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x27f8
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/commands.c
// Function: cmd_save
void cmd_save(int pindex __attribute__((unused)), struct Message * msg) {
    char * out;
    CALLEXIT(!(out = malloc(MAX_MESSAGE_BUFFER)))
    persistent_save();
    snprintf(out, MAX_MESSAGE_BUFFER, "PRIVMSG %s :Saved.\r\n", msg->receiver);
    add_msg(out, strlen(out));
    free(out);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl $0x190, %edi            # imm = 0x190
callq 0x22b0
testq %rax, %rax
je 0x6ced
movq %rax, %rbx
callq 0xda24
addq $0xc0, %r14
leaq 0xc60e(%rip), %rdx      # 0x132c7
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2390
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcefe
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2240
callq 0x280d
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/commands.c
// Function: cmd_stop
void cmd_stop(int pindex __attribute__((unused)), struct Message * msg) {
    char * out;
    CALLEXIT(!(out = malloc(MAX_MESSAGE_BUFFER)))
    if (matches_regex(msg->message, CMD_LIT " (.*)")) {
        if(strcasecmp(regex_group[1], dawn->nickname) == 0) {
            close_socket(con_socket);
        } else {
            snprintf(out, MAX_MESSAGE_BUFFER, "PRIVMSG %s :Wrong nickname.\r\n", dawn->active_room);
            add_msg(out, strlen(out));
        }
    } else {
        snprintf(out, MAX_MESSAGE_BUFFER, "PRIVMSG %s :Please supply the nickname of the bot.\r\n", dawn->active_room);
        add_msg(out, strlen(out));
    }
    free(out);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl $0x190, %edi            # imm = 0x190
callq 0x22b0
testq %rax, %rax
je 0x6f01
movq %rax, %rbx
addq $0x100, %r14            # imm = 0x100
leaq 0xbcf4(%rip), %rsi      # 0x12b65
movq %r14, %rdi
callq 0xd3aa
leaq 0x1ac00(%rip), %rcx     # 0x21a80
movq (%rcx), %r14
testl %eax, %eax
je 0x6eaf
movl $0x190, %edi            # imm = 0x190
addq 0x1814d(%rip), %rdi     # 0x1efe0
movq %r14, %rsi
callq 0x2200
testl %eax, %eax
je 0x6ee4
addq $0x100, %r14            # imm = 0x100
leaq 0xbcc8(%rip), %rdx      # 0x12b75
jmp 0x6ebd
addq $0x100, %r14            # imm = 0x100
leaq 0xbcd6(%rip), %rdx      # 0x12b93
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2390
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcefe
jmp 0x6ef2
leaq 0x183d5(%rip), %rax     # 0x1f2c0
movl (%rax), %edi
callq 0xcd91
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2240
callq 0x2837
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/commands.c
// Function: cmd_fdel
void cmd_fdel(int pindex, struct Message *msg) {
    char *out;
    CALLEXIT(!(out = malloc(MAX_MESSAGE_BUFFER)))
    struct Inventory empty = {0};
    puts("in fdel");
    if (matches_regex(msg->message, CMD_LIT" (\\w+) (\\d+)")) {
        puts("regex matched");
        pindex = get_pindex(regex_group[1]);
        if (pindex == -1) {
            puts("pindex -1");
            snprintf(out, MAX_MESSAGE_BUFFER, "PRIVMSG %s :Invalid user\r\n", msg->receiver);
            add_msg(out, strlen(out));
            return;
        } else {
            puts("good");
            printf("user %s slot %s\n", regex_group[1], regex_group[2]);
            int slot = atoi(regex_group[2]);
            dawn->players[pindex].inventory[slot] = empty;
            snprintf(out, MAX_MESSAGE_BUFFER, "PRIVMSG %s :Slot cleared\r\n", msg->receiver);
            add_msg(out, strlen(out));
        }
    }
    free(out);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl $0x190, %edi            # imm = 0x190
callq 0x22b0
testq %rax, %rax
je 0x7071
movq %rax, %rbx
leaq 0xbce6(%rip), %rdi      # 0x12c13
callq 0x2330
leaq 0x100(%r14), %rdi
leaq 0xbcdb(%rip), %rsi      # 0x12c1b
callq 0xd3aa
testl %eax, %eax
je 0x7016
leaq 0xbcde(%rip), %rdi      # 0x12c32
callq 0x2330
movl $0x190, %edi            # imm = 0x190
addq 0x1807b(%rip), %rdi     # 0x1efe0
callq 0xda6c
cmpl $-0x1, %eax
je 0x7028
movl %eax, %ebp
leaq 0xbce9(%rip), %rdi      # 0x12c65
callq 0x2330
leaq 0x19358(%rip), %r15     # 0x202e0
leaq 0x190(%r15), %rsi
addq $0x320, %r15            # imm = 0x320
leaq 0xbccd(%rip), %rdi      # 0x12c6a
movq %r15, %rdx
xorl %eax, %eax
callq 0x2040
movq %r15, %rdi
callq 0x2360
leaq 0x1aaca(%rip), %rcx     # 0x21a80
movslq %ebp, %rdx
imulq $0x26a8, %rdx, %rdx     # imm = 0x26A8
addq (%rcx), %rdx
cltq
imulq $0x9c, %rax, %rax
leaq (%rax,%rdx), %rdi
addq $0x330, %rdi            # imm = 0x330
movl $0x9c, %edx
xorl %esi, %esi
callq 0x20f0
addq $0xc0, %r14
leaq 0xbc8a(%rip), %rdx      # 0x12c7b
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2390
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcefe
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2240
leaq 0xbc11(%rip), %rdi      # 0x12c40
callq 0x2330
addq $0xc0, %r14
leaq 0xbc08(%rip), %rdx      # 0x12c4a
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2390
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xcefe
callq 0x284c
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/events.c
// Function: update_weather
void update_weather(void) {
    int weather = rand() % MAX_WEATHER_TYPE;
    char out[MAX_MESSAGE_BUFFER];

    //Avoid same weather
    while (weather == dawn->weather)
        weather = rand() % MAX_WEATHER_TYPE;

    switch (weather) {
        case 0:
            sprintf(out, "PRIVMSG %s :The clouds disperse, allowing "
                        "the sunlight to shine down upon %s\r\n",
                    dawn->active_room, dawn->active_room);
            dawn->weather = SUNNY;
            break;
        case 1:
            sprintf(out, "PRIVMSG %s :Dark clouds roll in, plunging the town"
                         " of stacked into darkness. Rain begins to fall from"
                    " the sky.\r\n", dawn->active_room);
            dawn->weather = RAINING;
            break;
        case 2:
            sprintf(out, "PRIVMSG %s :Snow begins to float down from the skies!\r\n",
                    dawn->active_room);
            dawn->weather = SNOWING;
            break;
        default:
            PRINTERR("INVALID WEATHER")
    }
    add_msg(out, strlen(out));
}

// Assembly:
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
callq 0x2080
cltq
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
subl %ecx, %eax
leaq 0x1a2cf(%rip), %rbx     # 0x21a80
movq (%rbx), %rdx
cmpl 0x14c(%rdx), %eax
jne 0x77de
callq 0x2080
cltq
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
subl %ecx, %eax
jmp 0x77b1
cmpl $0x2, %eax
je 0x781a
cmpl $0x1, %eax
je 0x7841
testl %eax, %eax
jne 0x7885
addq $0x100, %rdx            # imm = 0x100
leaq 0xc325(%rip), %rsi      # 0x13b23
movq %rsp, %rdi
movq %rdx, %rcx
xorl %eax, %eax
callq 0x2050
movq (%rbx), %rax
movl $0x0, 0x14c(%rax)
jmp 0x7866
addq $0x100, %rdx            # imm = 0x100
leaq 0xc3bb(%rip), %rsi      # 0x13be3
movq %rsp, %rdi
xorl %eax, %eax
callq 0x2050
movq (%rbx), %rax
movl $0x2, 0x14c(%rax)
jmp 0x7866
addq $0x100, %rdx            # imm = 0x100
leaq 0xc323(%rip), %rsi      # 0x13b72
movq %rsp, %rdi
xorl %eax, %eax
callq 0x2050
movq (%rbx), %rax
movl $0x1, 0x14c(%rax)
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcefe
addq $0x190, %rsp            # imm = 0x190
popq %rbx
retq
leaq 0xc38f(%rip), %rdi      # 0x13c1b
callq 0x2190
jmp 0x7866
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/events.c
// Function: check_famine
void check_famine(int whom) {
    struct Message temp;
    if (whom == -1) {
        for (int i = 0; i < dawn->player_count; i++) {
            strncpy(temp.sender_nick, dawn->players[i].username, MAX_NICK_LENGTH);
            strncpy(temp.receiver, dawn->active_room, MAX_CHANNEL_LENGTH);
            check_alive(&temp);
        }
    } else {
        strncpy(temp.sender_nick, dawn->players[whom].username, MAX_NICK_LENGTH);
        strncpy(temp.receiver, dawn->active_room, MAX_CHANNEL_LENGTH);
        check_alive(&temp);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x908, %rsp            # imm = 0x908
leaq 0x1a1d5(%rip), %r12     # 0x21a80
movq (%r12), %rbx
cmpl $-0x1, %edi
je 0x7909
movslq %edi, %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
leaq (%rbx,%rax), %rsi
addq $0x1a0, %rsi            # imm = 0x1A0
leaq 0x17994(%rip), %rax     # 0x1f264
movl (%rax), %edx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x20e0
leaq 0xc8(%rsp), %rdi
addq $0x100, %rbx            # imm = 0x100
leaq 0x1796b(%rip), %rax     # 0x1f260
movl (%rax), %edx
movq %rbx, %rsi
callq 0x20e0
movq %r14, %rdi
callq 0x45bc
jmp 0x7977
cmpl $0x0, 0x148(%rbx)
jle 0x7977
movl $0x1a0, %r13d           # imm = 0x1A0
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
leaq 0x1793a(%rip), %r14     # 0x1f260
leaq (%rbx,%r13), %rsi
leaq 0x17933(%rip), %rax     # 0x1f264
movl (%rax), %edx
movq %r15, %rdi
callq 0x20e0
addq $0x100, %rbx            # imm = 0x100
movl (%r14), %edx
leaq 0xc8(%rsp), %rdi
movq %rbx, %rsi
callq 0x20e0
movq %r15, %rdi
callq 0x45bc
incq %rbp
movq (%r12), %rbx
movslq 0x148(%rbx), %rax
addq $0x26a8, %r13           # imm = 0x26A8
cmpq %rax, %rbp
jl 0x7926
addq $0x908, %rsp            # imm = 0x908
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/events.c
// Function: lottery_collect
void lottery_collect (void) {
    for (int i=0; i<dawn->player_count; i++) {
        if (dawn->players[i].gold <= 50) {
            continue;
        }

        long long amount = rand() % 45000; //( (long long)((2.0f/100) * dawn->players[i].gold) );
        dawn->lottery += amount;
        //dawn->players[i].gold -= amount;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x1a0eb(%rip), %rbx     # 0x21a80
movq (%rbx), %rax
cmpl $0x0, 0x148(%rax)
jle 0x79f7
movl $0x27e8, %r14d          # imm = 0x27E8
xorl %r15d, %r15d
cmpq $0x33, (%rax,%r14)
jl 0x79e1
callq 0x2080
cltq
imulq $0x5d34edef, %rax, %rcx # imm = 0x5D34EDEF
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x2e, %rcx
addl %edx, %ecx
imull $0xafc8, %ecx, %ecx     # imm = 0xAFC8
subl %ecx, %eax
movslq %eax, %rcx
movq (%rbx), %rax
addq %rcx, 0x150(%rax)
incq %r15
movslq 0x148(%rax), %rcx
addq $0x26a8, %r14           # imm = 0x26A8
cmpq %rcx, %r15
jl 0x79aa
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/events.c
// Function: lottery_reward
void lottery_reward (void) {
    char out[MAX_MESSAGE_BUFFER];
    int player = rand() % dawn->player_count;

    while (dawn->players[player].available != 1) {
        player = rand() % dawn->player_count;
    }

    dawn->players[player].gold += dawn->lottery;
    
    snprintf(
        out,
        MAX_MESSAGE_BUFFER,
        "PRIVMSG %s :Congratulations, %s! You've won the lottery and have been awarded with %lld gold pieces!!!\r\n",
        dawn->active_room,
        dawn->players[player].username,
        dawn->lottery
    );

    dawn->lottery = 0;
    add_msg(out, strlen(out));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
callq 0x2080
leaq 0x1a06d(%rip), %r14     # 0x21a80
movq (%r14), %rcx
cltd
idivl 0x148(%rcx)
movslq %edx, %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
cmpl $0x1, 0x2804(%rcx,%rax)
je 0x7a38
callq 0x2080
jmp 0x7a13
leaq (%rcx,%rax), %r8
addq $0x1a0, %r8             # imm = 0x1A0
movq 0x150(%rcx), %r9
addq %r9, 0x2648(%r8)
addq $0x100, %rcx            # imm = 0x100
leaq 0xc1f1(%rip), %rdx      # 0x13c50
movq %rsp, %rbx
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2390
movq (%r14), %rax
movq $0x0, 0x150(%rax)
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcefe
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/items.c
// Function: get_item_info
void get_item_info(struct Message *message, int slot) {
    char item_name[128];
    char out[MAX_MESSAGE_BUFFER];
    int index = get_pindex(message->sender_nick);
    int total_items = MAX_INVENTORY_SLOTS - dawn->players[index].available_slots;
    int str    = dawn->players[index].inventory[slot].attr_strength;
    int intel  = dawn->players[index].inventory[slot].attr_intelligence;
    int def    = dawn->players[index].inventory[slot].attr_defense;
    int mdef   = dawn->players[index].inventory[slot].attr_mdef;
    int hp     = dawn->players[index].inventory[slot].attr_health;
    int mp     = dawn->players[index].inventory[slot].attr_mana;
    int weight = dawn->players[index].inventory[slot].weight;
    int reqlvl = dawn->players[index].inventory[slot].req_level;

    if (slot < total_items && slot > -1) {
        strcpy(item_name, dawn->players[index].inventory[slot].name);
        sprintf(out, "PRIVMSG %s :%s - STR: %d - DEF: %d - INT: %d - MDEF: %d - HP: %d - MP: %d"
               " - Weight: %d - Req lvl: %d\r\n", message->receiver, item_name, str, def, intel, mdef, hp, mp, weight, reqlvl);
        add_msg(out, strlen(out));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movl %esi, %ebp
movq %rdi, %rbx
callq 0xda6c
testl %ebp, %ebp
js 0x8aa1
leaq 0x190b6(%rip), %rcx     # 0x21a80
movq (%rcx), %rcx
cltq
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
movl $0x19, %edx
subl 0x2818(%rcx,%rax), %edx
cmpl %ebp, %edx
jle 0x8aa1
addq %rcx, %rax
addq $0x1a0, %rax            # imm = 0x1A0
movl %ebp, %ecx
imulq $0x9c, %rcx, %rcx
leaq (%rax,%rcx), %rsi
addq $0x190, %rsi            # imm = 0x190
movl 0x78(%rsi), %r13d
movl 0x7c(%rsi), %r14d
movl 0x90(%rsi), %eax
movq %rax, (%rsp)
movl 0x74(%rsi), %eax
movq %rax, 0x18(%rsp)
movl 0x64(%rsi), %eax
movq %rax, 0x8(%rsp)
movl 0x68(%rsi), %ebp
movl 0x6c(%rsi), %eax
movq %rax, 0x10(%rsp)
movl 0x70(%rsi), %r15d
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x21c0
addq $0xc0, %rbx
leaq 0xbc2e(%rip), %rsi      # 0x14681
leaq 0xa0(%rsp), %rdi
movq %rbx, %rdx
movq %r12, %rcx
movl %r15d, %r8d
movl %ebp, %r9d
xorl %eax, %eax
pushq %r13
pushq %r14
pushq 0x10(%rsp)
pushq 0x20(%rsp)
pushq 0x38(%rsp)
pushq 0x38(%rsp)
callq 0x2050
addq $0x30, %rsp
leaq 0xa0(%rsp), %rbx
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcefe
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/main.c
// Function: print_usage
void print_usage (char **argv) {
    printf(WARN "Usage: %s [parameters]\n\n", argv[0]);
    printf(WARN "Valid parameters:\n");
    printf(WARN "\t-h\t\t- Prints this, hi\n");
    printf(WARN "\t-m <file>\t- Specifies the raw monster database\n");
    printf(WARN "\t-n <nick>\t- Sets the bot's nickname\n");
    printf(WARN "\t-p <port>\t- Sets the server port the bot connects to\n");
    printf(WARN "\t-r <room>\t- Sets which room the bot will join - NOTE: OMIT THE #\n");
    printf(WARN "\t-s <server>\t- Specify the server the bot connects to -\n"
                "\t\t\t  can be IP or hostname\n");
}

// Assembly:
pushq %rax
movq (%rdi), %rsi
leaq 0xb571(%rip), %rdi      # 0x14da5
xorl %eax, %eax
callq 0x2040
leaq 0xb624(%rip), %rdi      # 0x14e66
callq 0x2330
leaq 0xb63d(%rip), %rdi      # 0x14e8b
callq 0x2330
leaq 0xb65b(%rip), %rdi      # 0x14eb5
callq 0x2330
leaq 0xb692(%rip), %rdi      # 0x14ef8
callq 0x2330
leaq 0xb6be(%rip), %rdi      # 0x14f30
callq 0x2330
leaq 0xb6fb(%rip), %rdi      # 0x14f79
callq 0x2330
leaq 0xb744(%rip), %rdi      # 0x14fce
popq %rax
jmp 0x2330
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/main.c
// Function: timestamp
char *timestamp (void) {
    static char timestamp[12];
    time_t ltime;
    ltime = time(NULL);
    struct tm *tm;
    tm = localtime(&ltime);
    sprintf(timestamp, "%02d/%02d:%02d:%02d", tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec);
    return timestamp;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
xorl %edi, %edi
callq 0x21b0
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
callq 0x2140
movl 0xc(%rax), %edx
movl 0x8(%rax), %ecx
movl (%rax), %r9d
movl 0x4(%rax), %r8d
leaq 0x159d3(%rip), %rbx     # 0x1f290
leaq 0xb50d(%rip), %rsi      # 0x14dd1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2050
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/map.c
// Function: free_map
void free_map() {
    free(global_map->heightmap);

    for (int i = 0; i < global_map->town_count; i++) {
        free(global_map->towns[i].t_ent);
    }

    free(global_map->towns);
    free(global_map->m_ent);
    free(global_map);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x142bc(%rip), %rax     # 0x1f2a0
movq (%rax), %rdi
callq 0x2240
movq 0x142ad(%rip), %rax     # 0x1f2a0
cmpl $0x0, 0x18(%rax)
jle 0xb025
movl $0x20, %ebx
xorl %r14d, %r14d
movq 0x10(%rax), %rax
movq (%rax,%rbx), %rdi
callq 0x2240
incq %r14
movq 0x14288(%rip), %rax     # 0x1f2a0
movslq 0x18(%rax), %rcx
addq $0x30, %rbx
cmpq %rcx, %r14
jl 0xb001
movq 0x10(%rax), %rdi
callq 0x2240
movq 0x1426b(%rip), %rax     # 0x1f2a0
movq 0x8(%rax), %rdi
callq 0x2240
movq 0x1425b(%rip), %rdi     # 0x1f2a0
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2240
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/map.c
// Function: print_location
void print_location(int i) {
    char out[MAX_MESSAGE_BUFFER];
    sprintf(out, "PRIVMSG %s :%s, you are at %d,%d\r\n", dawn->active_room, dawn->players[i].username,
            dawn->players[i].pos_x, dawn->players[i].pos_y);
    add_msg(out, strlen(out));
}

// Assembly:
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
leaq 0x16a20(%rip), %rax     # 0x21a80
movq (%rax), %rdx
movslq %edi, %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
leaq (%rdx,%rax), %rcx
addq $0x1a0, %rcx            # imm = 0x1A0
addq $0x100, %rdx            # imm = 0x100
movl 0x25ec(%rcx), %r8d
movl 0x25f0(%rcx), %r9d
leaq 0xad40(%rip), %rsi      # 0x15dd4
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2050
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcefe
addq $0x190, %rsp            # imm = 0x190
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/map.c
// Function: find_building
void find_building (struct Bot *b, struct Message *message, char *location) {
    char out[MAX_MESSAGE_BUFFER];
    int pindex = get_pindex(message->sender_nick);
    int bindex = get_bindex(b, message->sender_nick, location);

    if (bindex != -1) {
        sprintf(out, "PRIVMSG %s :The %s in %s is located at %d,%d\r\n",
            message->receiver,
            location,
            b->players[pindex].current_map.name,
            b->players[pindex].current_map.buildings[bindex].x,
            b->players[pindex].current_map.buildings[bindex].y
        );
    } else {
        sprintf(out, "PRIVMSG %s :Unknown location '%s'\r\n", message->receiver, location);
    }
    add_msg(out, strlen(out));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0xda6c
movl %eax, %ebp
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xdacc
addq $0xc0, %r14
cmpl $-0x1, %eax
je 0xb435
movslq %ebp, %rcx
imulq $0x26a8, %rcx, %rcx     # imm = 0x26A8
leaq (%r15,%rcx), %rdx
leaq (%r15,%rcx), %r8
addq $0x273c, %r8            # imm = 0x273C
cltq
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
movl 0x137c(%rax,%rdx), %r9d
movl 0x1380(%rax,%rdx), %eax
movl %eax, (%rsp)
leaq 0xabb5(%rip), %rsi      # 0x15fd6
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2050
jmp 0xb44e
leaq 0xabc9(%rip), %rsi      # 0x16005
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2050
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcefe
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/map.c
// Function: check_special_location
void check_special_location (struct Bot *b, int pindex) {
    char out[MAX_MESSAGE_BUFFER];
    int cur_x = b->players[pindex].current_map.x;
    int cur_y = b->players[pindex].current_map.y;

    for (int i=0; i<MAX_BUILDINGS; i++) {
        int bld_startx = b->players[pindex].current_map.buildings[i].x;
        int bld_endx   = b->players[pindex].current_map.buildings[i].height + bld_startx;
        int bld_starty = b->players[pindex].current_map.buildings[i].y;
	    int bld_endy   = b->players[pindex].current_map.buildings[i].width + bld_starty;
	    char found_building[64] = {0};

        strncpy(found_building, "lot of empty space", 64);


	    if (cur_x == 0 && cur_y == 0) {
            continue;
        }

    	if (cur_x >= bld_startx && cur_x <= bld_endx) {
    	    if (cur_y >= bld_starty && cur_y <= bld_endy) {
		        strncpy(found_building, b->players[pindex].current_map.buildings[i].name, 62);
            }
	    }

        sprintf(out, "PRIVMSG %s :%s stands in front of the %s\r\n",
            b->active_room,
            b->players[pindex].username,
            found_building
        );
        add_msg(out, strlen(out));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movslq %esi, %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
leaq (%rdi,%rax), %rcx
addq $0x1a0, %rcx            # imm = 0x1A0
movq %rcx, (%rsp)
leaq 0x133c(%rdi,%rax), %r15
movl 0x1448(%r15), %r12d
movl 0x144c(%r15), %ebp
movl %r12d, %eax
orl %ebp, %eax
sete %r14b
addq $0x100, %rdi            # imm = 0x100
movq %rdi, 0x8(%rsp)
movl $0x40, %ebx
movups 0xaf43(%rip), %xmm0     # 0x16418
movups 0xaf2c(%rip), %xmm1     # 0x16408
movups 0xaf15(%rip), %xmm2     # 0x163f8
movups 0xaefe(%rip), %xmm3     # 0x163e8
leaq 0x50(%rsp), %r13
movl 0x40(%r15), %edx
movl 0x44(%r15), %eax
movl 0x4c(%r15), %esi
movl 0x48(%r15), %ecx
movaps %xmm0, 0x40(%rsp)
movaps %xmm1, 0x30(%rsp)
movaps %xmm2, 0x20(%rsp)
movaps %xmm3, 0x10(%rsp)
testb %r14b, %r14b
jne 0xb58e
cmpl %edx, %r12d
jl 0xb540
addl %edx, %esi
cmpl %esi, %r12d
jg 0xb540
cmpl %eax, %ebp
jl 0xb540
addl %eax, %ecx
cmpl %ecx, %ebp
jg 0xb540
movl $0x3e, %edx
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x20e0
movq %r13, %rdi
leaq 0xaadf(%rip), %rsi      # 0x16029
movq 0x8(%rsp), %rdx
movq (%rsp), %rcx
leaq 0x10(%rsp), %r8
xorl %eax, %eax
callq 0x2050
movq %r13, %rdi
callq 0x20c0
movq %r13, %rdi
movq %rax, %rsi
callq 0xcefe
movups 0xae9f(%rip), %xmm0     # 0x16418
movups 0xae88(%rip), %xmm1     # 0x16408
movups 0xae71(%rip), %xmm2     # 0x163f8
movups 0xae5a(%rip), %xmm3     # 0x163e8
addq $0x50, %r15
decq %rbx
jne 0xb4ef
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/market.c
// Function: fluctuate_market
void fluctuate_market() {
    char out[MAX_MESSAGE_BUFFER];
    memcpy(dawn->market.prevprice, dawn->market.materials, sizeof(dawn->market.materials));
    dawn->market.materials[WOOD] = rrange(100, 500);
    dawn->market.materials[LEATHER] = rrange(250, 800);
    dawn->market.materials[ORE] = rrange(400, 1200);
    dawn->market.materials[STONE] = rrange(500, 1400);
    dawn->market.materials[BRONZE] = rrange(700, 2000);
    dawn->market.materials[MAIL] = rrange(1000, 3000);
    dawn->market.materials[STEEL] = rrange(4000, 12000);
    dawn->market.materials[DIAMOND] = rrange(25000, 100000);
    sprintf(out, "PRIVMSG %s :Market prices have been updated\r\n", dawn->active_room);
    add_msg(out, strlen(out));
}

// Assembly:
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
leaq 0x164c1(%rip), %rbx     # 0x21a80
movq (%rbx), %rax
movupd 0xf2e78(%rax), %xmm0
movups 0xf2e88(%rax), %xmm1
movups %xmm1, 0xf2ea8(%rax)
movupd %xmm0, 0xf2e98(%rax)
callq 0xffe8
mulsd 0xae63(%rip), %xmm0     # 0x16450
addsd 0xae63(%rip), %xmm0     # 0x16458
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movl %eax, 0xf2e78(%rcx)
callq 0xffe8
mulsd 0xae51(%rip), %xmm0     # 0x16460
addsd 0xae51(%rip), %xmm0     # 0x16468
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movl %eax, 0xf2e7c(%rcx)
callq 0xffe8
mulsd 0xae3f(%rip), %xmm0     # 0x16470
addsd 0xae17(%rip), %xmm0     # 0x16450
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movl %eax, 0xf2e80(%rcx)
callq 0xffe8
mulsd 0xae25(%rip), %xmm0     # 0x16478
addsd 0xae25(%rip), %xmm0     # 0x16480
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movl %eax, 0xf2e84(%rcx)
callq 0xffe8
mulsd 0xae13(%rip), %xmm0     # 0x16488
addsd 0xae13(%rip), %xmm0     # 0x16490
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movl %eax, 0xf2e88(%rcx)
callq 0xffe8
mulsd 0xae01(%rip), %xmm0     # 0x16498
addsd 0xae01(%rip), %xmm0     # 0x164a0
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movl %eax, 0xf2e8c(%rcx)
callq 0xffe8
mulsd 0xadef(%rip), %xmm0     # 0x164a8
addsd 0xadef(%rip), %xmm0     # 0x164b0
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movl %eax, 0xf2e90(%rcx)
callq 0xffe8
mulsd 0xaddd(%rip), %xmm0     # 0x164b8
addsd 0xaddd(%rip), %xmm0     # 0x164c0
cvttsd2si %xmm0, %eax
movq (%rbx), %rdx
movl %eax, 0xf2e94(%rdx)
addq $0x100, %rdx            # imm = 0x100
leaq 0xadca(%rip), %rsi      # 0x164c8
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2050
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcefe
addq $0x190, %rsp            # imm = 0x190
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/market.c
// Function: print_market
void print_market() {
    char out[MAX_MESSAGE_BUFFER];
    sprintf(out, "PRIVMSG %s :", dawn->active_room);
    for (int i=0; i<MAX_MATERIAL_TYPE; i++) {
        char *temp;
        size_t len = strlen(out);
        CALLEXIT(!(temp = malloc(MAX_MESSAGE_BUFFER-len)))
        int difference = dawn->market.materials[i] - dawn->market.prevprice[i];
        snprintf(temp, MAX_MESSAGE_BUFFER-len, "[%s: %d (%s%+d" IRC_NORMAL ")] ",
                 material_to_str(i),
                 dawn->market.materials[i],
                 ((difference >= 0) ? IRC_GREEN : IRC_RED),
                 difference);
        strncat(out, temp, MAX_MESSAGE_BUFFER-len);
        free(temp);
    }
    strncat(out, "\r\n", 3);
    add_msg(out, strlen(out));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
leaq 0x16341(%rip), %rax     # 0x21a80
movl $0x100, %edx            # imm = 0x100
addq (%rax), %rdx
leaq 0x71c0(%rip), %rsi      # 0x1290e
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2050
leaq 0xaff4(%rip), %rbp      # 0x16758
leaq 0xadd8(%rip), %r14      # 0x16543
xorl %r13d, %r13d
movq %rbx, %rdi
callq 0x20c0
movl $0x190, %r15d           # imm = 0x190
subq %rax, %r15
movq %r15, %rdi
callq 0x22b0
testq %rax, %rax
je 0xb83d
movq %rax, %r12
leaq 0x162e6(%rip), %rax     # 0x21a80
movq (%rax), %rcx
movl 0xf2e78(%rcx,%r13), %r8d
movl %r8d, %eax
subl 0xf2e98(%rcx,%r13), %eax
leaq 0x8a56(%rip), %r9       # 0x1420d
jns 0xb7c0
leaq 0x65a8(%rip), %r9       # 0x11d68
movslq (%r13,%rbp), %rcx
addq %rbp, %rcx
movl %eax, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2390
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2120
movq %r12, %rdi
callq 0x2240
addq $0x4, %r13
cmpq $0x20, %r13
jne 0xb76e
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x20c0
movw $0xa0d, 0x10(%rsp,%rax) # imm = 0xA0D
movb $0x0, 0x12(%rsp,%rax)
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcefe
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2d05
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/market.c
// Function: print_materials
void print_materials(struct Message *m) {
    int pindex = get_pindex(m->sender_nick);
    char out[MAX_MESSAGE_BUFFER];
    sprintf(out, "PRIVMSG %s :%s, [Materials: - Wood: %ld - Leather %ld - Ore: %ld - Stone: %ld - "
               " Bronze: %ld - Mail: %ld - Steel: %ld - Diamond: %ld]\r\n",
            m->receiver, m->sender_nick, dawn->players[pindex].materials[WOOD],
            dawn->players[pindex].materials[LEATHER], dawn->players[pindex].materials[ORE],
            dawn->players[pindex].materials[STONE], dawn->players[pindex].materials[BRONZE],
            dawn->players[pindex].materials[MAIL], dawn->players[pindex].materials[STEEL],
            dawn->players[pindex].materials[DIAMOND]);
    add_msg(out, strlen(out));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdi, %rbx
callq 0xda6c
leaq 0xc0(%rbx), %rdx
leaq 0x15fa6(%rip), %rcx     # 0x21a80
movq (%rcx), %rcx
cltq
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
movq 0x2798(%rcx,%rax), %r8
movq 0x27a0(%rcx,%rax), %r9
movups 0x27a8(%rcx,%rax), %xmm0
movups 0x27b8(%rcx,%rax), %xmm1
movups 0x27c8(%rcx,%rax), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0xab7c(%rip), %rsi      # 0x1669f
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2050
movq %r14, %rdi
callq 0x20c0
movq %r14, %rdi
movq %rax, %rsi
callq 0xcefe
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/namegen.c
// Function: init_name_gen
NameGen init_name_gen(unsigned int markov_tier) {
    if(markov_tier == 0)
        return 0;
    struct namegen * ng;
    CALLEXIT(!(ng = malloc(sizeof *ng)))
    ng->markov_tier = markov_tier;
    ng->success = 0;
    CALLEXIT(!(ng->tiers = malloc(markov_tier * sizeof *ng->tiers)))
    for(size_t i = 0; i < markov_tier; i++) {
        ng->tiers[i] = init_analyzer(i+1);
    }
    return ng;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %edi, %edi
je 0xc781
movl %edi, %ebp
movl $0x10, %edi
callq 0x22b0
testq %rax, %rax
je 0xc78f
movq %rax, %rbx
movl %ebp, 0x8(%rax)
movl $0x0, 0xc(%rax)
movl %ebp, %r12d
leaq (,%r12,8), %rdi
callq 0x22b0
movq %rax, (%rbx)
testq %rax, %rax
je 0xc794
movq %rax, %r14
negq %r12
movl $0x1, %r15d
movq %r15, %rdi
callq 0x31dc
movq %rax, -0x8(%r14,%r15,8)
leaq (%r12,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0xc762
jmp 0xc783
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x2d2f
callq 0x2d1a
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/namegen.c
// Function: free_name_gen
void free_name_gen(NameGen ng) {
    if(!ng)
        return;
    struct namegen * cng = ng;
    for(size_t i = 0; i < cng->markov_tier; i++) {
        free_analyzer(cng->tiers[i]);
    }
    free(cng->tiers);
    free(cng);
}

// Assembly:
testq %rdi, %rdi
je 0xc7dc
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
je 0xc7c5
xorl %r14d, %r14d
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x3211
incq %r14
movl 0x8(%rbx), %eax
cmpq %rax, %r14
jb 0xc7ae
movq (%rbx), %rdi
callq 0x2240
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2240
retq
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/namegen.c
// Function: add_file
void add_file(NameGen ng, char const * fn) {
    if(!ng || !fn || strlen(fn) == 0)
        return;
    struct namegen * cng = ng;
    for(size_t i = 0; i < cng->markov_tier; i++) {
        if(!analyze(cng->tiers[i], fn)) {
            cng->success = 0;
            return;
        }
    }
    cng->success = 1;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0xc83c
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
cmpb $0x0, (%rsi)
je 0xc832
movq %rdi, %rbx
movl $0x1, %ebp
cmpl $0x0, 0x8(%rdi)
je 0xc82f
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x3266
testl %eax, %eax
je 0xc82d
incq %r15
movl 0x8(%rbx), %eax
cmpq %rax, %r15
jb 0xc80d
jmp 0xc82f
xorl %ebp, %ebp
movl %ebp, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/Ziddykins[P]Dawn/src/namegen.c
// Function: is_producible
int is_producible(NameGen ng, char src, size_t max_tier) {
    if(!ng || src == '\0')
        return 0;
    int valid = 0;
    struct namegen * cng = ng;
    for(size_t i = 0; i < max_tier && i < cng->markov_tier; i++) {
        if(has_rule_for(cng->tiers[i], src)) {
            valid = 1;
            break;
        }
    }
    return valid;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
sete %al
testb %sil, %sil
sete %cl
xorl %ebx, %ebx
orb %al, %cl
jne 0xcc35
movq %rdx, %r14
testq %rdx, %rdx
je 0xcc35
movq %rdi, %r15
xorl %ebx, %ebx
movsbl %sil, %ebp
xorl %r12d, %r12d
movl 0x8(%r15), %eax
cmpq %rax, %r12
jae 0xcc35
movq (%r15), %rax
movq (%rax,%r12,8), %rdi
movl %ebp, %esi
callq 0x3728
testl %eax, %eax
jne 0xcc30
incq %r12
cmpq %r12, %r14
jne 0xcc0b
jmp 0xcc35
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq