// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: get_string
static
int
get_string (char *                  buffer,
           size_t                   buffsize,
           const char *             edit_field_name,
           const char *             default_name,
           const char *             operation_name,
           char                     default_prompt,
           pathname_function        get_pathname)
{
    int i = 0;
    char * temp_str = NULL;
    int line;

    if (buffsize > 0) {
        temp_str = (char *)calloc(buffsize, sizeof(char));
    }
    assert (buffer != NULL && buffsize > 0);
    if (buffer != NULL && temp_str != NULL) {
        #if (LINE_SIZE - LEFT_MIDDLE + 1) < 60
        #error "Bad parameters, there isn't enough room for status display."
        #endif
        char abort_message[LINE_SIZE - LEFT_MIDDLE + 1];
        size_t  storage_size = sizeof(abort_message);
        const char * first_part = "Press Esc key twice to abort the '";
        const char * last_part  = "' operation.";

        strncpy(abort_message, first_part, storage_size);
        abort_message[sizeof(abort_message) - 1]= '\0';
        storage_size -= strlen(abort_message) + 1;
        strncat (abort_message, operation_name, storage_size);
        storage_size = sizeof(abort_message) - strlen(abort_message) - 1;
        strncat (abort_message, last_part, storage_size);

        strncpy (temp_str, buffer, buffsize);
        /* Just a safety measure. */
        temp_str[buffsize - 1]= '\0';

        if (get_pathname != NULL) {
            get_pathname (temp_str,
                          buffsize,
                          default_name);
        }

        if ('\0' == *temp_str) {
            size_t dns = ((default_name != NULL) ? strlen(default_name) : 0);
            temp_str[0] = default_prompt;
            if (0 < dns && dns < buffsize - 1) {
                strcpy(temp_str + 1, default_name);
            }
        }

        clear_status();
        mvaddstr(STATUS_LINE, LEFT_LEFT, edit_field_name);
        mvaddstr(STATUS_LINE, LEFT_MIDDLE, abort_message);

        i = edit_line(FILE_LINE,
                      LEFT_LEFT,
                      temp_str,
                      buffsize,
                      LINE_SIZE - LEFT_LEFT - 3);

        if (i > 0) {
            /* We have a nonzero length string, and the user
             * didn't abort by pressing the Esc key twice.
             * Let's copy the new filename to the output buffer. */
            strcpy (buffer, temp_str);
        } else {
            i = 0;
        }

        /* Reset screen */
        clear_status();
        for (line = FILE_LINE; line <= LAST_LINE; ++line) {
            /* Clear the filename and below from the seen. */
            move(line, LEFT_LEFT);
            wclrtoeol(stdscr);
        }
        move_to(curx, cury);
    }
    free(temp_str);
    return (i > 0) - 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movb %r9b, %al
movq 0x10(%rbp), %r9
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movb %al, -0x29(%rbp)
movl $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
jbe 0x87e1
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x21e0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x87f1
cmpq $0x0, -0x10(%rbp)
jbe 0x87f1
jmp 0x8810
leaq 0x54cf(%rip), %rdi      # 0xdcc7
leaq 0x44f2(%rip), %rsi      # 0xccf1
movl $0xbf8, %edx            # imm = 0xBF8
leaq 0x54db(%rip), %rcx      # 0xdce6
callq 0x2150
cmpq $0x0, -0x8(%rbp)
je 0x8a83
cmpq $0x0, -0x38(%rbp)
je 0x8a83
movq $0x42, -0x88(%rbp)
leaq 0x5510(%rip), %rax      # 0xdd48
movq %rax, -0x90(%rbp)
leaq 0x5525(%rip), %rax      # 0xdd6b
movq %rax, -0x98(%rbp)
leaq -0x80(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0x2040
movb $0x0, -0x3f(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x20f0
movq %rax, %rcx
addq $0x1, %rcx
movq -0x88(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0x21a0
leaq -0x80(%rbp), %rdi
callq 0x20f0
movq %rax, %rcx
movl $0x42, %eax
subq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0x21a0
movq -0x38(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x2040
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
cmpq $0x0, 0x10(%rbp)
je 0x890d
movq 0x10(%rbp), %rax
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq *%rax
movq -0x38(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x8987
cmpq $0x0, -0x20(%rbp)
je 0x8933
movq -0x20(%rbp), %rdi
callq 0x20f0
movq %rax, -0xa8(%rbp)
jmp 0x893e
xorl %eax, %eax
movq %rax, -0xa8(%rbp)
jmp 0x893e
movq -0xa8(%rbp), %rax
movq %rax, -0xa0(%rbp)
movb -0x29(%rbp), %cl
movq -0x38(%rbp), %rax
movb %cl, (%rax)
xorl %eax, %eax
cmpq -0xa0(%rbp), %rax
jae 0x8985
movq -0xa0(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x8985
movq -0x38(%rbp), %rdi
addq $0x1, %rdi
movq -0x20(%rbp), %rsi
callq 0x2050
jmp 0x8987
callq 0x7ce0
movq 0x8645(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
movl $0x14, %esi
xorl %edx, %edx
callq 0x22b0
cmpl $-0x1, %eax
jne 0x89a9
jmp 0x89c1
movq 0x8628(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2330
movq 0x8610(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
movl $0x14, %esi
movl $0xf, %edx
callq 0x22b0
cmpl $-0x1, %eax
jne 0x89e1
jmp 0x89f9
movq 0x85f0(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
leaq -0x80(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2330
movq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rcx
movl $0x15, %edi
xorl %esi, %esi
movl $0x4d, %r8d
callq 0x8c20
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jle 0x8a2b
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x2050
jmp 0x8a32
movl $0x0, -0x30(%rbp)
callq 0x7ce0
movl $0x15, -0x3c(%rbp)
cmpl $0x17, -0x3c(%rbp)
jg 0x8a72
movq 0x858d(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
movl -0x3c(%rbp), %esi
xorl %edx, %edx
callq 0x22b0
movq 0x8579(%rip), %rax      # 0x10fd8
movq (%rax), %rdi
callq 0x22c0
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x8a3e
movl 0x9f84(%rip), %edi      # 0x129fc
movl 0x9f82(%rip), %esi      # 0x12a00
callq 0x5d10
movq -0x38(%rbp), %rdi
callq 0x2030
cmpl $0x0, -0x30(%rbp)
setg %al
andb $0x1, %al
movzbl %al, %eax
subl $0x1, %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)