LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/ughman[P]c2c/src/core.cc
// Function: CORE_Start
void CORE_Start(void)
{
	for (uint32_t i = 0x8005F53C;i < 0x8006F488;i += 4)
	{
		EMU_Write32(i,0);
	}
	V0 = EMU_ReadU32(0x8005F420);
	V0 = EMU_CheckedAdd(V0,-8);
	SP = V0 | 0x80000000;
	A1 = V0 - EMU_ReadU32(0x8005F41C) - 0x6F488;
	EMU_Write32(0x8005CDC4,A1);
	EMU_Write32(0x8005CDC0,0x8006F488);
	EMU_Write32(0x8005F5B8,RA); // $RA is garbage here
	GP = 0x8005F414;
	FP = SP;
	EMU_Invoke(0x8001144C,2,0x8006F48C,A1);
	CORE_Main();
	EMU_Break(1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl $0x8005f538, %ebx       # imm = 0x8005F538
addl $0x4, %ebx
movl %ebx, %edi
xorl %esi, %esi
callq 0x172aa1
cmpl $0x8006f484, %ebx       # imm = 0x8006F484
jb 0x174aba
movl $0x8005f420, %edi       # imm = 0x8005F420
callq 0x17240a
leaq 0x6871(%rip), %r14      # 0x17b350
movq (%r14), %rcx
leal -0x8(%rax), %ebx
movl %ebx, 0x8(%rcx)
movl %ebx, %eax
orl $0x80000000, %eax       # imm = 0x80000000
movl %eax, 0x74(%rcx)
movl $0x8005f41c, %edi       # imm = 0x8005F41C
callq 0x17240a
subl %eax, %ebx
addl $0xfff90b78, %ebx       # imm = 0xFFF90B78
movq (%r14), %rax
movl %ebx, 0x14(%rax)
movl $0x8005cdc4, %edi       # imm = 0x8005CDC4
movl %ebx, %esi
callq 0x172aa1
movl $0x8005cdc0, %edi       # imm = 0x8005CDC0
movl $0x8006f488, %esi       # imm = 0x8006F488
callq 0x172aa1
movq (%r14), %rax
movl 0x7c(%rax), %esi
movl $0x8005f5b8, %edi       # imm = 0x8005F5B8
callq 0x172aa1
movq (%r14), %rax
movl $0x8005f414, 0x70(%rax) # imm = 0x8005F414
movl 0x14(%rax), %ecx
movl 0x74(%rax), %edx
movl %edx, 0x78(%rax)
movl $0x8001144c, %edi       # imm = 0x8001144C
movl $0x2, %esi
movl $0x8006f48c, %edx       # imm = 0x8006F48C
xorl %eax, %eax
callq 0x172f17
callq 0x174090
movl $0x1, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x173185
// File: /workspace/github_c_makefile_star2_O3/ughman[P]c2c/src/core.cc
// Function: CORE_VSync
void CORE_VSync(int32_t count,int32_t timeout)
{
	timeout <<= 15;
	while ((int32_t)EMU_ReadU32(0x8005DF30) < count)
	{
		if (!timeout--)
		{
			EMU_Invoke(0x80049424,1,0x80010CE0);
			EMU_Invoke(0x8004A054,1,0);
			EMU_Invoke(0x8004A900,2,3,0);
			break;
		}
		EMU_Cycle(20);
		EMU_RunInterrupts();
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
movl $0x8005df30, %edi       # imm = 0x8005DF30
callq 0x17240a
cmpl %ebp, %eax
jge 0x174baf
shll $0xf, %ebx
notl %ebx
incl %ebx
je 0x174bb6
movl $0x14, %edi
callq 0x1731ff
callq 0x173208
movl $0x8005df30, %edi       # imm = 0x8005DF30
callq 0x17240a
cmpl %ebp, %eax
jl 0x174b8e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x80049424, %edi       # imm = 0x80049424
movl $0x1, %esi
movl $0x80010ce0, %edx       # imm = 0x80010CE0
xorl %eax, %eax
callq 0x172f17
movl $0x8004a054, %edi       # imm = 0x8004A054
movl $0x1, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x172f17
movl $0x8004a900, %edi       # imm = 0x8004A900
movl $0x2, %esi
movl $0x3, %edx
xorl %ecx, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x172f17
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: findmoves
static
int
findmoves (void)
{
    int el;

    idx_possible = 0;
    for (el = 0; el < 9; ++el) {
        if (-1 == singles(el, idx_row, HINT_ROW)        ||
            -1 == singles(el, idx_column, HINT_COLUMN)  ||
            -1 == singles(el, idx_block, HINT_BLOCK)) {
            return -1;
        }
    }
    return idx_possible;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0x0, 0xc689(%rip)      # 0xf460
xorl %ebx, %ebx
leaq 0xf6(%rip), %r14        # 0x2ed6
leaq 0xf5(%rip), %r15        # 0x2edc
leaq 0xf4(%rip), %r12        # 0x2ee2
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebx, %edi
movq %r14, %rsi
movl $0x1000000, %edx        # imm = 0x1000000
callq 0x5d57
cmpl $-0x1, %eax
je 0x2e3c
movl %ebx, %edi
movq %r15, %rsi
movl $0x2000000, %edx        # imm = 0x2000000
callq 0x5d57
cmpl $-0x1, %eax
je 0x2e3c
movl %ebx, %edi
movq %r12, %rsi
movl $0x4000000, %edx        # imm = 0x4000000
callq 0x5d57
cmpl $-0x1, %eax
je 0x2e3c
incl %ebx
cmpl $0x9, %ebx
jne 0x2df3
movl 0xc624(%rip), %ebp      # 0xf460
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: count_set_digits
static
void
count_set_digits (int el, int (*idx_fn)(int, int))
{
    int i;
    memset(counts, 0x00, sizeof(counts));
    for (i = 0; i < 9; ++i) {
        digits[i] = numset(board[(*idx_fn)(el, i)]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0xc61f(%rip)     # 0xf480
movaps %xmm0, 0xc608(%rip)     # 0xf470
movl $0x0, 0xc61e(%rip)      # 0xf490
xorl %r14d, %r14d
leaq 0xc624(%rip), %r15      # 0xf4a0
leaq 0xc5ed(%rip), %r12      # 0xf470
leaq 0xc766(%rip), %r13      # 0xf5f0
movl %ebp, %edi
movl %r14d, %esi
callq *%rbx
cltq
movl (%r15,%rax,4), %eax
movl $0x7, %ecx
xorl %esi, %esi
xorl %edx, %edx
btl %ecx, %eax
jae 0x2ea9
incl %edx
jmp 0x2ead
incl (%rsi,%r12)
addq $0x4, %rsi
incl %ecx
cmpq $0x24, %rsi
jne 0x2ea0
movl %edx, (%r13,%r14,4)
incq %r14
cmpq $0x9, %r14
jne 0x2e8a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: block
static
void
block (int el)
{
    int i, idx, row, col;

    /* Find first unknown square */
    for (i = 0; i < 9 && !IS_EMPTY(idx = idx_block(el, i)); ++i) {
       ;
    }
    if (i < 9) {
        assert(IS_EMPTY(idx));
        row = ROW(idx);
        col = COLUMN(idx);
        for (++i; i < 9; ++i) {
            idx = idx_block(el, i);
            if (IS_EMPTY(idx)) {
                if (ROW(idx) != row) {
                    row = -1;
                }
                if (COLUMN(idx) != col) {
                    col = -1;
                }
            }
        }
        if (0 <= row) {
            exblock(el, row, idx_row);
        }
        if (0 <= col) {
            exblock(el, col, idx_column);
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movslq %edi, %rcx
imulq $0x55555556, %rcx, %rax # imm = 0x55555556
movq %rax, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rax
addl %edx, %eax
leal (%rax,%rax,2), %eax
subl %eax, %ecx
leal (%rcx,%rcx,2), %ecx
xorl %edx, %edx
movl $0xff, %esi
leaq 0xc546(%rip), %rdi      # 0xf4a0
movl %edx, %r8d
andl %esi, %r8d
imull $0xab, %r8d, %r8d
shrl $0x9, %r8d
leal (%r8,%r8,2), %r9d
addl %eax, %r8d
leal (%r8,%r8,8), %r8d
movl %edx, %r10d
subl %r9d, %r10d
andl %esi, %r10d
addl %ecx, %r8d
addl %r10d, %r8d
movslq %r8d, %r14
testb $0xf, 0x2(%rdi,%r14,4)
je 0x2f9c
incl %edx
cmpl $0x9, %edx
jne 0x2f5a
jmp 0x3061
imulq $0x38e38e39, %r14, %rsi # imm = 0x38E38E39
movq %rsi, %r8
shrq $0x3f, %r8
sarq $0x21, %rsi
addl %r8d, %esi
leal (%rsi,%rsi,8), %r8d
subl %r8d, %r14d
cmpl $0x7, %edx
ja 0x3032
movl $0x8, %r8d
subl %edx, %r8d
incl %edx
movzbl %dl, %r10d
imull $0xab, %r10d, %r9d
shrl $0x9, %r9d
leal (%r9,%r9,2), %r11d
subb %r11b, %r10b
addl %eax, %r9d
leal (%r9,%r9,8), %r9d
movzbl %r10b, %r10d
addl %ecx, %r9d
addl %r10d, %r9d
movslq %r9d, %r10
testb $0xf, 0x2(%rdi,%r10,4)
jne 0x302b
imulq $0x38e38e39, %r10, %r10 # imm = 0x38E38E39
movq %r10, %r11
shrq $0x3f, %r11
sarq $0x21, %r10
addl %r11d, %r10d
cmpl %esi, %r10d
je 0x3019
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leal (%r10,%r10,8), %r10d
subl %r10d, %r9d
cmpl %r14d, %r9d
je 0x302b
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
incb %dl
decl %r8d
jne 0x2fc8
testl %esi, %esi
js 0x3044
leaq -0x167(%rip), %rdx      # 0x2ed6
movl %ebx, %edi
callq 0x5f27
testl %r14d, %r14d
js 0x3061
leaq -0x174(%rip), %rdx      # 0x2edc
movl %ebx, %edi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5f27
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: reapply
static
int
reapply (void)
{
    int digit, idx, j;
    int allok = 0;
    memset(board, 0x00, sizeof(board));
    for (j = 0; j < idx_history; ++j) {
        if (!(history[j] & IGNORED) && 0 != GET_DIGIT(history[j])) {
            idx = GET_INDEX(history[j]);
            digit = GET_DIGIT(history[j]);
            if (!IS_EMPTY(idx) || DISALLOWED(idx, digit)) {
                allok = -1;
            }
            board[idx] = SET_DIGIT(digit);
            if (history[j] & FIXED) {
                board[idx] |= FIXED;
            }
            update(idx);
        }
    }
    return allok;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xc1d2(%rip), %rbx      # 0xf4a0
xorl %ebp, %ebp
movl $0x144, %edx            # imm = 0x144
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2190
movl 0xc32f(%rip), %eax      # 0xf614
testl %eax, %eax
jle 0x334c
xorl %r14d, %r14d
leaq 0xc32d(%rip), %r15      # 0xf620
xorl %ebp, %ebp
movl (%r15), %edx
btl $0x16, %edx
jb 0x333d
movl %edx, %ecx
shrl $0x10, %ecx
andl $0xf, %ecx
je 0x333d
movl %edx, %edi
andl $0x7f, %edi
movl %edi, %eax
movl (%rbx,%rax,4), %eax
testl $0xf0000, %eax          # imm = 0xF0000
jne 0x331f
shrl %cl, %eax
testb $0x40, %al
je 0x3324
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
shll $0x10, %ecx
andl $0x100000, %edx         # imm = 0x100000
orl %ecx, %edx
movl %edx, (%rbx,%rdi,4)
callq 0x6054
movl 0xc2d7(%rip), %eax      # 0xf614
incq %r14
movslq %eax, %rcx
addq $0x4, %r15
cmpq %rcx, %r14
jl 0x32f5
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: clear_hints
static
void
clear_hints (void)
{
    int i;
    for (i = 0; i < 9; ++i) {
        mvaddch(TOP + 1 + i + i / 3, LEFT - 2, ' ');
        mvaddch(TOP + 1 + i + i / 3, RIGHT + 2, ' ');
        mvaddch(TOP - 1, LEFT + 2 + 2 * (i + i / 3), ' ');
        mvaddch(BOTTOM + 1, LEFT + 2 + 2 * (i + i / 3), ' ');
    }
    have_hint = 0;
    move_to(curx, cury);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r14d, %r14d
movl $0x7, %ebp
movl $0xaaaaaaab, %r15d      # imm = 0xAAAAAAAB
movq 0xa866(%rip), %r12      # 0xdfd8
movl %r14d, %r13d
imulq %r15, %r13
shrq $0x21, %r13
movq (%r12), %rdi
leal (%r14,%r13), %ebx
addl $0x7, %ebx
movl %ebx, %esi
movl $0x19, %edx
callq 0x22d0
cmpl $-0x1, %eax
je 0x37a7
movq (%r12), %rdi
movl $0x20, %esi
callq 0x2300
movq (%r12), %rdi
movl %ebx, %esi
movl $0x35, %edx
callq 0x22d0
cmpl $-0x1, %eax
je 0x37ca
movq (%r12), %rdi
movl $0x20, %esi
callq 0x2300
addl %r14d, %r13d
movq (%r12), %rdi
leal 0x1d(,%r13,2), %ebx
movl $0x5, %esi
movl %ebx, %edx
callq 0x22d0
cmpl $-0x1, %eax
je 0x37f8
movq (%r12), %rdi
movl $0x20, %esi
callq 0x2300
movq (%r12), %rdi
movl $0x13, %esi
movl %ebx, %edx
callq 0x22d0
cmpl $-0x1, %eax
je 0x381b
movq (%r12), %rdi
movl $0x20, %esi
callq 0x2300
incl %r14d
incl %ebp
cmpl $0x10, %ebp
jne 0x3772
movb $0x0, 0xab18(%rip)      # 0xe348
movl 0xc1b6(%rip), %edi      # 0xf9ec
movl 0xc1b4(%rip), %esi      # 0xf9f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x615b
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: set_status
static
void
set_status (const char * txt)
{
    mvaddstr(STATUS_LINE,
             (int)((LINE_SIZE - strlen(txt)) / 2),
             (char *)txt);

    move_to(curx, cury);
    wrefresh(stdscr);
    have_status = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0xa77a(%rip), %r15      # 0xdfd8
movq (%r15), %r14
callq 0x2100
movl $0x50, %edx
subq %rax, %rdx
shrq %rdx
movq %r14, %rdi
movl $0x14, %esi
callq 0x22d0
cmpl $-0x1, %eax
je 0x3893
movq (%r15), %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2360
movl 0xc153(%rip), %edi      # 0xf9ec
movl 0xc151(%rip), %esi      # 0xf9f0
callq 0x615b
movq (%r15), %rdi
callq 0x2180
movb $0x1, 0xc141(%rip)      # 0xf9f4
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: open_precanned
static
int
open_precanned (const char * filename)
{
    n_precanned = 0;
    precanned = fopen(filename, "r");
    if (0 != precanned) {
        while (0 == read_board(precanned, 0)) {
            ++n_precanned;
        }
    }
    /* return 0 on success, -1 on failure. */
    return (n_precanned > 0) - 1;
}

// Assembly:
pushq %rax
movl $0x0, 0xb708(%rip)      # 0xf3c0
leaq 0x7a4b(%rip), %rsi      # 0xb70a
callq 0x22c0
movq %rax, 0xa6e5(%rip)      # 0xe3b0
testq %rax, %rax
je 0x3ced
movq %rax, %rdi
xorl %esi, %esi
callq 0x61aa
testl %eax, %eax
jne 0x3ced
incl 0xb6dc(%rip)            # 0xf3c0
movq 0xa6c5(%rip), %rdi      # 0xe3b0
jmp 0x3cd3
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: open_template
static
void
open_template (const char * filename)
{
    n_tmplt = 0;
    ftmplt = topen(filename, "r");
    if (0 != ftmplt) {
        while (0 == read_board(ftmplt, 1)) {
            ++n_tmplt;
        }
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x0, 0xb703(%rip)      # 0xf400
leaq 0x7a06(%rip), %rsi      # 0xb70a
callq 0x22c0
testq %rax, %rax
je 0x3d35
movq %rax, 0xb6d3(%rip)      # 0xf3e8
movq %rax, %rdi
movl $0x1, %esi
callq 0x61aa
testl %eax, %eax
jne 0x3d53
incl 0xb6d4(%rip)            # 0xf400
movq 0xb6b5(%rip), %rdi      # 0xf3e8
jmp 0x3d18
leaq 0x7b96(%rip), %rdi      # 0xb8d2
movq %rbx, %rsi
callq 0x2210
testl %eax, %eax
je 0x3d55
movq $0x0, 0xb695(%rip) # 0xf3e8
popq %rbx
retq
movb $0x1, 0xbf14(%rip)      # 0xfc70
movl $0x0, 0xbf0e(%rip)      # 0xfc74
leaq 0xbe2b(%rip), %rax      # 0xfb98
jmp 0x3d0e
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: write_default_template
static
int
write_default_template(const char *     template_path)
{
    int     ret = -1;
    FILE *  f   = fopen(template_path, "r");
    if (0 == f) {
        f = fopen(template_path, "w");
        if (0 != f) {
            size_t i;
            for (i = 0; i < sizeof(default_template); ++i) {
                unsigned char ch = default_template[i];
                int j;
                for (j = 0; j < 4; ++j) {
                    fprintf(f, "%c", dtct[ch & 3]);
                    ch >>= 2;
                }
            }
            ret = fclose(f);
        }
    } else {
        fclose(f);
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x7986(%rip), %rsi      # 0xb70a
callq 0x22c0
testq %rax, %rax
je 0x3daa
movq %rax, %rdi
callq 0x20e0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6f89(%rip), %rsi      # 0xad3a
movq %rbx, %rdi
callq 0x22c0
testq %rax, %rax
je 0x3d96
movq %rax, %rbx
xorl %r14d, %r14d
leaq 0x53f5(%rip), %r15      # 0x91c0
leaq 0x7e40(%rip), %r12      # 0xbc12
movb (%r14,%r15), %r13b
movl $0x4, %ebp
movzbl %r13b, %r13d
movl %r13d, %eax
andl $0x3, %eax
movsbl (%rax,%r12), %edi
movq %rbx, %rsi
callq 0x21c0
shrb $0x2, %r13b
decl %ebp
jne 0x3ddb
incq %r14
cmpq $0x1773, %r14           # imm = 0x1773
jne 0x3dd2
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20e0
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: cleanup_curses_and_more
static
void
cleanup_curses_and_more (void)
{
    if (opened != NULL) {
        fclose(opened);
        opened = NULL;
    }
    if (precanned != NULL) {
        fclose(precanned);
        precanned = NULL;
    }
    tclose(ftmplt);
    ftmplt = NULL;
    move(LAST_LINE, 0);
    wrefresh(stdscr);
    endwin();
}

// Assembly:
pushq %rbx
movq 0xa9df(%rip), %rdi      # 0xfc78
testq %rdi, %rdi
je 0x52ae
callq 0x20e0
movq $0x0, 0xa9ca(%rip) # 0xfc78
movq 0x90fb(%rip), %rdi      # 0xe3b0
testq %rdi, %rdi
je 0x52ca
callq 0x20e0
movq $0x0, 0x90e6(%rip) # 0xe3b0
movq 0xa117(%rip), %rdi      # 0xf3e8
leaq 0xa8c0(%rip), %rax      # 0xfb98
cmpq %rax, %rdi
je 0x52e9
testq %rdi, %rdi
je 0x52fa
callq 0x20e0
jmp 0x52fa
movb $0x0, 0xa980(%rip)      # 0xfc70
movl $0x0, 0xa97a(%rip)      # 0xfc74
movq $0x0, 0xa0e3(%rip) # 0xf3e8
movq 0x8ccc(%rip), %rbx      # 0xdfd8
movq (%rbx), %rdi
movl $0x17, %esi
xorl %edx, %edx
callq 0x22d0
movq (%rbx), %rdi
callq 0x2180
popq %rbx
jmp 0x2350
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq 0xa058(%rip), %rdi      # 0xfc78
testq %rdi, %rdi
je 0x5c4d
xorl %esi, %esi
callq 0x61aa
testl %eax, %eax
je 0x5cd9
movq 0xa03d(%rip), %rdi      # 0xfc78
callq 0x20e0
movq $0x0, 0xa02d(%rip) # 0xfc78
jmp 0x5cc3
cmpq $0x0, 0x875b(%rip)      # 0xe3b0
je 0x5cc3
cmpb $0x0, 0x977e(%rip)      # 0xf3dc
jne 0x5c80
callq 0x2380
imull $0xaaaaaaab, %eax, %eax # imm = 0xAAAAAAAB
addl $0x2aaaaaaa, %eax       # imm = 0x2AAAAAAA
cmpl $0x55555554, %eax       # imm = 0x55555554
ja 0x5cc3
cmpl $0x0, 0x9742(%rip)      # 0xf3c0
jle 0x5cc3
callq 0x2380
cltd
idivl 0x9734(%rip)            # 0xf3c0
movl %edx, %ebx
movq 0x871b(%rip), %rdi      # 0xe3b0
xorl %esi, %esi
xorl %edx, %edx
callq 0x2270
testl %ebx, %ebx
js 0x5cbe
incl %ebx
movq 0x8705(%rip), %rdi      # 0xe3b0
xorl %esi, %esi
callq 0x61aa
testl %eax, %eax
jne 0x5cc3
decl %ebx
testl %ebx, %ebx
jg 0x5ca4
jmp 0x5cd9
cmpl $-0x1, %ebx
je 0x5cd9
leaq 0x5af1(%rip), %rdi      # 0xb7bb
callq 0x384f
callq 0x5329
callq 0x73f6
leaq 0x5b06(%rip), %rdi      # 0xb7e6
callq 0x384f
callq 0x742f
leaq 0x971f(%rip), %rdi      # 0xf410
callq 0x7378
movl $0x8, %eax
movl %eax, 0x9cef(%rip)      # 0xf9f0
movl %eax, 0x9ce5(%rip)      # 0xf9ec
callq 0x753a
xorl %eax, %eax
leaq 0x978b(%rip), %rcx      # 0xf4a0
testb $0xf, 0x2(%rax,%rcx)
je 0x5d2f
addq $0x4, %rax
cmpq $0x144, %rax            # imm = 0x144
jne 0x5d15
movl $0x1, %ecx
jmp 0x5d3a
xorl %ecx, %ecx
cmpq $0x144, %rax            # imm = 0x144
sete %cl
movl %ecx, 0x9fa0(%rip)      # 0xfce0
movl $0xffffffff, 0x8602(%rip) # imm = 0xFFFFFFFF
leaq 0x9f87(%rip), %rdi      # 0xfcd8
popq %rbx
jmp 0x2250
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r15d
xorl %r12d, %r12d
leaq 0x94d2(%rip), %r13      # 0xf4a0
movl %ebp, %edi
movl %r12d, %esi
callq *%rbx
cltq
imulq $0x4bda12f7, %rax, %rcx # imm = 0x4BDA12F7
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x23, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %ecx
imulq $0x38e38e39, %rax, %rdx # imm = 0x38E38E39
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x21, %rdx
addl %esi, %edx
leal (%rdx,%rdx,8), %edx
movl %eax, %esi
subl %edx, %esi
movsbl %sil, %edx
imull $0x56, %edx, %edx
movzwl %dx, %esi
shrl $0x8, %edx
shrl $0xf, %esi
addb %dl, %sil
movsbl %sil, %edx
addl %ecx, %edx
cmpl %r14d, %edx
je 0x603c
movl (%r13,%rax,4), %ecx
testl $0xf0000, %ecx          # imm = 0xF0000
jne 0x603c
orl %r15d, %ecx
movl %ecx, (%r13,%rax,4)
incl %r12d
cmpl $0x9, %r12d
jne 0x5fce
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movslq %edi, %rax
imulq $0x38e38e39, %rax, %rcx # imm = 0x38E38E39
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
sarl %ecx
addl %edx, %ecx
leal (%rcx,%rcx,8), %ecx
movl %eax, %edi
subl %ecx, %edi
imulq $0x4bda12f7, %rax, %r8  # imm = 0x4BDA12F7
movq %r8, %rcx
shrq $0x3f, %rcx
shrq $0x20, %r8
sarl $0x3, %r8d
addl %ecx, %r8d
leal (%r8,%r8,2), %r10d
movsbl %dil, %ecx
imull $0x56, %ecx, %ecx
movzwl %cx, %edx
shrl $0x8, %ecx
shrl $0xf, %edx
addb %cl, %dl
movsbl %dl, %r9d
addl %r9d, %r10d
leaq 0x93ef(%rip), %rdx      # 0xf4a0
movl (%rdx,%rax,4), %r11d
movl %r11d, %ecx
shrl $0x10, %ecx
andb $0xf, %cl
movl $0x40, %esi
shll %cl, %esi
orl $0xff80, %r11d          # imm = 0xFF80
movl %r11d, (%rdx,%rax,4)
movslq %r10d, %r10
imulq $0x55555556, %r10, %rcx # imm = 0x55555556
movq %rcx, %r11
shrq $0x3f, %r11
shrq $0x20, %rcx
addl %r11d, %ecx
leal (%rcx,%rcx,2), %ecx
subl %ecx, %r10d
movslq %edi, %rdi
leal (%r8,%r8,8), %ecx
leal (%rcx,%rcx,2), %r8d
leal (%r9,%r9,8), %ecx
addl %r8d, %ecx
addl %r10d, %r10d
leal (%r10,%r10,2), %r8d
subl %r8d, %ecx
shlq $0x2, %rax
leaq (,%rdi,4), %r8
subq %r8, %rax
leaq (%rdx,%rdi,4), %rdi
xorl %r8d, %r8d
movl $0xaaaaaaab, %r9d       # imm = 0xAAAAAAAB
movl %r8d, %r10d
imulq %r9, %r10
shrq $0x21, %r10
leal (%r10,%r10,2), %r10d
leal (%rcx,%r10,2), %r10d
leaq (%rax,%r8,4), %r11
orl %esi, (%rdx,%r11)
orl %esi, (%rdi)
addl %r8d, %r10d
movslq %r10d, %r10
orl %esi, (%rdx,%r10,4)
incq %r8
addq $0x24, %rdi
cmpq $0x9, %r8
jne 0x6126
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movl %edi, 0x988a(%rip)      # 0xf9ec
movl %esi, 0x9888(%rip)      # 0xf9f0
movq 0x7e69(%rip), %rbx      # 0xdfd8
movq (%rbx), %rax
movl %esi, %ecx
movl $0xaaaaaaab, %edx       # imm = 0xAAAAAAAB
imulq %rdx, %rcx
shrq $0x21, %rcx
addl %ecx, %esi
addl $0x7, %esi
movl %edi, %ecx
imulq %rdx, %rcx
shrq $0x21, %rcx
addl %edi, %ecx
leal 0x1d(,%rcx,2), %edx
movq %rax, %rdi
callq 0x22d0
movq (%rbx), %rdi
popq %rbx
jmp 0x2180
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: tgets
static
char *
tgets (char *   str,
       int      n,
       FILE *    stream)
{
    char * ret = 0;
    if (stream == &default_template_file) {
        int i = 0;
        if (str != 0
            && n > 0
            && default_template_siz > default_template_pos
            && default_template_pos >= 0) {
            char ch = 0;
            while (default_template_pos < default_template_siz
                   && n > i) {
                unsigned char ci = default_template[default_template_pos >> 2];
                int j = (default_template_pos++ & 3);
                if (j > 0) {
                    ci >>= 2 * j;
                }
                ch = dtct[ci & 3];
                str[i++] = ch;
                if (ch == '\n') {
                    break;
                }
            }
            if (i < n) {
                str[i++] = 0;
                ret = str;
            } else if (i == n && 0 < n) {
                str[n - 1] = 0;
                ret = str;
            }
        }
    } else {
        ret = fgets (str,
                     n,
                     stream);
    }
    return ret;
}

// Assembly:
leaq 0x969b(%rip), %rax      # 0xfb98
cmpq %rax, %rdi
je 0x6516
movq %rdi, %rdx
leaq 0x94f4(%rip), %rdi      # 0xfa00
movl $0x50, %esi
jmp 0x21f0
movl 0x9758(%rip), %eax      # 0xfc74
cmpl $0x5dcc, %eax           # imm = 0x5DCC
setb %cl
andb 0x9746(%rip), %cl       # 0xfc70
cmpb $0x1, %cl
jne 0x65bf
movl %eax, %esi
xorl %edx, %edx
leaq 0x2c82(%rip), %rdi      # 0x91c0
leaq 0x56cd(%rip), %r8       # 0xbc12
leaq 0x94b4(%rip), %rax      # 0xfa00
leaq (%rsi,%rdx), %r9
cmpl $0x5dcb, %r9d           # imm = 0x5DCB
jg 0x659e
cmpq $0x4f, %rdx
ja 0x659e
movl %r9d, %ecx
shrl $0x2, %ecx
movzbl (%rcx,%rdi), %r10d
leal (%rsi,%rdx), %ecx
incl %ecx
movl %ecx, 0x96ff(%rip)      # 0xfc74
andl $0x3, %r9d
leal (%r9,%r9), %ecx
movl %r10d, %r11d
shrl %cl, %r11d
testl %r9d, %r9d
cmovel %r10d, %r11d
andl $0x3, %r11d
movb (%r11,%r8), %cl
movb %cl, (%rdx,%rax)
incq %rdx
cmpq $0x2, %r11
jne 0x654c
cmpl $0x4f, %edx
jg 0x65b2
movslq %edx, %rcx
leaq 0x9453(%rip), %rax      # 0xfa00
movb $0x0, (%rcx,%rax)
retq
cmpl $0x50, %edx
jne 0x65bf
movb $0x0, 0x9491(%rip)      # 0xfa4f
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
testl %esi, %esi
je 0x6626
movl %esi, %ebx
movslq %edi, %r14
leaq 0x8eca(%rip), %rax      # 0xf4a0
movl (%rax,%r14,4), %ecx
movl %ecx, %edx
shrl $0x10, %edx
andl $0xf, %edx
je 0x65f0
xorl %ebp, %ebp
cmpl %ebx, %edx
setne %bpl
negl %ebp
jmp 0x661f
leal 0x6(%rbx), %edx
movzbl %dl, %edx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
btl %edx, %ecx
jb 0x661f
movl %ebx, %ecx
shll $0x10, %ecx
movl %ecx, (%rax,%r14,4)
movl %r14d, %edi
callq 0x6054
xorl %ebp, %ebp
movl %r14d, %edi
movl %ebx, %esi
xorl %edx, %edx
callq 0x6645
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x46d0(%rip), %rdi      # 0xacfd
leaq 0x43c6(%rip), %rsi      # 0xa9fa
leaq 0x46cd(%rip), %rcx      # 0xad08
movl $0x3a8, %edx            # imm = 0x3A8
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %ebx
movl 0x8fbe(%rip), %eax      # 0xf614
cmpl $0xf2, %eax
jb 0x666d
movl $0x51, %edi
callq 0x66b0
movl 0x8fa7(%rip), %eax      # 0xf614
shll $0x10, %r14d
orl %ebx, %ebp
orl %r14d, %ebp
leal 0x1(%rax), %ecx
movl %ecx, 0x8f95(%rip)      # 0xf614
movslq %eax, %rcx
leaq 0x8f97(%rip), %rax      # 0xf620
movl %ebp, (%rax,%rcx,4)
movl %ecx, %ecx
testl %ecx, %ecx
jle 0x66ab
movl -0x4(%rax,%rcx,4), %edx
decq %rcx
movl %edx, %esi
andl $0x7f, %esi
cmpl %ebx, %esi
jne 0x668e
orl $0x400000, %edx         # imm = 0x400000
movl %edx, (%rax,%rcx,4)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movl 0x8f5e(%rip), %eax      # 0xf614
leaq 0x8f63(%rip), %rcx      # 0xf620
xorl %edx, %edx
testl %eax, %eax
jle 0x66dc
movq %rcx, %rsi
testb $0x40, 0x2(%rsi)
jne 0x66dc
incq %rdx
addq $0x4, %rsi
cmpq %rdx, %rax
jne 0x66c6
movl %eax, %esi
jmp 0x6751
cmpl %eax, %edx
setge %sil
cmpl %edi, %edx
setge %r8b
orb %sil, %r8b
jne 0x6718
movl %edx, %esi
leaq (%rcx,%rsi,4), %r8
movl %edx, %esi
movl (%r8), %r9d
btl $0x16, %r9d
jb 0x6708
movslq %esi, %r10
incl %esi
movl %r9d, (%rcx,%r10,4)
incl %edx
cmpl %edx, %eax
jle 0x671a
addq $0x4, %r8
cmpl %edi, %esi
jl 0x66f5
jmp 0x671a
movl %edx, %esi
cmpl %eax, %edx
jge 0x6751
movslq %esi, %rdi
movl %edx, %edx
leaq (,%rdx,4), %r9
shlq $0x2, %rdi
xorl %r8d, %r8d
leaq (%r9,%r8,4), %r10
movl (%rcx,%r10), %r10d
leaq (%rdi,%r8,4), %r11
movl %r10d, (%rcx,%r11)
incq %r8
leal (%rdx,%r8), %r10d
cmpl %r10d, %eax
jg 0x6732
addl %r8d, %esi
movl %esi, 0x8ebd(%rip)      # 0xf614
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x7a96(%rip), %rbx      # 0xe200
leaq 0x8d2f(%rip), %r15      # 0xf4a0
leaq 0x8cf8(%rip), %r12      # 0xf470
leaq 0xace(%rip), %r14       # 0x724d
callq 0x6a46
testl %eax, %eax
jle 0x67b7
incl 0x9406(%rip)            # 0xfb94
movl %eax, %r13d
movq %rbx, %rbp
movl (%rbp), %esi
movl %esi, %edi
andl $0x7f, %edi
shrl $0x10, %esi
andl $0xf, %esi
callq 0x65c2
cmpl $-0x1, %eax
je 0x67bb
addq $0x4, %rbp
decq %r13
jne 0x6794
jmp 0x677f
testl %eax, %eax
je 0x67ca
callq 0x686f
cmpl $-0x1, %eax
jne 0x677f
jmp 0x6857
xorl %ecx, %ecx
xorl %eax, %eax
movl (%r15,%rcx,4), %esi
testl $0xf0000, %esi          # imm = 0xF0000
jne 0x6816
xorl %edi, %edi
movl $0x7, %r8d
xorl %edx, %edx
btl %r8d, %esi
jae 0x67ee
incl %edx
jmp 0x67f2
incl (%rdi,%r12)
addq $0x4, %rdi
incl %r8d
cmpq $0x24, %rdi
jne 0x67e4
movl %edx, %esi
shll $0x10, %esi
addl %ecx, %esi
movslq %eax, %rdi
movl %esi, (%rbx,%rdi,4)
andl $0xf, %edx
cmpl $0x9, %edx
je 0x67bb
incl %eax
incq %rcx
cmpq $0x51, %rcx
jne 0x67ce
testl %eax, %eax
je 0x686b
movslq %eax, %rsi
movl $0x4, %edx
movq %rbx, %rdi
movq %r14, %rcx
callq 0x2070
movl 0x79c4(%rip), %edi      # 0xe200
andl $0x7f, %edi
movl $0x1, %esi
callq 0x69e8
cmpl $-0x1, %eax
jne 0x677f
jmp 0x67bb
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x685c
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
movl 0x8d9b(%rip), %ecx      # 0xf614
leal -0x1(%rcx), %eax
movl %eax, 0x8d92(%rip)      # 0xf614
cmpl $0x2, %ecx
jl 0x68d0
leaq 0x8d92(%rip), %r14      # 0xf620
movl %eax, %ecx
movl (%r14,%rcx,4), %ebp
btl $0x15, %ebp
jae 0x68c0
movl %ebp, %ebx
andl $0x7f, %ebx
shrl $0x10, %ebp
andl $0xf, %ebp
incl %ebp
callq 0x32c0
movl %ebx, %edi
movl %ebp, %esi
callq 0x69e8
cmpl $-0x1, %eax
jne 0x68d5
movl 0x8d54(%rip), %eax      # 0xf614
leal -0x1(%rax), %ecx
movl %ecx, 0x8d4b(%rip)      # 0xf614
cmpl $0x1, %eax
movl %ecx, %eax
jg 0x688e
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rax
movl $0x0, 0x92ad(%rip)      # 0xfb94
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
leaq 0x8d2d(%rip), %rcx      # 0xf620
incl %eax
testb $0x10, 0x2(%rcx)
leaq 0x4(%rcx), %rcx
jne 0x68f3
movl %eax, 0x8d0f(%rip)      # 0xf614
callq 0x32c0
callq 0x6758
cmpl $-0x1, %eax
je 0x6983
movl $0x51, %eax
xorl %ecx, %ecx
leaq 0x8b7e(%rip), %rdx      # 0xf4a0
movl (%rcx,%rdx), %esi
shll $0xb, %esi
sarl $0x1f, %esi
addl %esi, %eax
addq $0x4, %rcx
cmpq $0x144, %rcx            # imm = 0x144
jne 0x6922
cmpl $0x51, 0x8cd3(%rip)     # 0xf614
jne 0x69c9
xorl %ecx, %ecx
leaq 0x8cd0(%rip), %rdx      # 0xf620
movl %eax, %esi
leal -0x5(%rsi), %eax
testb $0x20, 0x2(%rcx,%rdx)
cmovel %esi, %eax
addq $0x4, %rcx
cmpq $0x144, %rcx            # imm = 0x144
jne 0x6950
movl 0x9224(%rip), %ecx      # 0xfb94
leal (%rcx,%rcx,4), %edx
leal (%rdx,%rdx,2), %edx
cmpl %eax, %edx
jge 0x6987
leaq 0x439a(%rip), %rax      # 0xad1b
jmp 0x69c7
xorl %eax, %eax
jmp 0x69c7
leal (%rcx,%rcx,4), %edx
leal (%rcx,%rdx,2), %edx
cmpl %eax, %edx
jge 0x699a
leaq 0x4388(%rip), %rax      # 0xad20
jmp 0x69c7
leal (,%rcx,8), %edx
subl %ecx, %edx
cmpl %eax, %edx
jge 0x69b0
leaq 0x4377(%rip), %rax      # 0xad25
jmp 0x69c7
shll $0x2, %ecx
cmpl %eax, %ecx
leaq 0x4370(%rip), %rcx      # 0xad2c
leaq 0x436e(%rip), %rax      # 0xad31
cmovlq %rcx, %rax
popq %rcx
retq
leaq 0x480b(%rip), %rdi      # 0xb1db
leaq 0x4023(%rip), %rsi      # 0xa9fa
leaq 0x480f(%rip), %rcx      # 0xb1ed
movl $0x7df, %edx            # imm = 0x7DF
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rbx
pushq %rax
cmpl $0x9, %esi
jg 0x6a1e
movl %esi, %ebx
movl %edi, %ebp
movl %edi, %eax
leaq 0x8aa3(%rip), %rdx      # 0xf4a0
movl (%rdx,%rax,4), %edi
shll $0x10, %esi
movl %edi, %r8d
movl %ebx, %ecx
shrl %cl, %r8d
testb $0x40, %r8b
je 0x6a25
incl %ebx
addl $0x10000, %esi          # imm = 0x10000
cmpl $0xa, %ebx
jne 0x6a03
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x6a3d
movl %esi, (%rdx,%rax,4)
movl %ebp, %edi
callq 0x6054
movl %ebp, %edi
movl %ebx, %esi
movl $0x200000, %edx         # imm = 0x200000
callq 0x6645
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movl %esi, %eax
subl %edx, %eax
movl %edx, %ecx
subl %eax, %ecx
sete %sil
testl %edx, %edx
sete %dil
orb %sil, %dil
jne 0x7303
testl %ecx, %ecx
js 0x72c3
cmpl $0x1, %eax
je 0x7325
jl 0x72b5
movslq %edx, %rcx
leaq (%rbx,%rcx,4), %rcx
movl %eax, %esi
xorl %edi, %edi
movl (%rbx,%rdi,4), %r8d
movl (%rcx,%rdi,4), %r9d
movl %r9d, (%rbx,%rdi,4)
movl %r8d, (%rcx,%rdi,4)
incq %rdi
cmpq %rdi, %rsi
jne 0x729d
movslq %eax, %rcx
leaq (%rbx,%rcx,4), %rbx
movl %edx, %r14d
subl %eax, %edx
jmp 0x72f4
cmpl $0x1, %edx
je 0x7350
jl 0x72f1
movslq %eax, %rcx
leaq (%rbx,%rcx,4), %rcx
movl %edx, %esi
xorl %edi, %edi
movl (%rbx,%rdi,4), %r8d
movl (%rcx,%rdi,4), %r9d
movl %r9d, (%rbx,%rdi,4)
movl %r8d, (%rcx,%rdi,4)
incq %rdi
cmpq %rdi, %rsi
jne 0x72d9
movl %eax, %r14d
movl %r14d, %eax
subl %edx, %eax
movl %edx, %ecx
subl %eax, %ecx
je 0x7303
testl %edx, %edx
jne 0x7283
testl %edx, %edx
jle 0x7373
movl %edx, %eax
leaq (%rbx,%rax,4), %rcx
xorl %edx, %edx
movl (%rbx,%rdx,4), %esi
movl (%rcx,%rdx,4), %edi
movl %edi, (%rbx,%rdx,4)
movl %esi, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x730f
jmp 0x7373
movslq %r14d, %rax
movl -0x4(%rbx,%rax,4), %eax
cmpl $0x2, %r14d
jl 0x734c
decl %r14d
movl %r14d, %ecx
incq %rcx
movl -0x8(%rbx,%rcx,4), %edx
movl %edx, -0x4(%rbx,%rcx,4)
decq %rcx
cmpq $0x1, %rcx
ja 0x733b
movl %eax, (%rbx)
jmp 0x7373
movl (%rbx), %ebp
cmpl $0x2, %r14d
jl 0x736c
leaq 0x4(%rbx), %rsi
leal -0x1(%r14), %edx
shlq $0x2, %rdx
movq %rbx, %rdi
callq 0x2280
movslq %r14d, %rax
movl %ebp, -0x4(%rbx,%rax,4)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x6c51(%rip), %r15      # 0xdfd8
movq (%r15), %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0x22d0
movq (%r15), %rdi
callq 0x22e0
testq %rbx, %rbx
je 0x73e0
movq (%r15), %r14
movq %rbx, %rdi
callq 0x2100
movl $0x50, %edx
subq %rax, %rdx
shrq %rdx
movq %r14, %rdi
movl $0x4, %esi
callq 0x22d0
cmpl $-0x1, %eax
je 0x73e0
movq (%r15), %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
jmp 0x2360
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: clear_status
static
void
clear_status (void)
{
    move(STATUS_LINE, LEFT_LEFT);
    wclrtoeol(stdscr);
    move_to(curx, cury);
    have_status = 0;
}

// Assembly:
pushq %rbx
movq 0x6bda(%rip), %rbx      # 0xdfd8
movq (%rbx), %rdi
movl $0x14, %esi
xorl %edx, %edx
callq 0x22d0
movq (%rbx), %rdi
callq 0x22e0
movl 0x85d1(%rip), %edi      # 0xf9ec
movl 0x85cf(%rip), %esi      # 0xf9f0
callq 0x615b
movb $0x0, 0x85c7(%rip)      # 0xf9f4
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: render
static
void
render (void)
{
    int i, x, y;

    for (i = 0; i < 81; ++i) {
        x = LEFT + 2 + 2 * (COLUMN(i) + COLUMN(i) / 3);
        y = TOP + 1 + ROW(i) + ROW(i) / 3;
        assert(0 <= DIGIT(i));
        assert(DIGIT(i) <= 9); /* XXX FAILING */
        if (IS_FIXED(i)) {
            attron(A_BOLD);
        }
        if (IS_EMPTY(i)) {
            mvaddch(y, x, '.');
        } else {
            mvaddch(y, x, '0' + DIGIT(i));
        }
        if (IS_FIXED(i)) {
            attroff(A_BOLD);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x8063(%rip), %rbx      # 0xf4a0
xorl %r14d, %r14d
movq 0x6b91(%rip), %r15      # 0xdfd8
movl (%rbx), %ebp
movl %ebp, %eax
andl $0xe0000, %eax          # imm = 0xE0000
cmpl $0xa0000, %eax          # imm = 0xA0000
jae 0x751b
btl $0x14, %ebp
jae 0x7472
movq (%r15), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %edx, %edx
callq 0x21d0
movl (%rbx), %ebp
movzbl %r14b, %ecx
imull $0x39, %ecx, %eax
shrl $0x9, %eax
leal (%rax,%rax,8), %edx
movl %r14d, %esi
subb %dl, %sil
movzbl %sil, %esi
imull $0xab, %esi, %esi
shrl $0x9, %esi
addb %r14b, %sil
subb %dl, %sil
addb %sil, %sil
addb $0x1d, %sil
movzbl %sil, %edx
leal (%rcx,%rcx,8), %esi
leal (%rcx,%rsi,2), %ecx
shrl $0x9, %ecx
addb %al, %cl
addb $0x7, %cl
movzbl %cl, %esi
movq (%r15), %rdi
callq 0x22d0
testl $0xf0000, %ebp          # imm = 0xF0000
je 0x74d8
cmpl $-0x1, %eax
je 0x74ea
movq (%r15), %rdi
movzwl 0x2(%rbx), %esi
andl $0xf, %esi
orl $0x30, %esi
jmp 0x74e5
cmpl $-0x1, %eax
je 0x74ea
movq (%r15), %rdi
movl $0x2e, %esi
callq 0x2300
testb $0x10, 0x2(%rbx)
je 0x74ff
movq (%r15), %rdi
movl $0x200000, %esi         # imm = 0x200000
xorl %edx, %edx
callq 0x2370
incq %r14
addq $0x4, %rbx
cmpq $0x51, %r14
jne 0x7447
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x42f2(%rip), %rdi      # 0xb814
leaq 0x34d1(%rip), %rsi      # 0xa9fa
leaq 0x42d2(%rip), %rcx      # 0xb802
movl $0x73c, %edx            # imm = 0x73C
callq 0x2160
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: move_next
void
static
move_next (void)
{
    int is_loop = 0;
    do {
        if (curx < 8) {
            move_to(curx + 1, cury);
        } else if (cury < 8) {
            move_to(0, cury + 1);
        } else {
            move_to(0, 0);
            if (is_loop++ > 0) {
                /* We can get here if the user attempts to load a fully
                 * populated board. In that case it's better to break.  */
                break;
            }
        }
     } while (IS_FIXED(INDEX(cury, curx)));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
movl 0x84a3(%rip), %edi      # 0xf9ec
leaq 0x7f50(%rip), %r14      # 0xf4a0
movq 0x6a81(%rip), %r15      # 0xdfd8
xorl %ebp, %ebp
cmpl $0x7, %edi
jg 0x7568
incl %edi
movl 0x848a(%rip), %esi      # 0xf9f0
jmp 0x7577
movl 0x8482(%rip), %esi      # 0xf9f0
cmpl $0x7, %esi
jg 0x757e
incl %esi
xorl %edi, %edi
callq 0x615b
jmp 0x75aa
movl %ebx, 0x8468(%rip)      # 0xf9ec
movl %ebx, 0x8466(%rip)      # 0xf9f0
movq (%r15), %rdi
movl $0x7, %esi
movl $0x1d, %edx
callq 0x22d0
movq (%r15), %rdi
callq 0x2180
testl %ebp, %ebp
jg 0x75c3
incl %ebp
movl 0x8440(%rip), %eax      # 0xf9f0
leal (%rax,%rax,8), %eax
movl 0x8433(%rip), %edi      # 0xf9ec
addl %edi, %eax
testb $0x10, 0x2(%r14,%rax,4)
jne 0x7559
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: getkey
static
int
getkey (void)
{
    int ch = wgetch(stdscr);
    if (0x1b == ch) {
        ch = wgetch(stdscr);
        if ('[' == ch) {
            ch = wgetch(stdscr);
            switch (ch) {
                case 'A': ch = VKEY_UP;     break;
                case 'B': ch = VKEY_DOWN;   break;
                case 'C': ch = VKEY_RIGHT;  break;
                case 'D': ch = VKEY_LEFT;   break;
                case 'H': ch = VKEY_HOME;   break;
                case '2': ch = VKEY_INSERT; break;
                case '3': ch = VKEY_DELETE; break;
                case '4': ch = VKEY_END;    break;
                case '5': ch = VKEY_PGUP;   break;
                case '6': ch = VKEY_PGDOWN; break;
                default:  ch = VKEY_IGNORE;
            }
            if (ch == VKEY_HOME ||
                ch == VKEY_DELETE ||
                ch == VKEY_INSERT ||
                ch == VKEY_END ||
                ch == VKEY_PGUP ||
                ch == VKEY_PGDOWN) {
                int ch4 = wgetch(stdscr);
                if (ch4 != '~') {
                    ch = VKEY_IGNORE;
                }
            }
        } else {
            /* Enabling the Esc Esc sequence to produce one Esc character */
            if (0x1b != ch) {
                ch = VKEY_IGNORE;
            }
        }
    }
    return ch;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq 0x6a00(%rip), %rbx      # 0xdfd8
movq (%rbx), %rdi
callq 0x20a0
cmpl $0x1b, %eax
jne 0x767c
movq (%rbx), %rdi
callq 0x20a0
cmpl $0x5b, %eax
jne 0x761d
movq (%rbx), %rdi
callq 0x20a0
addl $-0x32, %eax
cmpl $0x16, %eax
ja 0x764f
leaq 0x1b4f(%rip), %rcx      # 0x915c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x132, %ebp            # imm = 0x132
jmp 0x7669
movl %eax, %ecx
cmpl $0x1b, %eax
movl $0x100, %eax            # imm = 0x100
cmovel %ecx, %eax
jmp 0x767c
movl $0x134, %ebp            # imm = 0x134
jmp 0x7669
movl $0x141, %eax            # imm = 0x141
jmp 0x767c
movl $0x133, %ebp            # imm = 0x133
jmp 0x7669
movl $0x142, %eax            # imm = 0x142
jmp 0x767c
movl $0x143, %eax            # imm = 0x143
jmp 0x767c
movl $0x100, %eax            # imm = 0x100
jmp 0x767c
movl $0x135, %ebp            # imm = 0x135
jmp 0x7669
movl $0x136, %ebp            # imm = 0x136
jmp 0x7669
movl $0x148, %ebp            # imm = 0x148
movq (%rbx), %rdi
callq 0x20a0
cmpl $0x7e, %eax
movl $0x100, %eax            # imm = 0x100
cmovel %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x144, %eax            # imm = 0x144
jmp 0x767c
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: fix
static
int
fix (void)
{
    int i;

    if (0 == reapply()) {
        compress(idx_history);
        for (i = 0; i < idx_history; ++i) {
            history[i] |= FIXED;
        }
        reapply();
        render();
        if (idx_history < 81 && IS_FIXED(INDEX(cury, curx))) {
            move_next();
        } else {
            move_to(curx, cury);
        }
        return 0;
    } else {
        return -1;
    }
}

// Assembly:
pushq %rax
callq 0x32c0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x770d
movl 0x7f73(%rip), %edi      # 0xf614
callq 0x66b0
movslq 0x7f67(%rip), %rax      # 0xf614
testq %rax, %rax
jle 0x76cd
shlq $0x2, %rax
xorl %ecx, %ecx
leaq 0x7f61(%rip), %rdx      # 0xf620
orb $0x10, 0x2(%rcx,%rdx)
addq $0x4, %rcx
cmpq %rcx, %rax
jne 0x76bf
callq 0x32c0
callq 0x742f
cmpl $0x50, 0x7f36(%rip)     # 0xf614
movl 0x8308(%rip), %edi      # 0xf9ec
movl 0x8306(%rip), %esi      # 0xf9f0
jg 0x76ff
leal (%rsi,%rsi,8), %eax
addl %edi, %eax
leaq 0x7da8(%rip), %rcx      # 0xf4a0
testb $0x10, 0x2(%rcx,%rax,4)
jne 0x7706
callq 0x615b
jmp 0x770b
callq 0x753a
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/cinemast[P]sudoku/sudoku.c
// Function: status_message
static
void
status_message (const char * txt)
{
    beep();
    set_status(txt);
    usleep(2000000);
    clear_status();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x20d0
movq %rbx, %rdi
callq 0x384f
movl $0x1e8480, %edi         # imm = 0x1E8480
callq 0x23a0
popq %rbx
jmp 0x73f6