// File: /workspace/github_c_makefile_star2_O0/cinemast[P]sudoku/sudoku.c
// Function: get_filepath
static
void
get_filepath (char *            working_buffer,
              size_t            working_buffsize,
              const char *      default_name)
{
    char *          wbp = working_buffer;
    size_t          wbs = working_buffsize;
    const char *    dn  = default_name;
    /* Just for the sake of having shorter names. */
    assert (wbp != NULL && wbs > 0);
    if (wbp != NULL && wbs > 0) {

        if ('\0' == *wbp) {
            wbp[0] = '>';
            assert(dn != NULL && strlen(dn) < 6 + 3);
            if (0 == getcwd(wbp + 1,
                            (int)wbs - 1 - 1 - 6 - 3)) {
                /* The path is probably too long, use the filename alone. */
                strcpy(wbp + 1, dn);
            } else {
                if (dn != NULL) {
                    /* If the path would make it longer than the line length
                     * we can use just the filename. If the file name itself
                     * is too long, than we cannot avoid the wrap around, so
                     * it's better to be prepared for handling that.
                     */
                    if (strlen(wbp) + strlen(dn) > wbs) {
                        wbp[1] = '\0';
                    } else {
                        strcat(wbp, "/");
                    }
                    strcat(wbp, dn);
                }
            }
            wbp[wbs - 1] = '\0';
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x8aec
cmpq $0x0, -0x28(%rbp)
jbe 0x8aec
jmp 0x8b0b
leaq 0x5318(%rip), %rdi      # 0xde0b
leaq 0x41f7(%rip), %rsi      # 0xccf1
movl $0xc5c, %edx            # imm = 0xC5C
leaq 0x531c(%rip), %rcx      # 0xde22
callq 0x2150
cmpq $0x0, -0x20(%rbp)
je 0x8c15
cmpq $0x0, -0x28(%rbp)
jbe 0x8c15
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x8c13
movq -0x20(%rbp), %rax
movb $0x3e, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x8b51
movq -0x30(%rbp), %rdi
callq 0x20f0
cmpq $0x9, %rax
jae 0x8b51
jmp 0x8b70
leaq 0x52fa(%rip), %rdi      # 0xde52
leaq 0x4192(%rip), %rsi      # 0xccf1
movl $0xc61, %edx            # imm = 0xC61
leaq 0x52b7(%rip), %rcx      # 0xde22
callq 0x2150
movq -0x20(%rbp), %rdi
addq $0x1, %rdi
movq -0x28(%rbp), %rax
subl $0x1, %eax
subl $0x1, %eax
subl $0x6, %eax
subl $0x3, %eax
movslq %eax, %rsi
callq 0x2190
movq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x8bad
movq -0x20(%rbp), %rdi
addq $0x1, %rdi
movq -0x30(%rbp), %rsi
callq 0x2050
jmp 0x8c03
cmpq $0x0, -0x30(%rbp)
je 0x8c01
movq -0x20(%rbp), %rdi
callq 0x20f0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x20f0
movq %rax, %rcx
movq -0x38(%rbp), %rax
addq %rcx, %rax
cmpq -0x28(%rbp), %rax
jbe 0x8be4
movq -0x20(%rbp), %rax
movb $0x0, 0x1(%rax)
jmp 0x8bf4
movq -0x20(%rbp), %rdi
leaq 0x5284(%rip), %rsi      # 0xde73
callq 0x22f0
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x22f0
jmp 0x8c03
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
jmp 0x8c15
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)