LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x190, %edi            # imm = 0x190
callq 0x22b0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x71e9
leaq 0x151f1(%rip), %rdi     # 0x1c3cb
callq 0x2190
movl $0x1, %edi
callq 0x2260
movq -0x10(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
leaq 0x1521b(%rip), %rsi     # 0x1c416
callq 0x13090
cmpl $0x0, %eax
je 0x733f
movl -0x4(%rbp), %eax
movl %eax, -0x28(%rbp)
leaq 0x200ba(%rip), %rdi     # 0x272d0
addq $0x190, %rdi            # imm = 0x190
callq 0x2360
movl -0x28(%rbp), %edi
movl %eax, %esi
callq 0x9bd0
cmpl $0x0, %eax
je 0x7243
leaq -0x24(%rbp), %rdi
leaq 0x151ef(%rip), %rsi     # 0x1c42b
callq 0x21c0
jmp 0x7253
leaq -0x24(%rbp), %rdi
leaq 0x151df(%rip), %rsi     # 0x1c42d
callq 0x21c0
movl -0x4(%rbp), %eax
movl %eax, -0x5c(%rbp)
leaq 0x20070(%rip), %rdi     # 0x272d0
addq $0x190, %rdi            # imm = 0x190
callq 0x2360
movl -0x5c(%rbp), %edi
movl %eax, %esi
callq 0x9b80
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq 0x217eb(%rip), %rax     # 0x28a70
movq (%rax), %rax
addq $0x100, %rax            # imm = 0x100
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x24(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq 0x217c7(%rip), %rax     # 0x28a70
movq (%rax), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0x4(%rbp), %rcx
imulq $0x26a8, %rcx, %rcx     # imm = 0x26A8
addq %rcx, %rax
addq $0x190, %rax            # imm = 0x190
movq %rax, -0x38(%rbp)
leaq 0x1ffff(%rip), %rdi     # 0x272d0
addq $0x190, %rdi            # imm = 0x190
callq 0x2360
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %r8
movq -0x40(%rbp), %r9
movl %eax, %edx
movq -0x38(%rbp), %rax
movslq %edx, %rdx
imulq $0x9c, %rdx, %rdx
addq %rdx, %rax
movl $0x190, %esi            # imm = 0x190
leaq 0x1512b(%rip), %rdx     # 0x1c437
movq %rax, (%rsp)
movb $0x0, %al
callq 0x2390
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20c0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x12840
movq -0x18(%rbp), %rdi
callq 0x2240
jmp 0x7348
movq -0x10(%rbp), %rdi
callq 0x9c70
movq -0x18(%rbp), %rdi
callq 0x2240
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
leaq 0x14cc4(%rip), %rsi     # 0x1c215
callq 0x13090
cmpl $0x0, %eax
je 0x759a
leaq 0x1fd6e(%rip), %rdi     # 0x272d0
addq $0x320, %rdi            # imm = 0x320
leaq -0x18(%rbp), %rsi
movl $0xa, %edx
callq 0x22e0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rcx
xorl %esi, %esi
leaq 0x1fd44(%rip), %rdx     # 0x272d0
addq $0x190, %rdx            # imm = 0x190
callq 0x10060
jmp 0x75ff
movq -0x10(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
leaq 0x14c85(%rip), %rsi     # 0x1c231
callq 0x13090
cmpl $0x0, %eax
je 0x75f8
leaq 0x1fd13(%rip), %rdi     # 0x272d0
addq $0x320, %rdi            # imm = 0x320
leaq -0x28(%rbp), %rsi
movl $0xa, %edx
callq 0x22e0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rcx
movl $0x1, %esi
leaq 0x1fce6(%rip), %rdx     # 0x272d0
addq $0x190, %rdx            # imm = 0x190
callq 0x10060
jmp 0x75fd
callq 0xfdd0
jmp 0x75ff
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
leaq 0x144a4(%rip), %rsi     # 0x1bb35
callq 0x13090
cmpl $0x0, %eax
je 0x7753
leaq 0x213ca(%rip), %rax     # 0x28a70
movq (%rax), %rsi
leaq 0x1fc20(%rip), %rdi     # 0x272d0
addq $0x190, %rdi            # imm = 0x190
callq 0x22d0
cmpl $0x0, %eax
jne 0x76fe
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x1fc00(%rip), %rdi     # 0x272d0
addq $0x190, %rdi            # imm = 0x190
callq 0x12d60
movq -0x18(%rbp), %rdi
movq %rax, %rsi
leaq 0x1eb72(%rip), %rax     # 0x2625c
movl (%rax), %eax
movl %eax, %edx
callq 0x20e0
movq -0x10(%rbp), %rdi
callq 0x14300
jmp 0x775c
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x1fbc3(%rip), %rdi     # 0x272d0
addq $0x190, %rdi            # imm = 0x190
callq 0x12d60
movq -0x20(%rbp), %rdi
movq %rax, %rsi
leaq 0x1eb35(%rip), %rax     # 0x2625c
movl (%rax), %eax
movl %eax, %edx
callq 0x20e0
leaq 0x1fb99(%rip), %rdi     # 0x272d0
addq $0x190, %rdi            # imm = 0x190
callq 0x13ba0
cmpl $-0x1, %eax
je 0x7751
movq -0x10(%rbp), %rdi
callq 0x14300
jmp 0x775c
movq -0x10(%rbp), %rdi
callq 0x14300
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x190, %edi            # imm = 0x190
callq 0x22b0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x7bc9
leaq 0x14e22(%rip), %rdi     # 0x1c9dc
callq 0x2190
movl $0x1, %edi
callq 0x2260
leaq 0x20ea0(%rip), %rax     # 0x28a70
movq (%rax), %rax
cmpl $0x1, 0x14c(%rax)
jne 0x7c27
movq -0x18(%rbp), %rdi
leaq 0x20e89(%rip), %rax     # 0x28a70
movq (%rax), %rcx
addq $0x100, %rcx            # imm = 0x100
movq -0x10(%rbp), %r8
movl $0x190, %esi            # imm = 0x190
leaq 0x14e26(%rip), %rdx     # 0x1ca27
movb $0x0, %al
callq 0x2390
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20c0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0x12840
jmp 0x7c6c
movq -0x18(%rbp), %rdi
leaq 0x20e3e(%rip), %rax     # 0x28a70
movq (%rax), %rcx
addq $0x100, %rcx            # imm = 0x100
movl $0x190, %esi            # imm = 0x190
leaq 0x14e24(%rip), %rdx     # 0x1ca6c
movb $0x0, %al
callq 0x2390
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20c0
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x12840
movq -0x18(%rbp), %rdi
callq 0x2240
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x190, %edi            # imm = 0x190
callq 0x22b0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x7d49
leaq 0x14bcd(%rip), %rdi     # 0x1c907
callq 0x2190
movl $0x1, %edi
callq 0x2260
movq -0x18(%rbp), %rdi
leaq 0x20d1c(%rip), %rax     # 0x28a70
movq %rax, -0x28(%rbp)
movq (%rax), %rcx
addq $0x100, %rcx            # imm = 0x100
movq -0x10(%rbp), %r8
leaq 0x14be5(%rip), %rdx     # 0x1c952
xorl %eax, %eax
movl $0x190, %esi            # imm = 0x190
callq 0x2390
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl 0x14c(%rax), %eax
movl %eax, -0x1c(%rbp)
testl %eax, %eax
je 0x7da3
jmp 0x7d8f
movl -0x1c(%rbp), %eax
subl $0x1, %eax
je 0x7db5
jmp 0x7d99
movl -0x1c(%rbp), %eax
subl $0x2, %eax
je 0x7dc7
jmp 0x7dd9
movq -0x18(%rbp), %rdi
leaq 0x14bcd(%rip), %rsi     # 0x1c97b
callq 0x2400
jmp 0x7de9
movq -0x18(%rbp), %rdi
leaq 0x14bcd(%rip), %rsi     # 0x1c98d
callq 0x2400
jmp 0x7de9
movq -0x18(%rbp), %rdi
leaq 0x14bca(%rip), %rsi     # 0x1c99c
callq 0x2400
jmp 0x7de9
movq -0x18(%rbp), %rdi
leaq 0x14be3(%rip), %rsi     # 0x1c9c7
callq 0x2400
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20c0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x12840
movq -0x18(%rbp), %rdi
callq 0x2240
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
leaq 0x144e0(%rip), %rsi     # 0x1c3a1
callq 0x13090
cmpl $0x0, %eax
je 0x7f0f
leaq 0x1f3fe(%rip), %rdi     # 0x272d0
addq $0x190, %rdi            # imm = 0x190
callq 0x2360
movslq %eax, %rcx
leaq 0x20b88(%rip), %rax     # 0x28a70
movq (%rax), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0x4(%rbp), %rdx
imulq $0x26a8, %rdx, %rdx     # imm = 0x26A8
addq %rdx, %rax
addq 0x2648(%rax), %rcx
movq %rcx, 0x2648(%rax)
jmp 0x7f6c
movq -0x10(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
leaq 0x14496(%rip), %rsi     # 0x1c3b7
callq 0x13090
cmpl $0x0, %eax
je 0x7f6a
leaq 0x1f39e(%rip), %rdi     # 0x272d0
addq $0x190, %rdi            # imm = 0x190
callq 0x2360
movl %eax, %ecx
leaq 0x20b29(%rip), %rax     # 0x28a70
movq (%rax), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0x4(%rbp), %rdx
imulq $0x26a8, %rdx, %rdx     # imm = 0x26A8
addq %rdx, %rax
addl 0x2698(%rax), %ecx
movl %ecx, 0x2698(%rax)
jmp 0x7f6c
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x940, %rsp            # imm = 0x940
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
leaq 0x13c47(%rip), %rsi     # 0x1bbeb
callq 0x13090
cmpl $0x0, %eax
je 0x8130
leaq 0x1e2a3(%rip), %rax     # 0x2625c
movl (%rax), %eax
movl %eax, %edi
movl $0x1, %esi
callq 0x2110
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x7fe7
leaq 0x13cce(%rip), %rdi     # 0x1bca6
callq 0x2190
movl $0x1, %edi
callq 0x2260
leaq 0x1f2e2(%rip), %rdi     # 0x272d0
addq $0x320, %rdi            # imm = 0x320
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x22c0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x938(%rbp)
leaq 0x1f2b7(%rip), %rdi     # 0x272d0
addq $0x190, %rdi            # imm = 0x190
callq 0x12d60
movq -0x938(%rbp), %rdi
movq %rax, %rsi
leaq 0x1e226(%rip), %rax     # 0x2625c
movl (%rax), %eax
movl %eax, %edx
callq 0x20e0
movq -0x18(%rbp), %rdi
callq 0x13ba0
movl %eax, -0x24(%rbp)
movq -0x30(%rbp), %rcx
leaq 0x20a1a(%rip), %rax     # 0x28a70
movq (%rax), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0x24(%rbp), %rdx
imulq $0x26a8, %rdx, %rdx     # imm = 0x26A8
addq %rdx, %rax
addq 0x2658(%rax), %rcx
movq %rcx, 0x2658(%rax)
cmpl $-0x1, -0x24(%rbp)
jne 0x8086
jmp 0x8130
jmp 0x8088
leaq 0x209e1(%rip), %rax     # 0x28a70
movq (%rax), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0x24(%rbp), %rcx
imulq $0x26a8, %rcx, %rcx     # imm = 0x26A8
addq %rcx, %rax
movq 0x2658(%rax), %rax
movq %rax, -0x940(%rbp)
movq -0x18(%rbp), %rdi
callq 0x14260
movq %rax, %rcx
movq -0x940(%rbp), %rax
cmpq %rcx, %rax
jbe 0x8127
leaq -0x930(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq 0x1e17e(%rip), %rax     # 0x2625c
movl (%rax), %eax
movl %eax, %edx
callq 0x20e0
leaq -0x930(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x20974(%rip), %rax     # 0x28a70
movq (%rax), %rsi
addq $0x100, %rsi            # imm = 0x100
leaq 0x1e14b(%rip), %rax     # 0x26258
movl (%rax), %eax
movl %eax, %edx
callq 0x20e0
leaq -0x930(%rbp), %rdi
callq 0x14950
jmp 0x8088
movq -0x18(%rbp), %rdi
callq 0x2240
addq $0x940, %rsp            # imm = 0x940
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x190, %edi            # imm = 0x190
callq 0x22b0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x8179
leaq 0x140e2(%rip), %rdi     # 0x1c24c
callq 0x2190
movl $0x1, %edi
callq 0x2260
callq 0x13b40
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
addq $0xc0, %rcx
movl $0x190, %esi            # imm = 0x190
leaq 0x140fe(%rip), %rdx     # 0x1c297
movb $0x0, %al
callq 0x2390
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20c0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0x12840
movq -0x18(%rbp), %rdi
callq 0x2240
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x190, %edi            # imm = 0x190
callq 0x22b0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x84d9
leaq 0x13620(%rip), %rdi     # 0x1baea
callq 0x2190
movl $0x1, %edi
callq 0x2260
movq -0x10(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
leaq 0x1364a(%rip), %rsi     # 0x1bb35
callq 0x13090
cmpl $0x0, %eax
je 0x856e
leaq 0x20574(%rip), %rax     # 0x28a70
movq (%rax), %rsi
leaq 0x1edca(%rip), %rdi     # 0x272d0
addq $0x190, %rdi            # imm = 0x190
callq 0x2200
cmpl $0x0, %eax
jne 0x8527
leaq 0x1dd92(%rip), %rax     # 0x262b0
movl (%rax), %edi
callq 0x125c0
jmp 0x856c
movq -0x18(%rbp), %rdi
leaq 0x2053e(%rip), %rax     # 0x28a70
movq (%rax), %rcx
addq $0x100, %rcx            # imm = 0x100
movl $0x190, %esi            # imm = 0x190
leaq 0x135fd(%rip), %rdx     # 0x1bb45
movb $0x0, %al
callq 0x2390
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20c0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0x12840
jmp 0x85b3
movq -0x18(%rbp), %rdi
leaq 0x204f7(%rip), %rax     # 0x28a70
movq (%rax), %rcx
addq $0x100, %rcx            # imm = 0x100
movl $0x190, %esi            # imm = 0x190
leaq 0x135d4(%rip), %rdx     # 0x1bb63
movb $0x0, %al
callq 0x2390
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20c0
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x12840
movq -0x18(%rbp), %rdi
callq 0x2240
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
callq 0x2080
movl $0x3, %ecx
cltd
idivl %ecx
movl %edx, -0x4(%rbp)
movl -0x4(%rbp), %eax
leaq 0x1f67b(%rip), %rcx     # 0x28a70
movq (%rcx), %rcx
cmpl 0x14c(%rcx), %eax
jne 0x9412
callq 0x2080
movl $0x3, %ecx
cltd
idivl %ecx
movl %edx, -0x4(%rbp)
jmp 0x93eb
movl -0x4(%rbp), %eax
movl %eax, -0x1a4(%rbp)
testl %eax, %eax
je 0x9442
jmp 0x9421
movl -0x1a4(%rbp), %eax
subl $0x1, %eax
je 0x9492
jmp 0x942e
movl -0x1a4(%rbp), %eax
subl $0x2, %eax
je 0x94ce
jmp 0x950a
leaq -0x1a0(%rbp), %rdi
leaq 0x1f620(%rip), %rax     # 0x28a70
movq (%rax), %rdx
addq $0x100, %rdx            # imm = 0x100
leaq 0x1f60f(%rip), %rax     # 0x28a70
movq (%rax), %rcx
addq $0x100, %rcx            # imm = 0x100
leaq 0x13681(%rip), %rsi     # 0x1caf3
movb $0x0, %al
callq 0x2050
leaq 0x1f5f0(%rip), %rax     # 0x28a70
movq (%rax), %rax
movl $0x0, 0x14c(%rax)
jmp 0x9516
leaq -0x1a0(%rbp), %rdi
leaq 0x1f5d0(%rip), %rax     # 0x28a70
movq (%rax), %rdx
addq $0x100, %rdx            # imm = 0x100
leaq 0x13691(%rip), %rsi     # 0x1cb42
movb $0x0, %al
callq 0x2050
leaq 0x1f5b1(%rip), %rax     # 0x28a70
movq (%rax), %rax
movl $0x1, 0x14c(%rax)
jmp 0x9516
leaq -0x1a0(%rbp), %rdi
leaq 0x1f594(%rip), %rax     # 0x28a70
movq (%rax), %rdx
addq $0x100, %rdx            # imm = 0x100
leaq 0x136c6(%rip), %rsi     # 0x1cbb3
movb $0x0, %al
callq 0x2050
leaq 0x1f575(%rip), %rax     # 0x28a70
movq (%rax), %rax
movl $0x2, 0x14c(%rax)
jmp 0x9516
leaq 0x136da(%rip), %rdi     # 0x1cbeb
callq 0x2190
leaq -0x1a0(%rbp), %rax
movq %rax, -0x1b0(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x20c0
movq -0x1b0(%rbp), %rdi
movq %rax, %rsi
callq 0x12840
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x910, %rsp            # imm = 0x910
movl %edi, -0x4(%rbp)
cmpl $-0x1, -0x4(%rbp)
jne 0x9618
movl $0x0, -0x908(%rbp)
movl -0x908(%rbp), %eax
leaq 0x1f4f1(%rip), %rcx     # 0x28a70
movq (%rcx), %rcx
cmpl 0x148(%rcx), %eax
jge 0x9616
leaq -0x904(%rbp), %rdi
leaq 0x1f4d4(%rip), %rax     # 0x28a70
movq (%rax), %rsi
addq $0x1a0, %rsi            # imm = 0x1A0
movslq -0x908(%rbp), %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
addq %rax, %rsi
leaq 0x1cc9e(%rip), %rax     # 0x2625c
movl (%rax), %eax
movl %eax, %edx
callq 0x20e0
leaq -0x904(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x1f494(%rip), %rax     # 0x28a70
movq (%rax), %rsi
addq $0x100, %rsi            # imm = 0x100
leaq 0x1cc6b(%rip), %rax     # 0x26258
movl (%rax), %eax
movl %eax, %edx
callq 0x20e0
leaq -0x904(%rbp), %rdi
callq 0x4590
movl -0x908(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x908(%rbp)
jmp 0x9572
jmp 0x9689
leaq -0x904(%rbp), %rdi
leaq 0x1f44a(%rip), %rax     # 0x28a70
movq (%rax), %rsi
addq $0x1a0, %rsi            # imm = 0x1A0
movslq -0x4(%rbp), %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
addq %rax, %rsi
leaq 0x1cc17(%rip), %rax     # 0x2625c
movl (%rax), %eax
movl %eax, %edx
callq 0x20e0
leaq -0x904(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x1f40d(%rip), %rax     # 0x28a70
movq (%rax), %rsi
addq $0x100, %rsi            # imm = 0x100
leaq 0x1cbe4(%rip), %rax     # 0x26258
movl (%rax), %eax
movl %eax, %edx
callq 0x20e0
leaq -0x904(%rbp), %rdi
callq 0x4590
addq $0x910, %rsp            # imm = 0x910
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
leaq 0x1f3b7(%rip), %rcx     # 0x28a70
movq (%rcx), %rcx
cmpl 0x148(%rcx), %eax
jge 0x9729
leaq 0x1f3a5(%rip), %rax     # 0x28a70
movq (%rax), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0x4(%rbp), %rcx
imulq $0x26a8, %rcx, %rcx     # imm = 0x26A8
addq %rcx, %rax
cmpq $0x32, 0x2648(%rax)
jg 0x96ee
jmp 0x971e
callq 0x2080
movl $0xafc8, %ecx           # imm = 0xAFC8
cltd
idivl %ecx
movslq %edx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
leaq 0x1f363(%rip), %rax     # 0x28a70
movq (%rax), %rax
addq 0x150(%rax), %rcx
movq %rcx, 0x150(%rax)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x96af
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
callq 0x2080
leaq 0x1f329(%rip), %rcx     # 0x28a70
movq (%rcx), %rcx
cltd
idivl 0x148(%rcx)
movl %edx, -0x194(%rbp)
leaq 0x1f312(%rip), %rax     # 0x28a70
movq (%rax), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0x194(%rbp), %rcx
imulq $0x26a8, %rcx, %rcx     # imm = 0x26A8
addq %rcx, %rax
cmpl $0x1, 0x2664(%rax)
je 0x979f
callq 0x2080
leaq 0x1f2e3(%rip), %rcx     # 0x28a70
movq (%rcx), %rcx
cltd
idivl 0x148(%rcx)
movl %edx, -0x194(%rbp)
jmp 0x9757
leaq 0x1f2ca(%rip), %rax     # 0x28a70
movq (%rax), %rax
movq 0x150(%rax), %rcx
leaq 0x1f2b9(%rip), %rax     # 0x28a70
movq (%rax), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0x194(%rbp), %rdx
imulq $0x26a8, %rdx, %rdx     # imm = 0x26A8
addq %rdx, %rax
addq 0x2648(%rax), %rcx
movq %rcx, 0x2648(%rax)
leaq -0x190(%rbp), %rdi
leaq 0x1f283(%rip), %rax     # 0x28a70
movq (%rax), %rcx
addq $0x100, %rcx            # imm = 0x100
leaq 0x1f272(%rip), %rax     # 0x28a70
movq (%rax), %r8
addq $0x1a0, %r8             # imm = 0x1A0
movslq -0x194(%rbp), %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
addq %rax, %r8
leaq 0x1f250(%rip), %rax     # 0x28a70
movq (%rax), %rax
movq 0x150(%rax), %r9
movl $0x190, %esi            # imm = 0x190
leaq 0x133ea(%rip), %rdx     # 0x1cc20
movb $0x0, %al
callq 0x2390
leaq 0x1f22c(%rip), %rax     # 0x28a70
movq (%rax), %rax
movq $0x0, 0x150(%rax)
leaq -0x190(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x20c0
movq -0x1a0(%rbp), %rdi
movq %rax, %rsi
callq 0x12840
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Ziddykins[P]Dawn/src/events.c
// Function: gift_user
static void gift_user (void) {
    char out[MAX_MESSAGE_BUFFER];
    int player = rand() % dawn->player_count;

    while (dawn->players[player].available != 1 
            || strcmp(dawn->players[player].username, dawn->nickname) == 0) {
        player = rand() % dawn->player_count;
    }

    sprintf(out, "PRIVMSG %s :%s was generous enough to pass along the good luck to %s! +%ld gold\r\n",
            dawn->active_room, dawn->nickname, dawn->players[player].username, dawn->players[0].gold);

    dawn->players[player].gold += dawn->players[0].gold;
    dawn->players[0].gold = 0;
    add_msg(out, strlen(out));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
callq 0x2080
leaq 0x1f1c9(%rip), %rcx     # 0x28a70
movq (%rcx), %rcx
cltd
idivl 0x148(%rcx)
movl %edx, -0x194(%rbp)
leaq 0x1f1b2(%rip), %rax     # 0x28a70
movq (%rax), %rcx
addq $0x1a0, %rcx            # imm = 0x1A0
movslq -0x194(%rbp), %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
addq %rax, %rcx
movb $0x1, %al
cmpl $0x1, 0x2664(%rcx)
movb %al, -0x195(%rbp)
jne 0x9927
leaq 0x1f17f(%rip), %rax     # 0x28a70
movq (%rax), %rdi
addq $0x1a0, %rdi            # imm = 0x1A0
movslq -0x194(%rbp), %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
addq %rax, %rdi
leaq 0x1f15d(%rip), %rax     # 0x28a70
movq (%rax), %rsi
callq 0x22d0
cmpl $0x0, %eax
sete %al
movb %al, -0x195(%rbp)
movb -0x195(%rbp), %al
testb $0x1, %al
jne 0x9933
jmp 0x9954
callq 0x2080
leaq 0x1f131(%rip), %rcx     # 0x28a70
movq (%rcx), %rcx
cltd
idivl 0x148(%rcx)
movl %edx, -0x194(%rbp)
jmp 0x98b7
leaq -0x190(%rbp), %rdi
leaq 0x1f10e(%rip), %rax     # 0x28a70
movq (%rax), %rdx
addq $0x100, %rdx            # imm = 0x100
leaq 0x1f0fd(%rip), %rax     # 0x28a70
movq (%rax), %rcx
leaq 0x1f0f3(%rip), %rax     # 0x28a70
movq (%rax), %r8
addq $0x1a0, %r8             # imm = 0x1A0
movslq -0x194(%rbp), %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
addq %rax, %r8
leaq 0x1f0d1(%rip), %rax     # 0x28a70
movq (%rax), %rax
movq 0x27e8(%rax), %r9
leaq 0x134be(%rip), %rsi     # 0x1ce6e
movb $0x0, %al
callq 0x2050
leaq 0x1f0b2(%rip), %rax     # 0x28a70
movq (%rax), %rax
movq 0x27e8(%rax), %rcx
leaq 0x1f0a1(%rip), %rax     # 0x28a70
movq (%rax), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0x194(%rbp), %rdx
imulq $0x26a8, %rdx, %rdx     # imm = 0x26A8
addq %rdx, %rax
addq 0x2648(%rax), %rcx
movq %rcx, 0x2648(%rax)
leaq 0x1f072(%rip), %rax     # 0x28a70
movq (%rax), %rax
movq $0x0, 0x27e8(%rax)
leaq -0x190(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x20c0
movq -0x1a0(%rbp), %rdi
movq %rax, %rsi
callq 0x12840
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rsi
leaq 0x10f29(%rip), %rdi     # 0x1de33
movb $0x0, %al
callq 0x2040
leaq 0x10f47(%rip), %rdi     # 0x1de5f
movb $0x0, %al
callq 0x2040
leaq 0x10f5f(%rip), %rdi     # 0x1de85
movb $0x0, %al
callq 0x2040
leaq 0x10f7c(%rip), %rdi     # 0x1deb0
movb $0x0, %al
callq 0x2040
leaq 0x10fb2(%rip), %rdi     # 0x1def4
movb $0x0, %al
callq 0x2040
leaq 0x10fdd(%rip), %rdi     # 0x1df2d
movb $0x0, %al
callq 0x2040
leaq 0x11019(%rip), %rdi     # 0x1df77
movb $0x0, %al
callq 0x2040
leaq 0x11061(%rip), %rdi     # 0x1dfcd
movb $0x0, %al
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
xorl %eax, %eax
movl %eax, %edi
callq 0x21b0
movq %rax, -0x8(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x2140
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %r8d
movq -0x10(%rbp), %rax
movl (%rax), %r9d
leaq 0x192ba(%rip), %rdi     # 0x26280
leaq 0x11067(%rip), %rsi     # 0x1e034
movb $0x0, %al
callq 0x2050
leaq 0x192a5(%rip), %rax     # 0x26280
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Ziddykins[P]Dawn/src/map.c
// Function: entity_location
static inline struct Location entity_location(struct entity *ent) {
    int dim = global_map->dim;
    return (struct Location) {
            .x = (int) ((ent - global_map->m_ent) % dim),
            .y = (int) ((ent - global_map->m_ent) / dim)
    };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq 0x18751(%rip), %rax     # 0x26290
movl 0x20(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x18740(%rip), %rcx     # 0x26290
movq 0x8(%rcx), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movslq -0x14(%rbp), %rcx
cqto
idivq %rcx
movl %edx, %eax
movl %eax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq 0x1871c(%rip), %rcx     # 0x26290
movq 0x8(%rcx), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movslq -0x14(%rbp), %rcx
cqto
idivq %rcx
movl %eax, -0x4(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Ziddykins[P]Dawn/src/map.c
// Function: iter_to_dirflag
int iter_to_dirflag(int iter) {
    switch(iter) {
        case 0:
            return NORTH;
        case 1:
            return NORTH | EAST;
        case 2:
            return EAST;
        case 3:
            return EAST | SOUTH;
        case 4:
            return SOUTH;
        case 5:
            return SOUTH | WEST;
        case 6:
            return WEST;
        case 7:
            return WEST | NORTH;
        default:
            PRINTERR("INTERNAL PATHFINDING ERROR")
    }
    exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
movq %rax, -0x10(%rbp)
subq $0x7, %rax
ja 0xe6b4
movq -0x10(%rbp), %rax
leaq 0xfa3d(%rip), %rcx      # 0x1e0a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, -0x4(%rbp)
jmp 0xe6ca
movl $0x3, -0x4(%rbp)
jmp 0xe6ca
movl $0x2, -0x4(%rbp)
jmp 0xe6ca
movl $0x6, -0x4(%rbp)
jmp 0xe6ca
movl $0x4, -0x4(%rbp)
jmp 0xe6ca
movl $0xc, -0x4(%rbp)
jmp 0xe6ca
movl $0x8, -0x4(%rbp)
jmp 0xe6ca
movl $0x9, -0x4(%rbp)
jmp 0xe6ca
leaq 0x1079e(%rip), %rdi     # 0x1ee59
callq 0x2190
movl $0x1, %edi
callq 0x2260
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x17741(%rip), %rax     # 0x26290
movq (%rax), %rdi
callq 0x2240
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
movq 0x17728(%rip), %rcx     # 0x26290
cmpl 0x18(%rcx), %eax
jge 0xeb97
movq 0x1771c(%rip), %rax     # 0x26290
movq 0x10(%rax), %rax
movslq -0x4(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rdi
callq 0x2240
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xeb5e
movq 0x176f2(%rip), %rax     # 0x26290
movq 0x10(%rax), %rdi
callq 0x2240
movq 0x176e2(%rip), %rax     # 0x26290
movq 0x8(%rax), %rdi
callq 0x2240
movq 0x176d2(%rip), %rdi     # 0x26290
callq 0x2240
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movl %edi, -0x4(%rbp)
leaq -0x1a0(%rbp), %rdi
leaq 0x19e84(%rip), %rax     # 0x28a70
movq (%rax), %rdx
addq $0x100, %rdx            # imm = 0x100
leaq 0x19e73(%rip), %rax     # 0x28a70
movq (%rax), %rcx
addq $0x1a0, %rcx            # imm = 0x1A0
movslq -0x4(%rbp), %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
addq %rax, %rcx
leaq 0x19e54(%rip), %rax     # 0x28a70
movq (%rax), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0x4(%rbp), %rsi
imulq $0x26a8, %rsi, %rsi     # imm = 0x26A8
addq %rsi, %rax
movl 0x25ec(%rax), %r8d
leaq 0x19e2f(%rip), %rax     # 0x28a70
movq (%rax), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0x4(%rbp), %rsi
imulq $0x26a8, %rsi, %rsi     # imm = 0x26A8
addq %rsi, %rax
movl 0x25f0(%rax), %r9d
leaq 0x10230(%rip), %rsi     # 0x1ee96
movb $0x0, %al
callq 0x2050
leaq -0x1a0(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x20c0
movq -0x1a8(%rbp), %rdi
movq %rax, %rsi
callq 0x12840
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x13ba0
movl %eax, -0x1b4(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x13c20
movl %eax, -0x1b8(%rbp)
cmpl $-0x1, -0x1b8(%rbp)
je 0xf362
leaq -0x1b0(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0xc0, %rdx
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %r8
addq $0x1a0, %r8             # imm = 0x1A0
movslq -0x1b4(%rbp), %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
addq %rax, %r8
addq $0x119c, %r8            # imm = 0x119C
addq $0x1400, %r8            # imm = 0x1400
movq -0x8(%rbp), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0x1b4(%rbp), %rsi
imulq $0x26a8, %rsi, %rsi     # imm = 0x26A8
addq %rsi, %rax
addq $0x119c, %rax           # imm = 0x119C
movslq -0x1b8(%rbp), %rsi
imulq $0x50, %rsi, %rsi
addq %rsi, %rax
movl 0x40(%rax), %r9d
movq -0x8(%rbp), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0x1b4(%rbp), %rsi
imulq $0x26a8, %rsi, %rsi     # imm = 0x26A8
addq %rsi, %rax
addq $0x119c, %rax           # imm = 0x119C
movslq -0x1b8(%rbp), %rsi
imulq $0x50, %rsi, %rsi
addq %rsi, %rax
movl 0x44(%rax), %eax
leaq 0xfd42(%rip), %rsi      # 0x1f098
movl %eax, (%rsp)
movb $0x0, %al
callq 0x2050
jmp 0xf386
leaq -0x1b0(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0xc0, %rdx
movq -0x18(%rbp), %rcx
leaq 0xfd48(%rip), %rsi      # 0x1f0c7
movb $0x0, %al
callq 0x2050
leaq -0x1b0(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x20c0
movq -0x1c0(%rbp), %rdi
movq %rax, %rsi
callq 0x12840
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Ziddykins[P]Dawn/src/map.c
// Function: too_close_to_town
static inline int too_close_to_town(int x, int y) {
    for (int i = 0; i < global_map->town_count; i++) {
        if (global_map->towns[i].t_ent[0]) {
            struct Location t_pos = entity_location(global_map->towns[i].t_ent[0]);
            if (sqrt(((t_pos.x - x) * (t_pos.x - x)) + ((t_pos.y - y) * (t_pos.y - y))) <= 10) {
                return 1;
            }
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq 0x16bc1(%rip), %rcx     # 0x26290
cmpl 0x18(%rcx), %eax
jge 0xf773
movq 0x16bb1(%rip), %rax     # 0x26290
movq 0x10(%rax), %rax
movslq -0x10(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
cmpq $0x0, (%rax)
je 0xf763
movq 0x16b91(%rip), %rax     # 0x26290
movq 0x10(%rax), %rax
movslq -0x10(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rax
movq (%rax), %rdi
callq 0xdb30
movq %rax, -0x18(%rbp)
movl -0x18(%rbp), %eax
subl -0x8(%rbp), %eax
movl -0x18(%rbp), %ecx
subl -0x8(%rbp), %ecx
imull %ecx, %eax
movl -0x14(%rbp), %ecx
subl -0xc(%rbp), %ecx
movl -0x14(%rbp), %edx
subl -0xc(%rbp), %edx
imull %edx, %ecx
addl %ecx, %eax
cvtsi2sd %eax, %xmm0
callq 0x2150
movaps %xmm0, %xmm1
movsd 0xe926(%rip), %xmm0     # 0x1e078
ucomisd %xmm1, %xmm0
jb 0xf761
movl $0x1, -0x4(%rbp)
jmp 0xf77a
jmp 0xf763
jmp 0xf765
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xf6c5
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Ziddykins[P]Dawn/src/map.c
// Function: q_append
static inline void q_append(struct Location *q, size_t start, size_t *end, size_t len, struct Location elem) {
    q[*end].x = elem.x;
    q[*end].y = elem.y;
    (*end) = ((*end)+1)%len;
    assert(*end != start);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %r8, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl -0x8(%rbp), %edx
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movl %edx, (%rax,%rcx,8)
movl -0x4(%rbp), %edx
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movl %edx, 0x4(%rax,%rcx,8)
movq -0x20(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rdx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
je 0xf7f8
jmp 0xf817
leaq 0xfa3f(%rip), %rdi      # 0x1f23e
leaq 0xef55(%rip), %rsi      # 0x1e75b
movl $0x107, %edx            # imm = 0x107
leaq 0xfa3a(%rip), %rcx      # 0x1f24c
callq 0x2100
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Ziddykins[P]Dawn/src/map.c
// Function: q_pop
static inline struct Location* q_pop(struct Location *q, size_t *start, size_t end, size_t len) {
    assert(*start != end);
    struct Location *rop = &q[*start];
    *start = ((*start)+1)%len;
    return rop;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq -0x18(%rbp), %rax
je 0xf847
jmp 0xf866
leaq 0xfa4a(%rip), %rdi      # 0x1f298
leaq 0xef06(%rip), %rsi      # 0x1e75b
movl $0xfd, %edx
leaq 0xfa45(%rip), %rcx      # 0x1f2a6
callq 0x2100
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rdx, (%rax)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/Ziddykins[P]Dawn/src/map.c
// Function: rand_ent
static inline void rand_ent(struct entity * e) {
    //generate entity
    float probs[] = {
            0.0f,   //0% none
            0.0f,   //0% town
            0.6f, //60% reditential houses
            0.7f, //10% stables
            0.9f, //20% shops
            1.0f, //10% shrines
    };

    double rand_num = randd();
    int ent_type = 0;

    while(probs[ent_type] < rand_num) {
        ent_type++;
    }

    e->type = ent_type;

    switch(ent_type) {
        case ENT_TOWN:
            PRINTERR("Entity generation FATAL")
            exit(1);
        case ENT_RESIDENTIAL:

            break;
        case ENT_SHOP:

            break;
        case ENT_SHRINE:

            break;
        case ENT_STABLES:

            break;
        default:
            PRINTERR("Entity generation FATAL")
            exit(1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq 0xe82d(%rip), %rax      # 0x1e0e0
movq %rax, -0x20(%rbp)
movq 0xe82a(%rip), %rax      # 0x1e0e8
movq %rax, -0x18(%rbp)
movq 0xe827(%rip), %rax      # 0x1e0f0
movq %rax, -0x10(%rbp)
callq 0x181c0
movsd %xmm0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
movss -0x20(%rbp,%rax,4), %xmm0
cvtss2sd %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xf902
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xf8de
movl -0x2c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl -0x2c(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x4, %eax
ja 0xf94d
movq -0x38(%rbp), %rax
leaq 0xe79a(%rip), %rcx      # 0x1e0c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xf9b4(%rip), %rdi      # 0x1f2ea
callq 0x2190
movl $0x1, %edi
callq 0x2260
jmp 0xf963
jmp 0xf963
jmp 0xf963
jmp 0xf963
leaq 0xf9d0(%rip), %rdi      # 0x1f324
callq 0x2190
movl $0x1, %edi
callq 0x2260
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Ziddykins[P]Dawn/src/map.c
// Function: queue_overlap
static inline int queue_overlap(struct Location *q, size_t start, size_t end, size_t len, int x, int y) {
    for(size_t i = start; i != end; i = (i+1)%len) {
        if(q[i].x == x && q[i].y == y) {
            return 1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movl %r9d, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0xfa10
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movl (%rax,%rcx,8), %eax
cmpl -0x2c(%rbp), %eax
jne 0xf9f8
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
cmpl -0x30(%rbp), %eax
jne 0xf9f8
movl $0x1, -0x4(%rbp)
jmp 0xfa17
jmp 0xf9fa
movq -0x38(%rbp), %rax
addq $0x1, %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x28(%rbp)
movq %rdx, -0x38(%rbp)
jmp 0xf9c4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Ziddykins[P]Dawn/src/map.c
// Function: move_step
static inline void move_step(int *rop_x, int *rop_y, int x, int y, int dir) {
    *rop_x = x;
    *rop_y = y;

    if (dir & NORTH) {
        (*rop_y)--;
    } else if(dir & SOUTH) {
        (*rop_y)++;
    }

    if (dir & EAST) {
        (*rop_x)++;
    } else if (dir & WEST) {
        (*rop_x)--;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xfa60
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
jmp 0xfa78
movl -0x1c(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xfa76
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0xfa78
movl -0x1c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xfa90
movq -0x8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0xfaa8
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xfaa6
movq -0x8(%rbp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
jmp 0xfaa8
popq %rbp
retq
nopw (%rax,%rax)