// File: /workspace/github_c_makefile_star2_O2/cinemast[P]sudoku/sudoku.c
// Function: request_hint
void request_hint (void)
{
    ++req_hints;
    if (have_hint) {
        clear_hints();
    }
    if (-1 == num_hints) {
        last_hint = -1;
        num_hints = findhints();
    }
    if (0 == num_hints) {
        set_status("No hints available!");
    } else {
        int i, idx;
        int n = 0;

        if (1 < num_hints) {
            do {
                i = rand() % num_hints;
            } while (i == last_hint);
        } else {
            i = 0;
        }
        idx = GET_INDEX(possible[last_hint = i]);

        /* Count # possible ways of expressing hint */
        if (0 != (HINT_ROW & possible[i])) {
            ++n;
        }
        if (0 != (HINT_COLUMN & possible[i])) {
            ++n;
        }
        if (0 != (HINT_BLOCK & possible[i])) {
            ++n;
        }
        assert(0 < n);
        if (1 < n) {
            n = 1 + rand() % n;
        }
        if (0 != (HINT_ROW & possible[i])) {
            if (0 == --n) {
                row_hint(ROW(idx));
            }
        }
        if (0 != (HINT_COLUMN & possible[i])) {
            if (0 == --n) {
                column_hint(COLUMN(idx));
            }
        }
        if (0 != (HINT_BLOCK & possible[i])) {
            if (0 == --n) {
                block_hint(IDX_BLOCK(ROW(idx), COLUMN(idx)));
            }
        }
        if (opt_spoilerhint) {
            /* Useful for testing... */
            sprintf(statusline, "%d @ row %d, column %d",
                        GET_DIGIT(possible[i]),
                        ROW(idx)+1, COLUMN(idx)+1);
            set_status(statusline);
        } else if (10 < req_hints || 2 * num_hints < req_hints) {
            sprintf(statusline, "(try the digit %d)",
                        GET_DIGIT(possible[i]));
            set_status(statusline);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
incl 0xb8f9(%rip)            # 0xe344
cmpb $0x1, 0xb8f6(%rip)      # 0xe348
jne 0x2a59
callq 0x2dfe
movl 0xb8ed(%rip), %eax      # 0xe34c
cmpl $-0x1, %eax
jne 0x2a76
orl $-0x1, 0xb8e5(%rip)     # 0xe350
callq 0x24ac
movl %eax, 0xb8d6(%rip)      # 0xe34c
testl %eax, %eax
je 0x2ade
xorl %edx, %edx
cmpl $0x2, %eax
jl 0x2a95
callq 0x2380
cltd
idivl 0xb8bf(%rip)            # 0xe34c
cmpl 0xb8bd(%rip), %edx      # 0xe350
je 0x2a81
movl %edx, 0xb8b5(%rip)      # 0xe350
movslq %edx, %r15
leaq 0xb75b(%rip), %r12      # 0xe200
movl (%r12,%r15,4), %ebp
movl %ebp, %eax
shrl $0x18, %eax
andl $0x1, %eax
movl %ebp, %ebx
shrl $0x19, %ebx
andl $0x1, %ebx
btl $0x1a, %ebp
adcl %eax, %ebx
cmpl $0x1, %ebx
je 0x2aea
testl %ebx, %ebx
je 0x2ddf
callq 0x2380
cltd
idivl %ebx
movl %edx, %ebx
incl %ebx
movl (%r12,%r15,4), %eax
jmp 0x2aec
leaq 0x6eab(%rip), %rbx      # 0x9990
jmp 0x2dba
movl %ebp, %eax
andl $0x7f, %ebp
btl $0x18, %eax
jae 0x2b73
decl %ebx
jne 0x2b73
movzbl %bpl, %ecx
movb $0x9, %dl
movl %ecx, %eax
divb %dl
movl %eax, %edx
movq 0xb4cc(%rip), %r14      # 0xdfd8
movq (%r14), %rdi
movb $0x1b, %sil
movl %ecx, %eax
divb %sil
addb %dl, %al
addb $0x7, %al
movzbl %al, %ebx
pushq $0x19
popq %rdx
movl %ebx, %esi
callq 0x22d0
cmpl $-0x1, %eax
je 0x2b38
movq (%r14), %rdi
pushq $0x3e
popq %rsi
callq 0x2300
movq (%r14), %rdi
pushq $0x35
popq %rdx
movl %ebx, %esi
callq 0x22d0
cmpl $-0x1, %eax
je 0x2b55
movq (%r14), %rdi
pushq $0x3c
popq %rsi
callq 0x2300
movl 0xce91(%rip), %edi      # 0xf9ec
movl 0xce8f(%rip), %esi      # 0xf9f0
callq 0x546b
movb $0x1, 0xb7db(%rip)      # 0xe348
movl (%r12,%r15,4), %eax
xorl %ebx, %ebx
btl $0x19, %eax
jae 0x2bfe
decl %ebx
jne 0x2bfe
movzbl %bpl, %eax
movb $0x9, %cl
divb %cl
movzbl %ah, %eax
movq 0xb445(%rip), %r14      # 0xdfd8
movq (%r14), %rdi
movzbl %al, %ecx
movb $0x3, %dl
movl %ecx, %eax
divb %dl
addb %al, %cl
addb %cl, %cl
addb $0x1d, %cl
movzbl %cl, %ebx
pushq $0x5
popq %rsi
movl %ebx, %edx
callq 0x22d0
cmpl $-0x1, %eax
je 0x2bc3
movq (%r14), %rdi
pushq $0x76
popq %rsi
callq 0x2300
movq (%r14), %rdi
pushq $0x13
popq %rsi
movl %ebx, %edx
callq 0x22d0
cmpl $-0x1, %eax
je 0x2be0
movq (%r14), %rdi
pushq $0x5e
popq %rsi
callq 0x2300
movl 0xce06(%rip), %edi      # 0xf9ec
movl 0xce04(%rip), %esi      # 0xf9f0
callq 0x546b
movb $0x1, 0xb750(%rip)      # 0xe348
movl (%r12,%r15,4), %eax
xorl %ebx, %ebx
btl $0x1a, %eax
jae 0x2d42
cmpl $0x1, %ebx
jne 0x2d42
movq %r15, 0x8(%rsp)
movl %ebp, 0x4(%rsp)
movzbl %bpl, %ecx
movb $0x1b, %dl
movl %ecx, %eax
divb %dl
movzbl %al, %eax
leal (%rax,%rax,2), %edx
movb $0x9, %sil
movl %ecx, %eax
divb %sil
movzbl %ah, %eax
movzbl %al, %eax
movb $0x3, %cl
divb %cl
addb %dl, %al
movzbl %al, %edx
movzbl %dl, %eax
divb %cl
movzbl %ah, %eax
subl %eax, %edx
leal (%rax,%rax,2), %r15d
xorl %r12d, %r12d
movq 0xb37f(%rip), %r14      # 0xdfd8
movq %rdx, 0x10(%rsp)
movl %edx, %r13d
movzbl %r15b, %eax
xorl %edx, %edx
pushq $0x3
popq %rcx
divl %ecx
movl %eax, %ebx
movl %r13d, %eax
xorl %edx, %edx
divl %ecx
cmpl $0x3, %r12d
je 0x2d1a
movl %eax, %ebp
addl $0x7, %ebp
movq 0x10(%rsp), %rax
addl %r12d, %eax
addl %eax, %ebp
movq (%r14), %rdi
movl %ebp, %esi
pushq $0x19
popq %rdx
callq 0x22d0
cmpl $-0x1, %eax
je 0x2cab
movq (%r14), %rdi
pushq $0x3e
popq %rsi
callq 0x2300
movq (%r14), %rdi
movl %ebp, %esi
pushq $0x35
popq %rdx
callq 0x22d0
cmpl $-0x1, %eax
je 0x2cc8
movq (%r14), %rdi
pushq $0x3c
popq %rsi
callq 0x2300
addl %r15d, %ebx
movq (%r14), %rdi
leal 0x1d(,%rbx,2), %ebx
pushq $0x5
popq %rsi
movl %ebx, %edx
callq 0x22d0
cmpl $-0x1, %eax
je 0x2cef
movq (%r14), %rdi
pushq $0x76
popq %rsi
callq 0x2300
movq (%r14), %rdi
pushq $0x13
popq %rsi
movl %ebx, %edx
callq 0x22d0
cmpl $-0x1, %eax
je 0x2d0c
movq (%r14), %rdi
pushq $0x5e
popq %rsi
callq 0x2300
incl %r12d
incl %r15d
incl %r13d
jmp 0x2c61
movl 0xcccc(%rip), %edi      # 0xf9ec
movl 0xccca(%rip), %esi      # 0xf9f0
callq 0x546b
movb $0x1, 0xb616(%rip)      # 0xe348
movq 0x8(%rsp), %r15
leaq 0xb4c2(%rip), %r12      # 0xe200
movl 0x4(%rsp), %ebp
cmpb $0x1, 0xb60b(%rip)      # 0xe354
jne 0x2d82
movzwl 0x2(%r12,%r15,4), %r9d
pushq $0x9
popq %rcx
movl %ebp, %eax
xorl %edx, %edx
divl %ecx
andl $0xf, %r9d
leal 0x1(%rax), %ecx
leal 0x1(%rdx), %r8d
leaq 0xb5f4(%rip), %rbx      # 0xe360
leaq 0x6c58(%rip), %rsi      # 0x99cb
movq %rbx, %rdi
movl %r9d, %edx
xorl %eax, %eax
callq 0x2320
jmp 0x2dba
movl 0xb5bc(%rip), %eax      # 0xe344
cmpl $0xa, %eax
jg 0x2d99
movl 0xb5b9(%rip), %ecx      # 0xe34c
addl %ecx, %ecx
cmpl %eax, %ecx
jge 0x2dd0
movzwl 0x2(%r12,%r15,4), %edx
andl $0xf, %edx
leaq 0xb5b7(%rip), %rbx      # 0xe360
leaq 0x6c32(%rip), %rsi      # 0x99e2
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2320
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2eea
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6bbe(%rip), %rdi      # 0x99a4
leaq 0x6bbd(%rip), %rsi      # 0x99aa
leaq 0x6bbf(%rip), %rcx      # 0x99b3
movl $0xdfb, %edx            # imm = 0xDFB
callq 0x2160