LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
movq %rsi, %r14
movl %edi, %ebp
movl $0x190, %edi            # imm = 0x190
callq 0x22b0
testq %rax, %rax
je 0x6478
movq %rax, %rbx
leaq 0x100(%r14), %rdi
leaq 0xc9e1(%rip), %rsi      # 0x12d39
callq 0xd1ba
testl %eax, %eax
je 0x645f
leaq 0x1b714(%rip), %r12     # 0x21a80
movq (%r12), %rax
cmpl $0x2, 0x14c(%rax)
jne 0x63d9
callq 0x2080
movslq %eax, %r15
imulq $0x51eb851f, %r15, %rax # imm = 0x51EB851F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x25, %rax
addl %ecx, %eax
imull $0x64, %eax, %eax
subl %eax, %r15d
leaq 0xc0(%r14), %rcx
cmpl $0x4b, %r15d
jge 0x640e
leaq 0xca26(%rip), %rdx      # 0x12dd5
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
movq %r14, %r8
xorl %eax, %eax
callq 0x2390
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcd1c
jmp 0x6459
addq $0xc0, %r14
leaq 0xca32(%rip), %rdx      # 0x12e19
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 0xcd1c
jmp 0x645f
leaq 0xc93b(%rip), %rdx      # 0x12d50
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
movq %r14, %r8
xorl %eax, %eax
callq 0x2390
movq (%r12), %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 0xcd1c
movq %r14, %rdi
callq 0x4564
cmpl $0x4b, %r15d
jge 0x646f
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2240
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x27a4
// File: /workspace/github_c_makefile_star2_O1/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 0xcd7b(%rip), %rsi      # 0x1320d
movq %r14, %rdi
callq 0xd1ba
testl %eax, %eax
je 0x64c7
leaq 0x19e3b(%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 0x6504
leaq 0xcd5b(%rip), %rsi      # 0x13229
movq %r14, %rdi
callq 0xd1ba
testl %eax, %eax
je 0x6517
leaq 0x19dff(%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 0xb740
addq $0x8, %rsp
popq %rbx
popq %r14
retq
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xb60f
// File: /workspace/github_c_makefile_star2_O1/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 0xc5db(%rip), %rsi      # 0x12b2d
callq 0xd1ba
testl %eax, %eax
je 0x65a9
leaq 0x1b51e(%rip), %rax     # 0x21a80
movq (%rax), %rsi
movl $0x190, %r14d           # imm = 0x190
addq 0x18a6e(%rip), %r14     # 0x1efe0
movq %r14, %rdi
callq 0x22d0
movl %eax, %ebp
movq %r14, %rdi
callq 0xd008
leaq 0x18cd9(%rip), %rcx     # 0x1f264
movl (%rcx), %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x20e0
testl %ebp, %ebp
je 0x65a9
movq %r14, %rdi
callq 0xd89c
cmpl $-0x1, %eax
je 0x65b5
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xdd91
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x68c4
movq %rax, %rbx
leaq 0x1b222(%rip), %rax     # 0x21a80
movq (%rax), %rax
leaq 0x100(%rax), %rcx
cmpl $0x1, 0x14c(%rax)
jne 0x688c
leaq 0xd1a7(%rip), %rdx      # 0x13a1f
movl $0x190, %esi            # imm = 0x190
movq %rbx, %rdi
movq %r14, %r8
xorl %eax, %eax
callq 0x2390
jmp 0x68a2
leaq 0xd1d1(%rip), %rdx      # 0x13a64
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 0xcd1c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2240
callq 0x27ce
// File: /workspace/github_c_makefile_star2_O1/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 0x6a15
movq %rax, %rbx
leaq 0x1b13c(%rip), %r15     # 0x21a80
movl $0x100, %ecx            # imm = 0x100
addq (%r15), %rcx
leaq 0xcff7(%rip), %rdx      # 0x1394a
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 0x69b6
cmpl $0x1, %ebp
je 0x6999
testl %ebp, %ebp
jne 0x69d8
movups 0xcfe5(%rip), %xmm0     # 0x13973
movups %xmm0, (%rax)
movw $0xa, 0x10(%rax)
jmp 0x69f0
movabsq $0xa0d6e69617220, %rcx  # imm = 0xA0D6E69617220
movq %rcx, 0x7(%rax)
movabsq $0x20676e6972756f70, %rcx # imm = 0x20676E6972756F70
movq %rcx, (%rax)
jmp 0x69f0
movups 0xcff2(%rip), %xmm0     # 0x139af
movups %xmm0, 0x1b(%rax)
movups 0xcfdc(%rip), %xmm0     # 0x139a4
movups %xmm0, 0x10(%rax)
movups 0xcfc1(%rip), %xmm0     # 0x13994
movups %xmm0, (%rax)
jmp 0x69f0
movups 0xcfe0(%rip), %xmm0     # 0x139bf
movups %xmm0, (%rax)
movabsq $0xa0d6669672e77, %rcx  # imm = 0xA0D6669672E77
movq %rcx, 0xd(%rax)
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcd1c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2240
callq 0x27e3
// File: /workspace/github_c_makefile_star2_O1/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 0xc931(%rip), %rsi      # 0x13399
movq %r14, %rdi
callq 0xd1ba
testl %eax, %eax
je 0x6aa5
movl $0x190, %edi            # imm = 0x190
addq 0x18560(%rip), %rdi     # 0x1efe0
callq 0x2360
cltq
leaq 0x1aff2(%rip), %rcx     # 0x21a80
movq (%rcx), %rcx
movslq %ebx, %rdx
imulq $0x26a8, %rdx, %rdx     # imm = 0x26A8
addq %rax, 0x27e8(%rcx,%rdx)
jmp 0x6ae4
leaq 0xc903(%rip), %rsi      # 0x133af
movq %r14, %rdi
callq 0xd1ba
testl %eax, %eax
je 0x6ae4
movl $0x190, %edi            # imm = 0x190
addq 0x1851c(%rip), %rdi     # 0x1efe0
callq 0x2360
leaq 0x1afb0(%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_O1/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 0xc0d8(%rip), %rsi      # 0x12be3
callq 0xd1ba
testl %eax, %eax
je 0x6c1c
leaq 0x18745(%rip), %r12     # 0x1f264
movl (%r12), %edi
movl $0x1, %esi
callq 0x2110
testq %rax, %rax
je 0x6c2e
movq %rax, %rbx
leaq 0x197a0(%rip), %r14     # 0x202e0
leaq 0x320(%r14), %rdi
movq %rsp, %rsi
movl $0xa, %edx
callq 0x22c0
movq %rax, %r15
addq $0x190, %r14            # imm = 0x190
movq %r14, %rdi
callq 0xd008
movl (%r12), %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x20e0
movq %rbx, %rdi
callq 0xd89c
leaq 0x1aefc(%rip), %r13     # 0x21a80
movq (%r13), %rcx
cltq
imulq $0x26a8, %rax, %rbp     # imm = 0x26A8
addq %r15, 0x27f8(%rcx,%rbp)
cmpl $-0x1, %eax
je 0x6c1c
movq (%r13), %rax
movq 0x27f8(%rax,%rbp), %r14
movq %rbx, %rdi
callq 0xdd3a
cmpq %rax, %r14
jbe 0x6c14
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 0x18682(%rip), %rax     # 0x1f260
movl (%rax), %edx
leaq 0xc8(%rsp), %rdi
callq 0x20e0
movq %r15, %rdi
callq 0xe0ef
movq (%r13), %rax
movq %r12, %r14
movq 0x27f8(%rax,%rbp), %r12
movq %rbx, %rdi
callq 0xdd3a
cmpq %rax, %r12
movq %r14, %r12
ja 0x6bbc
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_O1/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 0x6c93
movq %rax, %rbx
callq 0xd854
addq $0xc0, %r14
leaq 0xc630(%rip), %rdx      # 0x1328f
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 0xcd1c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2240
callq 0x280d
// File: /workspace/github_c_makefile_star2_O1/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 0x6ea7
movq %rax, %rbx
addq $0x100, %r14            # imm = 0x100
leaq 0xbd16(%rip), %rsi      # 0x12b2d
movq %r14, %rdi
callq 0xd1ba
leaq 0x1ac5a(%rip), %rcx     # 0x21a80
movq (%rcx), %r14
testl %eax, %eax
je 0x6e55
movl $0x190, %edi            # imm = 0x190
addq 0x181a7(%rip), %rdi     # 0x1efe0
movq %r14, %rsi
callq 0x2200
testl %eax, %eax
je 0x6e8a
addq $0x100, %r14            # imm = 0x100
leaq 0xbcea(%rip), %rdx      # 0x12b3d
jmp 0x6e63
addq $0x100, %r14            # imm = 0x100
leaq 0xbcf8(%rip), %rdx      # 0x12b5b
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 0xcd1c
jmp 0x6e98
leaq 0x1842f(%rip), %rax     # 0x1f2c0
movl (%rax), %edi
callq 0xcbc5
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2240
callq 0x2837
// File: /workspace/github_c_makefile_star2_O1/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 0x7017
movq %rax, %rbx
leaq 0xbd08(%rip), %rdi      # 0x12bdb
callq 0x2330
leaq 0x100(%r14), %rdi
leaq 0xbcfd(%rip), %rsi      # 0x12be3
callq 0xd1ba
testl %eax, %eax
je 0x6fbc
leaq 0xbd00(%rip), %rdi      # 0x12bfa
callq 0x2330
movl $0x190, %edi            # imm = 0x190
addq 0x180d5(%rip), %rdi     # 0x1efe0
callq 0xd89c
cmpl $-0x1, %eax
je 0x6fce
movl %eax, %ebp
leaq 0xbd0b(%rip), %rdi      # 0x12c2d
callq 0x2330
leaq 0x193b2(%rip), %r15     # 0x202e0
leaq 0x190(%r15), %rsi
addq $0x320, %r15            # imm = 0x320
leaq 0xbcef(%rip), %rdi      # 0x12c32
movq %r15, %rdx
xorl %eax, %eax
callq 0x2040
movq %r15, %rdi
callq 0x2360
leaq 0x1ab24(%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 0xbcac(%rip), %rdx      # 0x12c43
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 0xcd1c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2240
leaq 0xbc33(%rip), %rdi      # 0x12c08
callq 0x2330
addq $0xc0, %r14
leaq 0xbc2a(%rip), %rdx      # 0x12c12
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 0xcd1c
callq 0x284c
// File: /workspace/github_c_makefile_star2_O1/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 0x1a337(%rip), %rbx     # 0x21a80
movq (%rbx), %rdx
cmpl 0x14c(%rdx), %eax
jne 0x7776
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 0x7749
cmpl $0x2, %eax
je 0x77b2
cmpl $0x1, %eax
je 0x77d9
testl %eax, %eax
jne 0x781d
addq $0x100, %rdx            # imm = 0x100
leaq 0xc355(%rip), %rsi      # 0x13aeb
movq %rsp, %rdi
movq %rdx, %rcx
xorl %eax, %eax
callq 0x2050
movq (%rbx), %rax
movl $0x0, 0x14c(%rax)
jmp 0x77fe
addq $0x100, %rdx            # imm = 0x100
leaq 0xc3eb(%rip), %rsi      # 0x13bab
movq %rsp, %rdi
xorl %eax, %eax
callq 0x2050
movq (%rbx), %rax
movl $0x2, 0x14c(%rax)
jmp 0x77fe
addq $0x100, %rdx            # imm = 0x100
leaq 0xc353(%rip), %rsi      # 0x13b3a
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 0xcd1c
addq $0x190, %rsp            # imm = 0x190
popq %rbx
retq
leaq 0xc3bf(%rip), %rdi      # 0x13be3
callq 0x2190
jmp 0x77fe
// File: /workspace/github_c_makefile_star2_O1/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 0x1a23d(%rip), %r12     # 0x21a80
movq (%r12), %rbx
cmpl $-0x1, %edi
je 0x78a1
movslq %edi, %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
leaq (%rbx,%rax), %rsi
addq $0x1a0, %rsi            # imm = 0x1A0
leaq 0x179fc(%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 0x179d3(%rip), %rax     # 0x1f260
movl (%rax), %edx
movq %rbx, %rsi
callq 0x20e0
movq %r14, %rdi
callq 0x4564
jmp 0x790f
cmpl $0x0, 0x148(%rbx)
jle 0x790f
movl $0x1a0, %r13d           # imm = 0x1A0
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
leaq 0x179a2(%rip), %r14     # 0x1f260
leaq (%rbx,%r13), %rsi
leaq 0x1799b(%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 0x4564
incq %rbp
movq (%r12), %rbx
movslq 0x148(%rbx), %rax
addq $0x26a8, %r13           # imm = 0x26A8
cmpq %rax, %rbp
jl 0x78be
addq $0x908, %rsp            # imm = 0x908
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1a153(%rip), %rbx     # 0x21a80
movq (%rbx), %rax
cmpl $0x0, 0x148(%rax)
jle 0x7991
movl $0x27e8, %r14d          # imm = 0x27E8
xorl %r15d, %r15d
cmpq $0x33, (%rax,%r14)
jl 0x7978
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
cltq
movq (%rbx), %rcx
addq %rax, 0x150(%rcx)
incq %r15
movq (%rbx), %rax
movslq 0x148(%rax), %rcx
addq $0x26a8, %r14           # imm = 0x26A8
cmpq %rcx, %r15
jl 0x7942
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1a0d3(%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 0x79d2
callq 0x2080
jmp 0x79ad
leaq (%rcx,%rax), %r8
addq $0x1a0, %r8             # imm = 0x1A0
movq 0x150(%rcx), %r9
addq %r9, 0x2648(%r8)
addq $0x100, %rcx            # imm = 0x100
leaq 0xc21f(%rip), %rdx      # 0x13c18
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 0xcd1c
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0xd89c
testl %ebp, %ebp
js 0x89ff
leaq 0x19158(%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 0x89ff
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 0xbca0(%rip), %rsi      # 0x14651
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 0xcd1c
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0xb5d0(%rip), %rdi      # 0x14d75
xorl %eax, %eax
callq 0x2040
leaq 0xb683(%rip), %rdi      # 0x14e36
callq 0x2330
leaq 0xb69c(%rip), %rdi      # 0x14e5b
callq 0x2330
leaq 0xb6ba(%rip), %rdi      # 0x14e85
callq 0x2330
leaq 0xb6f1(%rip), %rdi      # 0x14ec8
callq 0x2330
leaq 0xb71d(%rip), %rdi      # 0x14f00
callq 0x2330
leaq 0xb75a(%rip), %rdi      # 0x14f49
callq 0x2330
leaq 0xb7a3(%rip), %rdi      # 0x14f9e
popq %rax
jmp 0x2330
// File: /workspace/github_c_makefile_star2_O1/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 0x15a62(%rip), %rbx     # 0x1f290
leaq 0xb56c(%rip), %rsi      # 0x14da1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2050
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x143dd(%rip), %rax     # 0x1f2a0
movq (%rax), %rdi
callq 0x2240
movq 0x143ce(%rip), %rax     # 0x1f2a0
cmpl $0x0, 0x18(%rax)
jle 0xaf04
movl $0x20, %ebx
xorl %r14d, %r14d
movq 0x10(%rax), %rax
movq (%rax,%rbx), %rdi
callq 0x2240
incq %r14
movq 0x143a9(%rip), %rax     # 0x1f2a0
movslq 0x18(%rax), %rcx
addq $0x30, %rbx
cmpq %rcx, %r14
jl 0xaee0
movq 0x10(%rax), %rdi
callq 0x2240
movq 0x1438c(%rip), %rax     # 0x1f2a0
movq 0x8(%rax), %rdi
callq 0x2240
movq 0x1437c(%rip), %rdi     # 0x1f2a0
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2240
// File: /workspace/github_c_makefile_star2_O1/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 0x16b41(%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 0xae11(%rip), %rsi      # 0x15d84
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2050
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcd1c
addq $0x190, %rsp            # imm = 0x190
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xd89c
movl %eax, %ebp
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xd8fc
addq $0xc0, %r14
cmpl $-0x1, %eax
je 0xb320
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 0xac7a(%rip), %rsi      # 0x15f86
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2050
jmp 0xb339
leaq 0xac8e(%rip), %rsi      # 0x15fb5
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 0xcd1c
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xb008(%rip), %xmm0     # 0x163c8
movups 0xaff1(%rip), %xmm1     # 0x163b8
movups 0xafda(%rip), %xmm2     # 0x163a8
movups 0xafc3(%rip), %xmm3     # 0x16398
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 0xb479
cmpl %edx, %r12d
jl 0xb42b
addl %edx, %esi
cmpl %esi, %r12d
jg 0xb42b
cmpl %eax, %ebp
jl 0xb42b
addl %eax, %ecx
cmpl %ecx, %ebp
jg 0xb42b
movl $0x3e, %edx
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x20e0
movq %r13, %rdi
leaq 0xaba4(%rip), %rsi      # 0x15fd9
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 0xcd1c
movups 0xaf64(%rip), %xmm0     # 0x163c8
movups 0xaf4d(%rip), %xmm1     # 0x163b8
movups 0xaf36(%rip), %xmm2     # 0x163a8
movups 0xaf1f(%rip), %xmm3     # 0x16398
addq $0x50, %r15
decq %rbx
jne 0xb3da
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x165d9(%rip), %rbx     # 0x21a80
movq (%rbx), %rax
movupd 0xf2e78(%rax), %xmm0
movups 0xf2e88(%rax), %xmm1
movups %xmm1, 0xf2ea8(%rax)
movupd %xmm0, 0xf2e98(%rax)
callq 0xfd28
mulsd 0xaf2b(%rip), %xmm0     # 0x16400
addsd 0xaf2b(%rip), %xmm0     # 0x16408
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movl %eax, 0xf2e78(%rcx)
callq 0xfd28
mulsd 0xaf19(%rip), %xmm0     # 0x16410
addsd 0xaf19(%rip), %xmm0     # 0x16418
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movl %eax, 0xf2e7c(%rcx)
callq 0xfd28
mulsd 0xaf07(%rip), %xmm0     # 0x16420
addsd 0xaedf(%rip), %xmm0     # 0x16400
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movl %eax, 0xf2e80(%rcx)
callq 0xfd28
mulsd 0xaeed(%rip), %xmm0     # 0x16428
addsd 0xaeed(%rip), %xmm0     # 0x16430
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movl %eax, 0xf2e84(%rcx)
callq 0xfd28
mulsd 0xaedb(%rip), %xmm0     # 0x16438
addsd 0xaedb(%rip), %xmm0     # 0x16440
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movl %eax, 0xf2e88(%rcx)
callq 0xfd28
mulsd 0xaec9(%rip), %xmm0     # 0x16448
addsd 0xaec9(%rip), %xmm0     # 0x16450
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movl %eax, 0xf2e8c(%rcx)
callq 0xfd28
mulsd 0xaeb7(%rip), %xmm0     # 0x16458
addsd 0xaeb7(%rip), %xmm0     # 0x16460
cvttsd2si %xmm0, %eax
movq (%rbx), %rcx
movl %eax, 0xf2e90(%rcx)
callq 0xfd28
mulsd 0xaea5(%rip), %xmm0     # 0x16468
addsd 0xaea5(%rip), %xmm0     # 0x16470
cvttsd2si %xmm0, %eax
movq (%rbx), %rdx
movl %eax, 0xf2e94(%rdx)
addq $0x100, %rdx            # imm = 0x100
leaq 0xae92(%rip), %rsi      # 0x16478
movq %rsp, %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2050
movq %rbx, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcd1c
addq $0x190, %rsp            # imm = 0x190
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x16459(%rip), %rax     # 0x21a80
movl $0x100, %edx            # imm = 0x100
addq (%rax), %rdx
leaq 0x72a0(%rip), %rsi      # 0x128d6
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2050
leaq 0xb0c4(%rip), %rbp      # 0x16710
leaq 0xaea0(%rip), %r14      # 0x164f3
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 0xb73b
movq %rax, %r12
leaq 0xb086(%rip), %rcx      # 0x16708
cmpq $0x7, %r13
ja 0xb696
movslq (%rbp), %rcx
leaq 0xb07d(%rip), %rax      # 0x16710
addq %rax, %rcx
leaq 0x163e3(%rip), %rax     # 0x21a80
movq (%rax), %rdx
movl 0xf2e78(%rdx,%r13,4), %r8d
movl %r8d, %eax
subl 0xf2e98(%rdx,%r13,4), %eax
leaq 0x8b1b(%rip), %r9       # 0x141d5
jns 0xb6c3
leaq 0x666d(%rip), %r9       # 0x11d30
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
incq %r13
addq $0x4, %rbp
cmpq $0x8, %r13
jne 0xb656
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 0xcd1c
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_O1/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 0xd89c
leaq 0xc0(%rbx), %rdx
leaq 0x160a8(%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 0xac2e(%rip), %rsi      # 0x1664f
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 0xcd1c
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0xc5b5
movl %edi, %ebp
movl $0x10, %edi
callq 0x22b0
testq %rax, %rax
je 0xc5c3
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 0xc5c8
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 0xc596
jmp 0xc5b7
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_O1/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 0xc610
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
je 0xc5f9
xorl %r14d, %r14d
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x3211
incq %r14
movl 0x8(%rbx), %eax
cmpq %rax, %r14
jb 0xc5e2
movq (%rbx), %rdi
callq 0x2240
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2240
retq
// File: /workspace/github_c_makefile_star2_O1/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 0xc670
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
cmpb $0x0, (%rsi)
je 0xc666
movq %rdi, %rbx
movl $0x1, %ebp
cmpl $0x0, 0x8(%rdi)
je 0xc663
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x3262
testl %eax, %eax
je 0xc661
incq %r15
movl 0x8(%rbx), %eax
cmpq %rax, %r15
jb 0xc641
jmp 0xc663
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_O1/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 0xca68
movq %rdx, %r14
testq %rdx, %rdx
je 0xca68
movq %rdi, %r15
xorl %ebx, %ebx
movsbl %sil, %ebp
xorl %r12d, %r12d
movl 0x8(%r15), %eax
cmpq %rax, %r12
jae 0xca68
movq (%r15), %rax
movq (%rax,%r12,8), %rdi
movl %ebp, %esi
callq 0x3734
testl %eax, %eax
jne 0xca63
incq %r12
cmpq %r12, %r14
jne 0xca3e
jmp 0xca68
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/Ziddykins[P]Dawn/src/network.c
// Function: init_msg_list
MsgList init_msg_list() {
    if(msgQ_singleton)
        return 0;
    struct msg_list * new_list;
    CALLEXIT(!(new_list = calloc(1, sizeof *new_list)))
    msgQ_singleton++;
    return new_list;
}

// Assembly:
pushq %rax
cmpb $0x0, 0x12831(%rip)     # 0x1f2c8
je 0xca9d
xorl %eax, %eax
jmp 0xcab8
movl $0x1, %edi
movl $0x20, %esi
callq 0x2110
testq %rax, %rax
je 0xcaba
movb $0x1, 0x12810(%rip)     # 0x1f2c8
popq %rcx
retq
callq 0x2d59
// File: /workspace/github_c_makefile_star2_O1/Ziddykins[P]Dawn/src/network.c
// Function: init_msg_hist_list
MsgHistoryList init_msg_hist_list() {
    if(msgHQ_singleton)
        return 0;
    struct msg_hist_list * new_list;
    CALLEXIT(!(new_list = calloc(1, sizeof *new_list)))
    msgHQ_singleton++;
    return new_list;
}

// Assembly:
pushq %rax
cmpb $0x0, 0x127fd(%rip)     # 0x1f2c4
je 0xcacd
xorl %eax, %eax
jmp 0xcae8
movl $0x1, %edi
movl $0x20, %esi
callq 0x2110
testq %rax, %rax
je 0xcaea
movb $0x1, 0x127dc(%rip)     # 0x1f2c4
popq %rcx
retq
callq 0x2d6e