// File: Leeingnyo[P]newPuyoC/./board.h
// Function: Board::IdleUpdate()
void IdleUpdate() {
        int sub_x = 0, sub_y = 0;
        if (bipuyo) {
            bipuyo->GetDirection(sub_x, sub_y);
        }
        if (gravity_t++ > GRAVITY_FRAME) {
            gravity_t = 0;
            if (bipuyo_y < (MAP_HEIGHT - 1) && map[bipuyo_y + 1][bipuyo_x].IsBlank() && bipuyo_y + sub_y < (MAP_HEIGHT - 1) && map[bipuyo_y + sub_y + 1][bipuyo_x + sub_x].IsBlank()) {
                bipuyo_y++;
            }
            else {
                map[bipuyo_y][bipuyo_x] = Puyo(bipuyo->GetMain());
                if (bipuyo_y + sub_y >= 0)
                    map[bipuyo_y + sub_y][bipuyo_x + sub_x] = Puyo(bipuyo->GetSub());
                bipuyo.reset();
                state = State::DROP;
            }
        }
        if (rotate_t > ROTATE_FRAME) {
            rotate_t = 0;
        }
        else if (rotate_t > 0) {
            rotate_t++;
        }
        if (move_t > MOVE_FRAME) {
            move_t = 0;
        }
        else if (move_t > 0) {
            move_t++;
        }
        if (down_t > DOWN_FRAME) {
            down_t = 0;
        }
        else if (down_t > 0) {
            down_t++;
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
addq $0x50, %rdi
callq 0xa3d0
testb $0x1, %al
jne 0xb871
jmp 0xb88e
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
callq 0x8930
movq %rax, %rdi
leaq -0xc(%rbp), %rsi
leaq -0x10(%rbp), %rdx
callq 0xa4a0
movq -0x20(%rbp), %rcx
movl 0x80(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x80(%rcx)
cmpl 0x7c(%rcx), %eax
jle 0xb9d4
movq -0x20(%rbp), %rax
movl $0x0, 0x80(%rax)
cmpl $0xc, 0x64(%rax)
jge 0xb93a
movq -0x20(%rbp), %rax
movl 0x64(%rax), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x6, %rcx, %rcx
movq %rax, %rdi
addq %rcx, %rdi
movslq 0x60(%rax), %rax
addq %rax, %rdi
callq 0xb7a0
testb $0x1, %al
jne 0xb8e9
jmp 0xb93a
movq -0x20(%rbp), %rax
movl 0x64(%rax), %eax
addl -0x10(%rbp), %eax
cmpl $0xc, %eax
jge 0xb93a
movq -0x20(%rbp), %rax
movl 0x64(%rax), %ecx
addl -0x10(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x6, %rcx, %rcx
movq %rax, %rdi
addq %rcx, %rdi
movl 0x60(%rax), %eax
addl -0xc(%rbp), %eax
cltq
addq %rax, %rdi
callq 0xb7a0
testb $0x1, %al
jne 0xb928
jmp 0xb93a
movq -0x20(%rbp), %rax
movl 0x64(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x64(%rax)
jmp 0xb9d2
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
callq 0x8930
movq %rax, %rsi
leaq -0x11(%rbp), %rdi
callq 0xc7c0
movq -0x20(%rbp), %rax
movslq 0x64(%rax), %rcx
imulq $0x6, %rcx, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movslq 0x60(%rax), %rdx
movb -0x11(%rbp), %sil
movb %sil, (%rcx,%rdx)
movl 0x64(%rax), %eax
addl -0x10(%rbp), %eax
cmpl $0x0, %eax
jl 0xb9ba
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
callq 0x8930
movq %rax, %rsi
leaq -0x12(%rbp), %rdi
callq 0xc7f0
movq -0x20(%rbp), %rcx
movl 0x64(%rcx), %eax
addl -0x10(%rbp), %eax
cltq
imulq $0x6, %rax, %rdx
movq %rcx, %rax
addq %rdx, %rax
movl 0x60(%rcx), %ecx
addl -0xc(%rbp), %ecx
movslq %ecx, %rcx
movb -0x12(%rbp), %dl
movb %dl, (%rax,%rcx)
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
callq 0xc820
movq -0x20(%rbp), %rax
movl $0x1, 0x68(%rax)
jmp 0xb9d4
movq -0x20(%rbp), %rcx
movl 0x88(%rcx), %eax
cmpl 0x84(%rcx), %eax
jle 0xb9f6
movq -0x20(%rbp), %rax
movl $0x0, 0x88(%rax)
jmp 0xba18
movq -0x20(%rbp), %rax
cmpl $0x0, 0x88(%rax)
jle 0xba16
movq -0x20(%rbp), %rax
movl 0x88(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x88(%rax)
jmp 0xba18
movq -0x20(%rbp), %rcx
movl 0x90(%rcx), %eax
cmpl 0x8c(%rcx), %eax
jle 0xba3a
movq -0x20(%rbp), %rax
movl $0x0, 0x90(%rax)
jmp 0xba5c
movq -0x20(%rbp), %rax
cmpl $0x0, 0x90(%rax)
jle 0xba5a
movq -0x20(%rbp), %rax
movl 0x90(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x90(%rax)
jmp 0xba5c
movq -0x20(%rbp), %rcx
movl 0x98(%rcx), %eax
cmpl 0x94(%rcx), %eax
jle 0xba7e
movq -0x20(%rbp), %rax
movl $0x0, 0x98(%rax)
jmp 0xbaa0
movq -0x20(%rbp), %rax
cmpl $0x0, 0x98(%rax)
jle 0xba9e
movq -0x20(%rbp), %rax
movl 0x98(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x98(%rax)
jmp 0xbaa0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)