// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xd0, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x190, %edi            # imm = 0x190
callq 0x22b0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x860c
leaq 0x1359b(%rip), %rdi     # 0x1bb98
callq 0x2190
movl $0x1, %edi
callq 0x2260
leaq -0xb4(%rbp), %rdi
xorl %esi, %esi
movl $0x9c, %edx
callq 0x20f0
leaq 0x135bd(%rip), %rdi     # 0x1bbe3
callq 0x2330
movq -0x10(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
leaq 0x135ae(%rip), %rsi     # 0x1bbeb
callq 0x13090
cmpl $0x0, %eax
je 0x87a3
leaq 0x135b0(%rip), %rdi     # 0x1bc02
callq 0x2330
leaq 0x1ec72(%rip), %rdi     # 0x272d0
addq $0x190, %rdi            # imm = 0x190
callq 0x13ba0
movl %eax, -0x4(%rbp)
cmpl $-0x1, -0x4(%rbp)
jne 0x86c9
leaq 0x13596(%rip), %rdi     # 0x1bc10
callq 0x2330
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
addq $0xc0, %rcx
movl $0x190, %esi            # imm = 0x190
leaq 0x13580(%rip), %rdx     # 0x1bc1a
movb $0x0, %al
callq 0x2390
movq -0x18(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20c0
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
callq 0x12840
jmp 0x87ac
leaq 0x13565(%rip), %rdi     # 0x1bc35
callq 0x2330
leaq 0x1355e(%rip), %rdi     # 0x1bc3a
leaq 0x1ebed(%rip), %rdx     # 0x272d0
movq %rdx, %rsi
addq $0x190, %rsi            # imm = 0x190
addq $0x320, %rdx            # imm = 0x320
movb $0x0, %al
callq 0x2040
leaq 0x1ebce(%rip), %rdi     # 0x272d0
addq $0x320, %rdi            # imm = 0x320
callq 0x2360
movl %eax, -0xb8(%rbp)
leaq 0x20355(%rip), %rax     # 0x28a70
movq (%rax), %rdi
addq $0x1a0, %rdi            # imm = 0x1A0
movslq -0x4(%rbp), %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
addq %rax, %rdi
addq $0x190, %rdi            # imm = 0x190
movslq -0xb8(%rbp), %rax
imulq $0x9c, %rax, %rax
addq %rax, %rdi
leaq -0xb4(%rbp), %rsi
movl $0x9c, %edx
callq 0x2170
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rcx
addq $0xc0, %rcx
movl $0x190, %esi            # imm = 0x190
leaq 0x134d4(%rip), %rdx     # 0x1bc4b
movb $0x0, %al
callq 0x2390
movq -0x18(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20c0
movq -0xc8(%rbp), %rdi
movq %rax, %rsi
callq 0x12840
jmp 0x87a3
movq -0x18(%rbp), %rdi
callq 0x2240
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)