LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: signals
static
void
signals (void)
{
    sigset_t sigset;
    struct sigaction sighandler;
    struct termios tp;

    sigemptyset(&sigset);
    sighandler.sa_handler = cleanup;
    sighandler.sa_mask = sigset;
    sighandler.sa_flags = 0;

    sigaction(SIGINT,  &sighandler, 0);
    sigaction(SIGABRT, &sighandler, 0);
    sigaction(SIGTERM, &sighandler, 0);
#ifdef SIGHUP
    sigaction(SIGHUP,  &sighandler, 0);
#endif
#ifdef SIGQUIT
    sigaction(SIGQUIT, &sighandler, 0);
#endif
#ifdef SIGKILL
    sigaction(SIGKILL, &sighandler, 0);
#endif

    /* Re-enable signal processing */
    if (0 == tcgetattr(0, &tp)) {
        tp.c_lflag |= ISIG;
        tcsetattr(0, TCSANOW, &tp);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
leaq -0x80(%rbp), %rdi
callq 0x2210
leaq 0x35c5(%rip), %rax      # 0x7cc0
movq %rax, -0x118(%rbp)
leaq -0x118(%rbp), %rdi
addq $0x8, %rdi
leaq -0x80(%rbp), %rsi
movl $0x80, %edx
callq 0x2220
movl $0x0, -0x90(%rbp)
movl $0x2, %edi
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2080
movl $0x6, %edi
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2080
movl $0xf, %edi
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2080
movl $0x1, %edi
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2080
movl $0x3, %edi
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2080
movl $0x9, %edi
leaq -0x118(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2080
xorl %edi, %edi
leaq -0x154(%rbp), %rsi
callq 0x2270
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x47d8
movl -0x148(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x148(%rbp)
xorl %esi, %esi
leaq -0x154(%rbp), %rdx
movl %esi, %edi
callq 0x2280
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: load_board
static
void
load_board (void)
{
    int i = 0;
    if (opened) {
        /* Select next board */
        i = read_board(opened, 0);
        if (i--) {
            fclose(opened);
            opened = NULL;
        }
    } else if (precanned &&
               (0 == opt_random ||
                (0 == rand() % 3 && 0 < n_precanned))) {
        /* Select random board */
        i = rand() % n_precanned;
        fseek(precanned, 0, SEEK_SET);
        while (0 <= i && 0 == read_board(precanned, 0)) {
            --i;
        }
    }
    if (i != -1) {
        set_status("generating a random board... (please wait)");
        generate();
        clear_status();
    }

    /* Shameless plug... */
    set_status("Su-Do-Ku by Michael Kennett");

    render();
    write_title(title);

    curx = cury = 8;    /* move_next() takes care of this... */
    move_next();
    completed = is_complete();
    num_hints = -1;
    time(&start_time);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
cmpq $0x0, 0xdcd1(%rip)      # 0x12c88
je 0x4ff6
movq 0xdcc8(%rip), %rdi      # 0x12c88
xorl %esi, %esi
callq 0x5d90
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x4(%rbp)
cmpl $0x0, %eax
je 0x4ff1
movq 0xdca7(%rip), %rdi      # 0x12c88
callq 0x20d0
movq $0x0, 0xdc97(%rip) # 0x12c88
jmp 0x508a
cmpq $0x0, 0xc3c2(%rip)      # 0x113c0
je 0x5088
xorl %eax, %eax
cmpl 0xc1f0(%rip), %eax      # 0x111fc
je 0x502b
callq 0x2350
movl $0x3, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl %edx, %eax
jne 0x5088
xorl %eax, %eax
cmpl 0xd3a7(%rip), %eax      # 0x123d0
jge 0x5088
callq 0x2350
cltd
idivl 0xd399(%rip)            # 0x123d0
movl %edx, -0x4(%rbp)
movq 0xc37f(%rip), %rdi      # 0x113c0
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x2250
xorl %eax, %eax
xorl %ecx, %ecx
cmpl -0x4(%rbp), %ecx
movb %al, -0x5(%rbp)
jg 0x5072
movq 0xc361(%rip), %rdi      # 0x113c0
xorl %esi, %esi
callq 0x5d90
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
sete %al
movb %al, -0x5(%rbp)
movb -0x5(%rbp), %al
testb $0x1, %al
jne 0x507b
jmp 0x5086
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x504c
jmp 0x5088
jmp 0x508a
cmpl $-0x1, -0x4(%rbp)
je 0x50a6
leaq 0x8a56(%rip), %rdi      # 0xdaed
callq 0x32f0
callq 0x43b0
callq 0x7ce0
leaq 0x8a6b(%rip), %rdi      # 0xdb18
callq 0x32f0
callq 0x7d30
leaq 0xd362(%rip), %rdi      # 0x12420
callq 0x74b0
movl $0x8, 0xd933(%rip)      # 0x12a00
movl $0x8, 0xd925(%rip)      # 0x129fc
callq 0x7f30
callq 0x7fd0
movl %eax, 0xdc09(%rip)      # 0x12cf0
movl $0xffffffff, 0xc26b(%rip) # imm = 0xFFFFFFFF
leaq 0xdbf0(%rip), %rdi      # 0x12ce8
callq 0x2230
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: numset
static
int
numset (int mask)
{
    int i, n = 0;
    for (i = STATE_SHIFT + 1; i <= STATE_SHIFT + 9; ++i) {
        if (mask & (1<<i)) {
            ++n;
        } else {
            ++counts[i - STATE_SHIFT - 1];
        }
    }
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x7, -0x8(%rbp)
cmpl $0xf, -0x8(%rbp)
jg 0x5a4c
movl -0x4(%rbp), %eax
movl -0x8(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x5a1c
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5a3f
movl -0x8(%rbp), %eax
subl $0x6, %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0xca51(%rip), %rax      # 0x12480
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0xca44(%rip), %rax      # 0x12480
movl %edx, (%rax,%rcx,4)
jmp 0x5a41
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x59f5
movl -0xc(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: exblock
static
void
exblock (int block, int el, int (*idx_fn)(int, int))
{
    int i, idx, mask;

    /* By assumption, all unknown squares in the block appear in the
     * same row/column, so to construct a mask for these squares, it
     * is sufficient to invert the mask for the known squares in the
     * block.
     */
    mask = 0;
    for (i = 0; i < 9; ++i) {
        idx = idx_block(block, i);
        if (!IS_EMPTY(idx)) {
            mask |= DIGIT_STATE(DIGIT(idx));
        }
    }
    exmask(mask ^ STATE_MASK, block, el, idx_fn);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x9, -0x14(%rbp)
jge 0x5ae5
movl -0x4(%rbp), %edi
movl -0x14(%rbp), %esi
callq 0x2990
movl %eax, -0x18(%rbp)
movslq -0x18(%rbp), %rcx
leaq 0xca11(%rip), %rax      # 0x124b0
movl (%rax,%rcx,4), %ecx
andl $0xf0000, %ecx          # imm = 0xF0000
sarl $0x10, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x5ad8
movslq -0x18(%rbp), %rcx
leaq 0xc9f4(%rip), %rax      # 0x124b0
movl (%rax,%rcx,4), %ecx
andl $0xf0000, %ecx          # imm = 0xF0000
sarl $0x10, %ecx
addl $0x6, %ecx
movl $0x1, %eax
shll %cl, %eax
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x5ada
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5a80
movl -0x1c(%rbp), %edi
xorl $0xff80, %edi           # imm = 0xFF80
movl -0x4(%rbp), %esi
movl -0x8(%rbp), %edx
movq -0x10(%rbp), %rcx
callq 0x5b10
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: exmask
static
void
exmask (int mask, int block, int el, int (*idx_fn)(int, int))
{
    int i, idx;

    for (i = 0; i < 9; ++i) {
        idx = (*idx_fn)(el, i);
        if (block != BLOCK(idx) && IS_EMPTY(idx)) {
            board[idx] |= mask;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x9, -0x1c(%rbp)
jge 0x5bc9
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %edi
movl -0x1c(%rbp), %esi
callq *%rax
movl %eax, -0x20(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
movl $0x9, %ecx
cltd
idivl %ecx
movl $0x3, %ecx
cltd
idivl %ecx
imull $0x3, %eax, %ecx
movl -0x20(%rbp), %eax
movl $0x9, %esi
cltd
idivl %esi
movl %edx, %eax
movl $0x3, %esi
cltd
idivl %esi
movl %eax, %edx
movl -0x24(%rbp), %eax
addl %edx, %ecx
cmpl %ecx, %eax
je 0x5bb9
movslq -0x20(%rbp), %rcx
leaq 0xc924(%rip), %rax      # 0x124b0
movl (%rax,%rcx,4), %ecx
andl $0xf0000, %ecx          # imm = 0xF0000
sarl $0x10, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x5bb9
movl -0x4(%rbp), %edx
movslq -0x20(%rbp), %rcx
leaq 0xc904(%rip), %rax      # 0x124b0
orl (%rax,%rcx,4), %edx
leaq 0xc8fa(%rip), %rax      # 0x124b0
movl %edx, (%rax,%rcx,4)
jmp 0x5bbb
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5b2c
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: update
static
void
update (int idx)
{
    const int row = ROW(idx);
    const int col = COLUMN(idx);
    const int block = IDX_BLOCK(row, col);
    const int mask = DIGIT_STATE(DIGIT(idx));
    int i;

    board[idx] |= STATE_MASK;  /* filled - no choice possible */

    /* Digit cannot appear in row, column or block */
    for (i = 0; i < 9; ++i) {
        board[idx_row(row, i)] |= mask;
        board[idx_column(col, i)] |= mask;
        board[idx_block(block, i)] |= mask;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl $0x9, %ecx
cltd
idivl %ecx
movl %eax, -0x8(%rbp)
movl -0x4(%rbp), %eax
movl $0x9, %ecx
cltd
idivl %ecx
movl %edx, -0xc(%rbp)
movl -0x8(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
imull $0x3, %eax, %eax
movl %eax, -0x1c(%rbp)
movl -0xc(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x1c(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x10(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0xc888(%rip), %rax      # 0x124b0
movl (%rax,%rcx,4), %ecx
andl $0xf0000, %ecx          # imm = 0xF0000
sarl $0x10, %ecx
addl $0x6, %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x14(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0xc864(%rip), %rax      # 0x124b0
movl (%rax,%rcx,4), %edx
orl $0xff80, %edx           # imm = 0xFF80
leaq 0xc854(%rip), %rax      # 0x124b0
movl %edx, (%rax,%rcx,4)
movl $0x0, -0x18(%rbp)
cmpl $0x9, -0x18(%rbp)
jge 0x5cff
movl -0x14(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x8(%rbp), %edi
movl -0x18(%rbp), %esi
callq 0x2780
movl -0x28(%rbp), %edx
movslq %eax, %rcx
leaq 0xc822(%rip), %rax      # 0x124b0
orl (%rax,%rcx,4), %edx
leaq 0xc818(%rip), %rax      # 0x124b0
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0xc(%rbp), %edi
movl -0x18(%rbp), %esi
callq 0x2970
movl -0x24(%rbp), %edx
movslq %eax, %rcx
leaq 0xc7f7(%rip), %rax      # 0x124b0
orl (%rax,%rcx,4), %edx
leaq 0xc7ed(%rip), %rax      # 0x124b0
movl %edx, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x10(%rbp), %edi
movl -0x18(%rbp), %esi
callq 0x2990
movl -0x20(%rbp), %edx
movslq %eax, %rcx
leaq 0xc7cc(%rip), %rax      # 0x124b0
orl (%rax,%rcx,4), %edx
leaq 0xc7c2(%rip), %rax      # 0x124b0
movl %edx, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5c66
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: move_to
static
void
move_to (int x, int y)
{
    curx = x;
    cury = y;

    move(TOP + 1 + y + y / 3,
         LEFT + 2 + 2 * (x + x / 3));

    wrefresh(stdscr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %eax
movl %eax, 0xccd5(%rip)      # 0x129fc
movl -0x8(%rbp), %eax
movl %eax, 0xccd0(%rip)      # 0x12a00
movq 0xb2a1(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
movl -0x8(%rbp), %esi
addl $0x7, %esi
movl -0x8(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
addl %eax, %esi
movl -0x4(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl -0xc(%rbp), %edx
addl %eax, %edx
shll %edx
addl $0x1d, %edx
callq 0x22b0
movq 0xb264(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
callq 0x2170
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: reset
static
void
reset (void)
{
    memset(board, 0x00, sizeof(board));
    memset(history, 0x00, sizeof(history));
    idx_history = 0;
    pass = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xc1c5(%rip), %rdi      # 0x124b0
xorl %esi, %esi
movl $0x144, %edx            # imm = 0x144
callq 0x2180
leaq 0xc332(%rip), %rdi      # 0x12630
xorl %esi, %esi
movl $0x3cc, %edx            # imm = 0x3CC
callq 0x2180
movl $0x0, 0xc310(%rip)      # 0x12624
movl $0x0, 0xc886(%rip)      # 0x12ba4
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: fill
static
int
fill (int idx, int digit)
{
    assert(0 != digit);

    if (!IS_EMPTY(idx)) {
        return (DIGIT(idx) == digit) ? 0 : -1;
    }
    if (DISALLOWED(idx, digit)) {
        return -1;
    }

    board[idx] = SET_DIGIT(digit);
    update(idx);
    add_move(idx, digit, 0);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
xorl %eax, %eax
cmpl -0xc(%rbp), %eax
je 0x64c7
jmp 0x64e6
leaq 0x6b47(%rip), %rdi      # 0xd015
leaq 0x681c(%rip), %rsi      # 0xccf1
movl $0x3a8, %edx            # imm = 0x3A8
leaq 0x6b3f(%rip), %rcx      # 0xd020
callq 0x2150
movslq -0x8(%rbp), %rcx
leaq 0xbfbf(%rip), %rax      # 0x124b0
movl (%rax,%rcx,4), %ecx
andl $0xf0000, %ecx          # imm = 0xF0000
sarl $0x10, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x652e
movslq -0x8(%rbp), %rcx
leaq 0xbfa2(%rip), %rax      # 0x124b0
movl (%rax,%rcx,4), %edx
andl $0xf0000, %edx          # imm = 0xF0000
sarl $0x10, %edx
movl -0xc(%rbp), %esi
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl %esi, %edx
cmovel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x658b
movslq -0x8(%rbp), %rcx
leaq 0xbf77(%rip), %rax      # 0x124b0
movl (%rax,%rcx,4), %eax
movl -0xc(%rbp), %ecx
addl $0x6, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x655b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x658b
movl -0xc(%rbp), %edx
shll $0x10, %edx
movslq -0x8(%rbp), %rcx
leaq 0xbf44(%rip), %rax      # 0x124b0
movl %edx, (%rax,%rcx,4)
movl -0x8(%rbp), %edi
callq 0x5bd0
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
xorl %edx, %edx
callq 0x65a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: add_move
static
void
add_move (int idx, int digit, int choice)
{
    int i;

    if (sizeof(history) / sizeof(int) - 1 <= idx_history) {
        compress(81);
    }
    /* Never ignore the last move */
    history[idx_history++] = SET_INDEX(idx) | SET_DIGIT(digit) | choice;

    /* Ignore all previous references to idx */
    for (i = idx_history - 2; 0 <= i; --i) {
        if (GET_INDEX(history[i]) == idx) {
            history[i] |= IGNORED;
            break;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movslq 0xc06c(%rip), %rcx      # 0x12624
movl $0xf2, %eax
cmpq %rcx, %rax
ja 0x65cc
movl $0x51, %edi
callq 0x6660
movl -0x4(%rbp), %edx
movl -0x8(%rbp), %eax
shll $0x10, %eax
orl %eax, %edx
orl -0xc(%rbp), %edx
movl 0xc044(%rip), %eax      # 0x12624
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0xc039(%rip)      # 0x12624
movslq %eax, %rcx
leaq 0xc03b(%rip), %rax      # 0x12630
movl %edx, (%rax,%rcx,4)
movl 0xc026(%rip), %eax      # 0x12624
subl $0x2, %eax
movl %eax, -0x10(%rbp)
xorl %eax, %eax
cmpl -0x10(%rbp), %eax
jg 0x664e
movslq -0x10(%rbp), %rcx
leaq 0xc01a(%rip), %rax      # 0x12630
movl (%rax,%rcx,4), %eax
andl $0x7f, %eax
cmpl -0x4(%rbp), %eax
jne 0x6641
movslq -0x10(%rbp), %rcx
leaq 0xc004(%rip), %rax      # 0x12630
movl (%rax,%rcx,4), %edx
orl $0x400000, %edx         # imm = 0x400000
leaq 0xbff4(%rip), %rax      # 0x12630
movl %edx, (%rax,%rcx,4)
jmp 0x664e
jmp 0x6643
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x6604
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: compress
static
void
compress(int limit)
{
    int i, j, k;
    /* Find the first ignored history item, if there is any. */
    for (k = 0; k < idx_history; ++k) {
        if (0 != (history[k] & IGNORED)) {
            break;
        }
    }
    /* Move the rest to compress the history */
    for (i = j = k; i < idx_history && j < limit; ++i) {
        if (!(history[i] & IGNORED)) {
            history[j++] = history[i];
        }
    }
    for (; i < idx_history; ++i) {
        history[j++] = history[i];
    }
    idx_history = j;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl 0xbfad(%rip), %eax      # 0x12624
jge 0x66a2
movslq -0x10(%rbp), %rcx
leaq 0xbfac(%rip), %rax      # 0x12630
movl (%rax,%rcx,4), %ecx
andl $0x400000, %ecx         # imm = 0x400000
xorl %eax, %eax
cmpl %ecx, %eax
je 0x6695
jmp 0x66a2
jmp 0x6697
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x666e
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %ecx
xorl %eax, %eax
cmpl 0xbf6e(%rip), %ecx      # 0x12624
movb %al, -0x11(%rbp)
jge 0x66c7
movl -0xc(%rbp), %eax
cmpl -0x4(%rbp), %eax
setl %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x66d0
jmp 0x671b
movslq -0x8(%rbp), %rcx
leaq 0xbf55(%rip), %rax      # 0x12630
movl (%rax,%rcx,4), %eax
andl $0x400000, %eax         # imm = 0x400000
cmpl $0x0, %eax
jne 0x670e
movslq -0x8(%rbp), %rcx
leaq 0xbf3d(%rip), %rax      # 0x12630
movl (%rax,%rcx,4), %edx
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
movslq %eax, %rcx
leaq 0xbf25(%rip), %rax      # 0x12630
movl %edx, (%rax,%rcx,4)
jmp 0x6710
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x66ab
jmp 0x671d
movl -0x8(%rbp), %eax
cmpl 0xbefe(%rip), %eax      # 0x12624
jge 0x6759
movslq -0x8(%rbp), %rcx
leaq 0xbefd(%rip), %rax      # 0x12630
movl (%rax,%rcx,4), %edx
movl -0xc(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xc(%rbp)
movslq %eax, %rcx
leaq 0xbee5(%rip), %rax      # 0x12630
movl %edx, (%rax,%rcx,4)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x671d
movl -0xc(%rbp), %eax
movl %eax, 0xbec2(%rip)      # 0x12624
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: topen
static
FILE *
topen (const char *     filename,
       const char *     mode)
{
    FILE * stream = 0;
    if (mode != 0
        && strcmp(mode, "r") == 0) {
        stream = fopen(filename, "r");
        if (0 == stream && strcmp(TEMPLATE_FALLBACK, filename) == 0) {
            stream = &default_template_file;
            default_template_siz = sizeof(default_template) * 4;
            default_template_pos = 0;
        }
    }
    return stream;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x67f6
movq -0x10(%rbp), %rdi
leaq 0x72a2(%rip), %rsi      # 0xda3c
callq 0x21f0
cmpl $0x0, %eax
jne 0x67f6
movq -0x8(%rbp), %rdi
leaq 0x728d(%rip), %rsi      # 0xda3c
callq 0x22a0
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq -0x18(%rbp), %rax
jne 0x67f4
movq -0x8(%rbp), %rsi
leaq 0x7447(%rip), %rdi      # 0xdc12
callq 0x21f0
cmpl $0x0, %eax
jne 0x67f4
leaq 0xc3cc(%rip), %rax      # 0x12ba8
movq %rax, -0x18(%rbp)
movl $0x5dcc, 0xc496(%rip)   # imm = 0x5DCC
movl $0x0, 0xc490(%rip)      # 0x12c84
jmp 0x67f6
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: tclose
static
int
tclose (FILE *  stream)
{
    int ret = -1;
    if (stream == &default_template_file) {
        default_template_siz = 0;
        default_template_pos = 0;
        ret = 0;
    } else if (0 != stream) {
        ret = fclose(stream);
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
leaq 0xc38e(%rip), %rax      # 0x12ba8
cmpq %rax, -0x8(%rbp)
jne 0x683d
movl $0x0, 0xc456(%rip)      # 0x12c80
movl $0x0, 0xc450(%rip)      # 0x12c84
movl $0x0, -0xc(%rbp)
jmp 0x6853
xorl %eax, %eax
cmpq -0x8(%rbp), %rax
je 0x6851
movq -0x8(%rbp), %rdi
callq 0x20d0
movl %eax, -0xc(%rbp)
jmp 0x6853
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: solve
static
int
solve (void)
{
    int idx;

    for (;;) {
        if (0 == deterministic()) {
            /* Solved, make a new choice, or rewind a previous choice */
            idx = choice();
            if (-1 == idx) {
                idx = 0;
                break;
            } else if ((idx < 0 || -1 == choose(idx, 1))
                       && -1 == backtrack()) {
                idx = -1;
                break;
            }
        } else {
            /* rewind to a previous choice */
            if (-1 == backtrack()) {
                idx = -1;
                break;
            }
        }
    }
    return idx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x6c50
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x68cb
callq 0x6cf0
movl %eax, -0x4(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl -0x4(%rbp), %eax
jne 0x6890
movl $0x0, -0x4(%rbp)
jmp 0x68e8
cmpl $0x0, -0x4(%rbp)
jl 0x68ae
movl -0x4(%rbp), %edi
movl $0x1, %esi
callq 0x6de0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x68c7
callq 0x6900
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x68c7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x68e8
jmp 0x68c9
jmp 0x68e6
callq 0x6900
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x68e4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x68e8
jmp 0x68e6
jmp 0x6868
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: backtrack
static
int
backtrack (void)
{
    int digit, idx;

    for (; 0 < --idx_history;) {
        if (history[idx_history] & CHOICE) {
            /* Remember the last choice, and advance */
            idx = GET_INDEX(history[idx_history]);
            digit = GET_DIGIT(history[idx_history]) + 1;
            reapply();
            if (-1 != choose(idx, digit)) {
                return idx;
            }
        }
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl 0xbd16(%rip), %ecx      # 0x12624
addl $-0x1, %ecx
movl %ecx, 0xbd0d(%rip)      # 0x12624
xorl %eax, %eax
cmpl %ecx, %eax
jge 0x6998
movslq 0xbd00(%rip), %rcx      # 0x12624
leaq 0xbd05(%rip), %rax      # 0x12630
movl (%rax,%rcx,4), %eax
andl $0x200000, %eax         # imm = 0x200000
cmpl $0x0, %eax
je 0x6993
movslq 0xbce5(%rip), %rcx      # 0x12624
leaq 0xbcea(%rip), %rax      # 0x12630
movl (%rax,%rcx,4), %eax
andl $0x7f, %eax
movl %eax, -0xc(%rbp)
movslq 0xbcce(%rip), %rcx      # 0x12624
leaq 0xbcd3(%rip), %rax      # 0x12630
movl (%rax,%rcx,4), %eax
andl $0xf0000, %eax          # imm = 0xF0000
sarl $0x10, %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
callq 0x2d20
movl -0xc(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x6de0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
je 0x6991
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x699f
jmp 0x6993
jmp 0x6908
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: classify
static
const char *
classify (void)
{
    int i, score;

    pass = 0;
    clear_moves();
    if (-1 == solve()) {
        return 0;
    }

    score = 81;
    for (i = 0; i < 81; ++i) {
        if (IS_FIXED(i)) {
            --score;
        }
    }
    assert(81 == idx_history);

    for (i = 0; i < 81; ++i) {
        if (history[i] & CHOICE) {
            score -= 5;
        }
    }
    return  class_name_by_score(score);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, 0xc1e2(%rip)      # 0x12ba4
callq 0x6ab0
callq 0x6860
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x69e4
movq $0x0, -0x8(%rbp)
jmp 0x6a9b
movl $0x51, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x51, -0xc(%rbp)
jge 0x6a26
movslq -0xc(%rbp), %rcx
leaq 0xbaad(%rip), %rax      # 0x124b0
movl (%rax,%rcx,4), %eax
andl $0x100000, %eax         # imm = 0x100000
cmpl $0x0, %eax
je 0x6a19
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x6a1b
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x69f2
movl $0x51, %eax
cmpl 0xbbf3(%rip), %eax      # 0x12624
jne 0x6a35
jmp 0x6a54
leaq 0x6acd(%rip), %rdi      # 0xd509
leaq 0x62ae(%rip), %rsi      # 0xccf1
movl $0x7df, %edx            # imm = 0x7DF
leaq 0x6acc(%rip), %rcx      # 0xd51b
callq 0x2150
movl $0x0, -0xc(%rbp)
cmpl $0x51, -0xc(%rbp)
jge 0x6a8f
movslq -0xc(%rbp), %rcx
leaq 0xbbc4(%rip), %rax      # 0x12630
movl (%rax,%rcx,4), %eax
andl $0x200000, %eax         # imm = 0x200000
cmpl $0x0, %eax
je 0x6a82
movl -0x10(%rbp), %eax
subl $0x5, %eax
movl %eax, -0x10(%rbp)
jmp 0x6a84
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6a5b
movl -0x10(%rbp), %edi
callq 0x71f0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: describe
static
void
describe (FILE * f)
{
    int i, j;
    for (i = j = 0; i < idx_history; ++i) {
        if (0 == (history[i] & FIXED)) {
            if (i < idx_history && 0 < j) {
                fprintf(f, 0 == j % 6 ? "\n" : ", ");
            }
            fprintf(f, "%d %c> (%d,%d)", GET_DIGIT(history[i]),
                                      history[i] & CHOICE ? '*' : '-',
                                      1 + ROW(GET_INDEX(history[i])),
                                      1 + COLUMN(GET_INDEX(history[i])));
            ++j;
        }
    }
    fprintf(f, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0xbb01(%rip), %eax      # 0x12624
jge 0x6c30
movslq -0xc(%rbp), %rcx
leaq 0xbafc(%rip), %rax      # 0x12630
movl (%rax,%rcx,4), %ecx
andl $0x100000, %ecx         # imm = 0x100000
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x6c20
movl -0xc(%rbp), %eax
cmpl 0xbad4(%rip), %eax      # 0x12624
jge 0x6b85
xorl %eax, %eax
cmpl -0x10(%rbp), %eax
jge 0x6b85
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %eax
movl $0x6, %ecx
cltd
idivl %ecx
xorl %ecx, %ecx
leaq 0x69c5(%rip), %rsi      # 0xd536
leaq 0x6242(%rip), %rax      # 0xcdba
cmpl %edx, %ecx
cmoveq %rax, %rsi
movb $0x0, %al
callq 0x2200
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rcx
leaq 0xba9c(%rip), %rax      # 0x12630
movl (%rax,%rcx,4), %eax
andl $0xf0000, %eax          # imm = 0xF0000
sarl $0x10, %eax
movl %eax, -0x14(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0xba83(%rip), %rax      # 0x12630
movl (%rax,%rcx,4), %edx
andl $0x200000, %edx         # imm = 0x200000
movl $0x2d, %ecx
movl $0x2a, %eax
cmpl $0x0, %edx
cmovnel %eax, %ecx
movslq -0xc(%rbp), %rdx
leaq 0xba5f(%rip), %rax      # 0x12630
movl (%rax,%rdx,4), %eax
andl $0x7f, %eax
movl $0x9, %esi
cltd
idivl %esi
movl %eax, %r8d
addl $0x1, %r8d
movslq -0xc(%rbp), %rdx
leaq 0xba3f(%rip), %rax      # 0x12630
movl (%rax,%rdx,4), %eax
andl $0x7f, %eax
movl $0x9, %esi
cltd
idivl %esi
movl %edx, %r9d
movl -0x14(%rbp), %edx
addl $0x1, %r9d
leaq 0x6929(%rip), %rsi      # 0xd539
movb $0x0, %al
callq 0x2200
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x6c22
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6b1a
movq -0x8(%rbp), %rdi
leaq 0x617f(%rip), %rsi      # 0xcdba
movb $0x0, %al
callq 0x2200
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: deterministic
static
int
deterministic (void)
{
    int i, n;

    n = allmoves();
    while (0 < n) {
        ++pass;
        for (i = 0; i < n; ++i) {
            if (-1 == fill(GET_INDEX(possible[i]),
                            GET_DIGIT(possible[i]))) {
                return -1;
            }
        }
        n = allmoves();
    }
    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x6e70
movl %eax, -0xc(%rbp)
xorl %eax, %eax
cmpl -0xc(%rbp), %eax
jge 0x6cdd
movl 0xbf37(%rip), %eax      # 0x12ba4
addl $0x1, %eax
movl %eax, 0xbf2e(%rip)      # 0x12ba4
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x6cd3
movslq -0x8(%rbp), %rcx
leaq 0xa580(%rip), %rax      # 0x11210
movl (%rax,%rcx,4), %edi
andl $0x7f, %edi
movslq -0x8(%rbp), %rcx
leaq 0xa56f(%rip), %rax      # 0x11210
movl (%rax,%rcx,4), %esi
andl $0xf0000, %esi          # imm = 0xF0000
sarl $0x10, %esi
callq 0x64b0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x6cc6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6ce3
jmp 0x6cc8
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x6c7d
callq 0x6e70
movl %eax, -0xc(%rbp)
jmp 0x6c60
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: choice
static
int
choice (void)
{
    int i, n;
    for (n = i = 0; i < 81; ++i) {
        if (IS_EMPTY(i)) {
            possible[n] = SET_INDEX(i) | SET_DIGIT(numset(board[i]));

            /* Inconsistency if square unknown, but nothing possible */
            if (9 == GET_DIGIT(possible[n]))
                return -2;
            ++n;
        }
    }
    if (0 == n) {
        return -1;      /* All squares known */
    }
    qsort(possible, n, sizeof(possible[0]), cmp);
    return GET_INDEX(possible[0]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x51, -0x8(%rbp)
jge 0x6d9e
movslq -0x8(%rbp), %rcx
leaq 0xb795(%rip), %rax      # 0x124b0
movl (%rax,%rcx,4), %ecx
andl $0xf0000, %ecx          # imm = 0xF0000
sarl $0x10, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x6d8e
movl -0x8(%rbp), %eax
movl %eax, -0x10(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0xb772(%rip), %rax      # 0x124b0
movl (%rax,%rcx,4), %edi
callq 0x59e0
movl -0x10(%rbp), %edx
shll $0x10, %eax
orl %eax, %edx
movslq -0xc(%rbp), %rcx
leaq 0xa4b7(%rip), %rax      # 0x11210
movl %edx, (%rax,%rcx,4)
movslq -0xc(%rbp), %rcx
leaq 0xa4a9(%rip), %rax      # 0x11210
movl (%rax,%rcx,4), %ecx
andl $0xf0000, %ecx          # imm = 0xF0000
sarl $0x10, %ecx
movl $0x9, %eax
cmpl %ecx, %eax
jne 0x6d85
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0x6dd6
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6d90
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x6d06
xorl %eax, %eax
cmpl -0xc(%rbp), %eax
jne 0x6dae
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6dd6
movslq -0xc(%rbp), %rsi
leaq 0xa457(%rip), %rdi      # 0x11210
movl $0x4, %edx
leaq 0x3fb(%rip), %rcx       # 0x71c0
callq 0x2060
movl 0xa440(%rip), %eax      # 0x11210
andl $0x7f, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: choose
static
int
choose (int idx, int digit)
{
    for (; digit <= 9; ++digit) {
        if (!DISALLOWED(idx, digit)) {
            board[idx] = SET_DIGIT(digit);
            update(idx);
            add_move(idx, digit, CHOICE);
            return digit;
        }
    }
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x9, -0xc(%rbp)
jg 0x6e59
movslq -0x8(%rbp), %rcx
leaq 0xb6b1(%rip), %rax      # 0x124b0
movl (%rax,%rcx,4), %eax
movl -0xc(%rbp), %ecx
addl $0x6, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x6e4c
movl -0xc(%rbp), %edx
shll $0x10, %edx
movslq -0x8(%rbp), %rcx
leaq 0xb687(%rip), %rax      # 0x124b0
movl %edx, (%rax,%rcx,4)
movl -0x8(%rbp), %edi
callq 0x5bd0
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %esi
movl $0x200000, %edx         # imm = 0x200000
callq 0x65a0
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6e60
jmp 0x6e4e
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6dee
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: allmoves
static
int
allmoves (void)
{
    int i, n;

    n = findmoves();
    if (0 != n) {
        return n;
    }

    for (i = 0; i < 9; ++i) {
        count_set_digits(i, idx_row);
        pairs(i, idx_row);

        count_set_digits(i, idx_column);
        pairs(i, idx_column);

        count_set_digits(i, idx_block);
        pairs(i, idx_block);
    }
    n = findmoves();
    if (0 != n) {
        return n;
    }
    for (i = 0; i < 9; ++i) {
        block(i);
        common(i);
        position2(i);
    }
    return findmoves();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x2660
movl %eax, -0xc(%rbp)
xorl %eax, %eax
cmpl -0xc(%rbp), %eax
je 0x6e92
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6f53
movl $0x0, -0x8(%rbp)
cmpl $0x9, -0x8(%rbp)
jge 0x6f04
movl -0x8(%rbp), %edi
leaq -0x4729(%rip), %rsi     # 0x2780
callq 0x2710
movl -0x8(%rbp), %edi
leaq -0x4738(%rip), %rsi     # 0x2780
callq 0x27a0
movl -0x8(%rbp), %edi
leaq -0x4557(%rip), %rsi     # 0x2970
callq 0x2710
movl -0x8(%rbp), %edi
leaq -0x4566(%rip), %rsi     # 0x2970
callq 0x27a0
movl -0x8(%rbp), %edi
leaq -0x4555(%rip), %rsi     # 0x2990
callq 0x2710
movl -0x8(%rbp), %edi
leaq -0x4564(%rip), %rsi     # 0x2990
callq 0x27a0
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x6e99
callq 0x2660
movl %eax, -0xc(%rbp)
xorl %eax, %eax
cmpl -0xc(%rbp), %eax
je 0x6f1b
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6f53
movl $0x0, -0x8(%rbp)
cmpl $0x9, -0x8(%rbp)
jge 0x6f4b
movl -0x8(%rbp), %edi
callq 0x29f0
movl -0x8(%rbp), %edi
callq 0x2b70
movl -0x8(%rbp), %edi
callq 0x6f60
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x6f22
callq 0x2660
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: class_name_by_score
static
const char *
class_name_by_score (int score)
{
    const char * name;
    if (CL(VERY_EASY) < score) {
        name = CN(VERY_EASY);
    } else if (CL(EASY) < score) {
        name = CN(EASY);
    } else if (CL(MEDIUM) < score) {
        name = CN(MEDIUM);
    } else if (CL(HARD) < score) {
        name = CN(HARD);
    } else {
        name = CN(FIENDISH);
    }
    return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
imull $0xf, 0xb9a6(%rip), %eax # 0x12ba4
cmpl -0x4(%rbp), %eax
jge 0x7210
movq 0x9fc6(%rip), %rax      # 0x111d0
movq %rax, -0x10(%rbp)
jmp 0x726e
imull $0xb, 0xb98d(%rip), %eax # 0x12ba4
cmpl -0x4(%rbp), %eax
jge 0x7229
movq 0x9fb5(%rip), %rax      # 0x111d8
movq %rax, -0x10(%rbp)
jmp 0x726c
imull $0x7, 0xb974(%rip), %eax # 0x12ba4
cmpl -0x4(%rbp), %eax
jge 0x7242
movq 0x9fa4(%rip), %rax      # 0x111e0
movq %rax, -0x10(%rbp)
jmp 0x726a
movl 0xb95c(%rip), %eax      # 0x12ba4
shll $0x2, %eax
cmpl -0x4(%rbp), %eax
jge 0x725d
movq 0x9f91(%rip), %rax      # 0x111e8
movq %rax, -0x10(%rbp)
jmp 0x7268
movq 0x9f8c(%rip), %rax      # 0x111f0
movq %rax, -0x10(%rbp)
jmp 0x726a
jmp 0x726c
jmp 0x726e
movq -0x10(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: rotate
static
void
rotate (int * a, int len, int idx)
{
    int xdi = len - idx;
    int delta = idx - xdi;

    while (0 != delta && 0 != idx) {
        if (delta < 0) {
            if (1 == idx) {
                rotate1_left(a, len);
                idx = 0;
            } else {
                exchange(a, a + xdi, idx);
                len = xdi;
            }
        } else {
            /* 0 < delta */
            if (1 == xdi) {
                rotate1_right(a, len);
                idx = 0;
            } else {
                exchange(a, a + idx, xdi);
                a += xdi;
                len = idx;
                idx -= xdi;
            }
        }
        xdi = len - idx;
        delta = idx - xdi;
    }
    if (0 < idx) {
        exchange(a, a + idx, idx);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
subl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
subl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
xorl %eax, %eax
xorl %ecx, %ecx
cmpl -0x18(%rbp), %ecx
movb %al, -0x19(%rbp)
je 0x72bb
xorl %eax, %eax
cmpl -0x10(%rbp), %eax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x72c7
jmp 0x7388
cmpl $0x0, -0x18(%rbp)
jge 0x730f
movl $0x1, %eax
cmpl -0x10(%rbp), %eax
jne 0x72ec
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7550
movl $0x0, -0x10(%rbp)
jmp 0x730d
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movslq -0x14(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
movl -0x10(%rbp), %edx
callq 0x75b0
movl -0x14(%rbp), %eax
movl %eax, -0xc(%rbp)
jmp 0x7371
movl $0x1, %eax
cmpl -0x14(%rbp), %eax
jne 0x732e
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x7610
movl $0x0, -0x10(%rbp)
jmp 0x736f
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movslq -0x10(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
movl -0x14(%rbp), %edx
callq 0x75b0
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x14(%rbp), %ecx
movl -0x10(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x10(%rbp)
jmp 0x7371
movl -0xc(%rbp), %eax
subl -0x10(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
subl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x72a4
xorl %eax, %eax
cmpl -0x10(%rbp), %eax
jge 0x73aa
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movslq -0x10(%rbp), %rax
shlq $0x2, %rax
addq %rax, %rsi
movl -0x10(%rbp), %edx
callq 0x75b0
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: shuffle
static
void
shuffle (int * a, int len)
{
    int i, j, tmp;

    i = len;
    while (1 <= i) {
        j = rand() % i;
        tmp = a[--i];
        a[i] = a[j];
        a[j] = tmp;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movl $0x1, %eax
cmpl -0x10(%rbp), %eax
jg 0x7417
callq 0x2350
cltd
idivl -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
addl $-0x1, %ecx
movl %ecx, -0x10(%rbp)
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x73c5
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: select_template
static
void
select_template (void)
{
    int i = n_tmplt > 0 ? rand() % n_tmplt : 0;
    tseek(ftmplt, 0, SEEK_SET);
    while (0 <= i && 0 == read_board(ftmplt, 1)) {
        --i;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpl $0x0, 0xafe1(%rip)      # 0x12410
jle 0x7442
callq 0x2350
cltd
idivl 0xafd3(%rip)            # 0x12410
movl %edx, -0x8(%rbp)
jmp 0x7449
xorl %eax, %eax
movl %eax, -0x8(%rbp)
jmp 0x7449
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movq 0xafa2(%rip), %rdi      # 0x123f8
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x7670
xorl %eax, %eax
xorl %ecx, %ecx
cmpl -0x4(%rbp), %ecx
movb %al, -0x9(%rbp)
jg 0x748a
movq 0xaf84(%rip), %rdi      # 0x123f8
movl $0x1, %esi
callq 0x5d90
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
sete %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
testb $0x1, %al
jne 0x7493
jmp 0x749e
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x7461
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: write_title
static
void
write_title(const char * title)
{
    move(TITLE_LINE, LEFT_LEFT);
    wclrtoeol(stdscr);
    if (0 != title) {
        mvaddstr(TITLE_LINE,
                 (int)((LINE_SIZE - strlen(title)) / 2),
                 title);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x9b15(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0x22b0
movq 0x9aff(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
callq 0x22c0
xorl %eax, %eax
cmpq -0x8(%rbp), %rax
je 0x753d
movq 0x9ae8(%rip), %rax      # 0x10fd8
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x20f0
movq -0x10(%rbp), %rdi
movq %rax, %rcx
movl $0x50, %eax
subq %rcx, %rax
shrq %rax
movl %eax, %edx
movl $0x4, %esi
callq 0x22b0
cmpl $-0x1, %eax
jne 0x7525
jmp 0x753d
movq 0x9aac(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2330
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: rotate1_left
static
void
rotate1_left (int * a, int len)
{
    int i, tmp;
    tmp = a[0];
    for (i = 1; i < len; ++i) {
        a[i - 1] = a[i];
    }
    a[len - 1] = tmp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movl $0x1, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x7599
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x756b
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: exchange
static
void
exchange (int * a, int * b, int len)
{
    int i, tmp;
    for (i = 0; i < len; ++i) {
        tmp = a[i];
        a[i] = b[i];
        b[i] = tmp;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x760b
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x1c(%rbp), %edx
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x75c6
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: rotate1_right
static
void
rotate1_right (int * a, int len)
{
    int i, tmp;
    tmp = a[len - 1];
    for (i = len - 1; 0 < i; --i) {
        a[i] = a[i - 1];
    }
    a[0] = tmp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movl -0xc(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x10(%rbp)
xorl %eax, %eax
cmpl -0x10(%rbp), %eax
jge 0x7664
movq -0x8(%rbp), %rax
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x7637
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: tseek
static
int
tseek (FILE *   stream,
       long     offset,
       int      origin)
{
    int ret = -1;
    if (stream != &default_template_file) {
        ret = fseek(stream,
                    offset,
                    origin);
    } else {
        switch (origin) {
            case SEEK_CUR:
                if (default_template_siz > default_template_pos + offset
                    && default_template_pos + offset >= 0) {
                    default_template_pos = offset;
                    ret = 0;
                }
                break;
            case SEEK_END:
                if (default_template_siz - offset >= 0 && offset <= 0) {
                    default_template_pos = offset;
                    ret = 0;
                }
                break;
            case SEEK_SET:
                if (default_template_siz > offset && offset >= 0) {
                    default_template_pos = offset;
                    ret = 0;
                }
                break;
            default:
                /* Invalid origin */
                break;
        }
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0xffffffff, -0x18(%rbp) # imm = 0xFFFFFFFF
leaq 0xb517(%rip), %rax      # 0x12ba8
cmpq %rax, -0x8(%rbp)
je 0x76af
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0x2250
movl %eax, -0x18(%rbp)
jmp 0x7763
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
testl %eax, %eax
je 0x7738
jmp 0x76bb
movl -0x1c(%rbp), %eax
subl $0x1, %eax
je 0x76d2
jmp 0x76c5
movl -0x1c(%rbp), %eax
subl $0x2, %eax
je 0x770d
jmp 0x775f
movslq 0xb5a7(%rip), %rax      # 0x12c80
movslq 0xb5a4(%rip), %rcx      # 0x12c84
addq -0x10(%rbp), %rcx
cmpq %rcx, %rax
jle 0x770b
movslq 0xb594(%rip), %rax      # 0x12c84
addq -0x10(%rbp), %rax
cmpq $0x0, %rax
jl 0x770b
movq -0x10(%rbp), %rax
movl %eax, 0xb580(%rip)      # 0x12c84
movl $0x0, -0x18(%rbp)
jmp 0x7761
movslq 0xb56c(%rip), %rax      # 0x12c80
subq -0x10(%rbp), %rax
cmpq $0x0, %rax
jl 0x7736
cmpq $0x0, -0x10(%rbp)
jg 0x7736
movq -0x10(%rbp), %rax
movl %eax, 0xb555(%rip)      # 0x12c84
movl $0x0, -0x18(%rbp)
jmp 0x7761
movslq 0xb541(%rip), %rax      # 0x12c80
cmpq -0x10(%rbp), %rax
jle 0x775d
cmpq $0x0, -0x10(%rbp)
jl 0x775d
movq -0x10(%rbp), %rax
movl %eax, 0xb52e(%rip)      # 0x12c84
movl $0x0, -0x18(%rbp)
jmp 0x7761
jmp 0x7761
jmp 0x7763
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)