// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0xc(%rbp), %rcx
imulq $0x26a8, %rcx, %rcx     # imm = 0x26A8
addq %rcx, %rax
movl 0x25e4(%rax), %eax
movl %eax, -0x1a4(%rbp)
movq -0x8(%rbp), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0xc(%rbp), %rcx
imulq $0x26a8, %rcx, %rcx     # imm = 0x26A8
addq %rcx, %rax
movl 0x25e8(%rax), %eax
movl %eax, -0x1a8(%rbp)
movl $0x0, -0x1ac(%rbp)
cmpl $0x40, -0x1ac(%rbp)
jge 0xf649
movq -0x8(%rbp), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0xc(%rbp), %rcx
imulq $0x26a8, %rcx, %rcx     # imm = 0x26A8
addq %rcx, %rax
addq $0x119c, %rax           # imm = 0x119C
movslq -0x1ac(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movl 0x40(%rax), %eax
movl %eax, -0x1b0(%rbp)
movq -0x8(%rbp), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0xc(%rbp), %rcx
imulq $0x26a8, %rcx, %rcx     # imm = 0x26A8
addq %rcx, %rax
addq $0x119c, %rax           # imm = 0x119C
movslq -0x1ac(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movl 0x4c(%rax), %eax
addl -0x1b0(%rbp), %eax
movl %eax, -0x1b4(%rbp)
movq -0x8(%rbp), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0xc(%rbp), %rcx
imulq $0x26a8, %rcx, %rcx     # imm = 0x26A8
addq %rcx, %rax
addq $0x119c, %rax           # imm = 0x119C
movslq -0x1ac(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movl 0x44(%rax), %eax
movl %eax, -0x1b8(%rbp)
movq -0x8(%rbp), %rax
addq $0x1a0, %rax            # imm = 0x1A0
movslq -0xc(%rbp), %rcx
imulq $0x26a8, %rcx, %rcx     # imm = 0x26A8
addq %rcx, %rax
addq $0x119c, %rax           # imm = 0x119C
movslq -0x1ac(%rbp), %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movl 0x48(%rax), %eax
addl -0x1b8(%rbp), %eax
movl %eax, -0x1bc(%rbp)
leaq -0x200(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x20f0
leaq -0x200(%rbp), %rdi
leaq 0xfbb9(%rip), %rsi      # 0x1f0eb
movl $0x40, %edx
callq 0x20e0
cmpl $0x0, -0x1a4(%rbp)
jne 0xf553
cmpl $0x0, -0x1a8(%rbp)
jne 0xf553
jmp 0xf635
movl -0x1a4(%rbp), %eax
cmpl -0x1b0(%rbp), %eax
jl 0xf5cc
movl -0x1a4(%rbp), %eax
cmpl -0x1b4(%rbp), %eax
jg 0xf5cc
movl -0x1a8(%rbp), %eax
cmpl -0x1b8(%rbp), %eax
jl 0xf5ca
movl -0x1a8(%rbp), %eax
cmpl -0x1bc(%rbp), %eax
jg 0xf5ca
leaq -0x200(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x1a0, %rsi            # imm = 0x1A0
movslq -0xc(%rbp), %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
addq %rax, %rsi
addq $0x119c, %rsi           # imm = 0x119C
movslq -0x1ac(%rbp), %rax
imulq $0x50, %rax, %rax
addq %rax, %rsi
movl $0x3e, %edx
callq 0x20e0
jmp 0xf5cc
leaq -0x1a0(%rbp), %rdi
movq -0x8(%rbp), %rdx
addq $0x100, %rdx            # imm = 0x100
movq -0x8(%rbp), %rcx
addq $0x1a0, %rcx            # imm = 0x1A0
movslq -0xc(%rbp), %rax
imulq $0x26a8, %rax, %rax     # imm = 0x26A8
addq %rax, %rcx
leaq -0x200(%rbp), %r8
leaq 0xfaf9(%rip), %rsi      # 0x1f0fe
movb $0x0, %al
callq 0x2050
leaq -0x1a0(%rbp), %rax
movq %rax, -0x208(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x20c0
movq -0x208(%rbp), %rdi
movq %rax, %rsi
callq 0x12840
movl -0x1ac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1ac(%rbp)
jmp 0xf424
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
nopw %cs:(%rax,%rax)