// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/linenoise/linenoise.c
// Function: linenoise
char *linenoise(const char *prompt) {
    char buf[LINENOISE_MAX_LINE];
    int count;

    if (!isatty(STDIN_FILENO)) {
        /* Not a tty: read from file / pipe. In this mode we don't want any
         * limit to the line size, so we call a function to handle that. */
        return linenoiseNoTTY();
    } else if (isUnsupportedTerm()) {
        size_t len;

        printf("%s",prompt);
        fflush(stdout);
        if (fgets(buf,LINENOISE_MAX_LINE,stdin) == NULL) return NULL;
        len = strlen(buf);
        while(len && (buf[len-1] == '\n' || buf[len-1] == '\r')) {
            len--;
            buf[len] = '\0';
        }
        return strdup(buf);
    } else {
        count = linenoiseRaw(buf,LINENOISE_MAX_LINE,prompt);
        if (count == -1) return NULL;
        return strdup(buf);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10a8, %rsp           # imm = 0x10A8
movq %rdi, %rbx
xorl %edi, %edi
callq 0x100f0
testl %eax, %eax
je 0x1b916
leaq 0x23511(%rip), %rdi     # 0x3ec6a
callq 0x10050
testq %rax, %rax
je 0x1b817
movq %rax, %r14
xorl %r15d, %r15d
leaq 0x36cac(%rip), %r12     # 0x52420
cmpq $0x18, %r15
je 0x1b817
movq (%r15,%r12), %rsi
movq %r14, %rdi
callq 0x10080
addq $0x8, %r15
testl %eax, %eax
jne 0x1b774
leaq 0x1f899(%rip), %rdi     # 0x3b032
xorl %r14d, %r14d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x101f0
movq 0x38813(%rip), %rax     # 0x53fc0
movq (%rax), %rdi
callq 0x10470
movq 0x3880c(%rip), %rax     # 0x53fc8
movq (%rax), %rdx
leaq 0xa0(%rsp), %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x10330
testq %rax, %rax
je 0x1be95
leaq 0xa0(%rsp), %rdi
callq 0x101c0
movq %rax, %rcx
subq $0x1, %rcx
jb 0x1be80
movzbl 0x9f(%rsp,%rax), %edx
cmpl $0xd, %edx
je 0x1b80a
cmpl $0xa, %edx
jne 0x1be80
movb $0x0, 0x9f(%rsp,%rax)
movq %rcx, %rax
jmp 0x1b7ea
callq 0x1b63d
cmpl $-0x1, %eax
je 0x1be92
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x18(%rsp)
leaq 0xa0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %rbx, 0x30(%rsp)
movq %rbx, %rdi
callq 0x101c0
movq %rax, %r14
movq %rax, 0x38(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rsp)
andq $0x0, 0x50(%rsp)
pushq $0x1
popq %rdi
leaq 0x10(%rsp), %r15
movl $0x5413, %esi           # imm = 0x5413
movq %r15, %rdx
xorl %eax, %eax
callq 0x10280
cmpl $-0x1, %eax
sete %cl
movzwl 0x2(%r15), %eax
testw %ax, %ax
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x1b9a4
callq 0x1c1d7
pushq $0x50
popq %r12
cmpl $-0x1, %eax
je 0x1b9a8
movl %eax, %r15d
leaq 0x267f0(%rip), %rsi     # 0x420a3
pushq $0x1
popq %rdi
pushq $0x6
popq %rdx
callq 0x10170
cmpq $0x6, %rax
jne 0x1b9a8
callq 0x1c1d7
cmpl $-0x1, %eax
je 0x1b9a8
movl %eax, %ebp
movl %eax, %ecx
subl %r15d, %ecx
jle 0x1b90e
leaq 0x267c4(%rip), %rdx     # 0x420aa
leaq 0x70(%rsp), %r15
pushq $0x20
popq %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x10200
movq %r15, %rdi
callq 0x101c0
pushq $0x1
popq %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x10170
movl %ebp, %r12d
jmp 0x1b9a8
xorl %ebp, %ebp
movq 0x386a9(%rip), %r13     # 0x53fc8
xorl %ebx, %ebx
xorl %r12d, %r12d
cmpq %rbx, %rbp
jne 0x1b953
leaq (,%rbp,2), %rbx
testq %rbp, %rbp
pushq $0x20
popq %rax
cmoveq %rax, %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x104b0
movq %rax, %r15
testq %rax, %rax
jne 0x1b956
jmp 0x1bdf3
movq %r12, %r15
movq (%r13), %rdi
callq 0x10290
cmpl $0xa, %eax
je 0x1b969
cmpl $-0x1, %eax
jne 0x1b987
cmpl $-0x1, %eax
sete %cl
testq %rbp, %rbp
sete %dl
testb %cl, %dl
jne 0x1bdf0
movb $0x0, (%r15,%rbp)
movq %r15, %r14
jmp 0x1b98e
movb %al, (%r15,%rbp)
incq %rbp
cmpl $-0x1, %eax
je 0x1be95
movq %r15, %r12
cmpl $0xa, %eax
jne 0x1b924
jmp 0x1be95
movzwl %ax, %r12d
movslq %r12d, %rax
movq %rax, 0x58(%rsp)
andq $0x0, 0x60(%rsp)
andl $0x0, 0x68(%rsp)
movb $0x0, 0xa0(%rsp)
movq $0xfff, 0x28(%rsp)      # imm = 0xFFF
leaq 0x2480d(%rip), %rdi     # 0x401e0
callq 0x1bed6
pushq $0x1
popq %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x10170
cmpq $-0x1, %rax
je 0x1bdde
xorl %edi, %edi
leaq 0xe(%rsp), %rbx
pushq $0x1
popq %rbp
leaq 0xf(%rsp), %r12
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x102f0
testl %eax, %eax
jle 0x1be6a
movb 0xe(%rsp), %r15b
cmpb $0x9, %r15b
sete %cl
movq 0x3ab8b(%rip), %rax     # 0x565b0
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1bbdb
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movb $0x0, 0xf(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq *%rax
cmpq $0x0, 0x70(%rsp)
je 0x1bb92
xorl %r15d, %r15d
xorl %r13d, %r13d
movb $0x1, %bl
testb $0x1, %bl
je 0x1bb9c
cmpq 0x70(%rsp), %r13
jae 0x1bad3
movq 0x20(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x40(%rsp), %r14
movq %r12, %rbx
movq 0x50(%rsp), %r12
movq 0x78(%rsp), %rax
movq (%rax,%r13,8), %r15
movq %r15, %rdi
callq 0x101c0
movq %rax, 0x40(%rsp)
movq %rax, 0x50(%rsp)
movq %r15, 0x20(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x1af6f
movq %r12, 0x50(%rsp)
movq %rbx, %r12
movq %r14, 0x40(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x1badd
leaq 0x18(%rsp), %rdi
callq 0x1af6f
movl 0x18(%rsp), %edi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x102f0
testl %eax, %eax
jle 0x1bba2
movzbl 0xf(%rsp), %r15d
cmpl $0x1b, %r15d
je 0x1bb47
cmpl $0x9, %r15d
je 0x1bb65
xorl %ebx, %ebx
cmpq 0x70(%rsp), %r13
jae 0x1ba63
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x78(%rsp), %rax
movq (%rax,%r13,8), %rcx
xorl %ebx, %ebx
leaq 0x1f503(%rip), %rdx     # 0x3b032
xorl %eax, %eax
callq 0x10200
cltq
movq %rax, 0x40(%rsp)
movq %rax, 0x50(%rsp)
jmp 0x1ba63
xorl %ebx, %ebx
cmpq 0x70(%rsp), %r13
jae 0x1ba63
leaq 0x18(%rsp), %rdi
callq 0x1af6f
xorl %ebx, %ebx
jmp 0x1ba63
incq %r13
movq 0x70(%rsp), %rbx
leaq 0x1(%rbx), %rcx
movq %r13, %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %r13
cmpq %rbx, %rdx
jne 0x1ba61
callq 0x1c279
movq %rbx, %r13
jmp 0x1ba61
callq 0x1c279
xorl %r15d, %r15d
jmp 0x1bba6
movsbl %r15b, %r15d
jmp 0x1bba6
pushq $-0x1
popq %r15
xorl %ebx, %ebx
movq 0x78(%rsp), %rdi
cmpq 0x70(%rsp), %rbx
jae 0x1bbc2
movq (%rdi,%rbx,8), %rdi
callq 0x10060
incq %rbx
jmp 0x1bba8
callq 0x10060
testl %r15d, %r15d
js 0x1be6a
leaq 0xe(%rsp), %rbx
je 0x1bdd5
movzbl %r15b, %eax
leal -0x1(%rax), %ecx
cmpl $0x1a, %ecx
ja 0x1bc06
leaq 0x263c2(%rip), %rdx     # 0x41fb0
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
leaq 0x18(%rsp), %rdi
callq 0x1b35d
jmp 0x1bdd5
cmpl $0x7f, %eax
jne 0x1bc1a
leaq 0x18(%rsp), %rdi
callq 0x1b49f
jmp 0x1bdd5
movsbl %r15b, %esi
leaq 0x18(%rsp), %rdi
callq 0x1aea6
testl %eax, %eax
je 0x1bdd5
jmp 0x1becc
andq $0x0, 0x50(%rsp)
movb $0x0, 0xa0(%rsp)
andq $0x0, 0x40(%rsp)
jmp 0x1bd14
movl 0x18(%rsp), %r13d
movl %r13d, %edi
leaq 0x10(%rsp), %rsi
movq %rbp, %rdx
callq 0x102f0
cmpq $-0x1, %rax
je 0x1bdd5
movl %r13d, %edi
leaq 0x11(%rsp), %rsi
movq %rbp, %rdx
callq 0x102f0
cmpq $-0x1, %rax
je 0x1bdd5
movzbl 0x10(%rsp), %eax
cmpl $0x4f, %eax
je 0x1bd6e
cmpl $0x5b, %eax
jne 0x1bdd5
movzbl 0x11(%rsp), %eax
leal -0x30(%rax), %ecx
cmpb $0x9, %cl
ja 0x1bd83
movl %r13d, %edi
leaq 0x12(%rsp), %rsi
movq %rbp, %rdx
callq 0x102f0
cmpq $-0x1, %rax
je 0x1bdd5
cmpb $0x7e, 0x12(%rsp)
jne 0x1bdd5
cmpb $0x33, 0x11(%rsp)
je 0x1bcf3
jmp 0x1bdd5
callq 0x1ac8f
jmp 0x1bd14
cmpq $0x0, 0x50(%rsp)
je 0x1beaa
leaq 0x18(%rsp), %rdi
callq 0x1b450
jmp 0x1bdd5
movq 0x40(%rsp), %rax
movb $0x0, 0xa0(%rsp,%rax)
movq %rax, 0x50(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x1af6f
jmp 0x1bdd5
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
testq %rax, %rax
setne %dl
cmpq %rcx, %rax
setb %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x1bdd5
rolw $0x8, 0x9f(%rsp,%rax)
decq %rcx
cmpq %rcx, %rax
je 0x1bd14
incq %rax
movq %rax, 0x40(%rsp)
jmp 0x1bd14
leaq 0x18(%rsp), %rdi
callq 0x1b4ef
jmp 0x1bdd5
movzbl 0x11(%rsp), %eax
cmpl $0x46, %eax
je 0x1bda5
cmpl $0x48, %eax
je 0x1bbf7
jmp 0x1bdd5
addl $-0x41, %eax
cmpl $0x7, %eax
ja 0x1bdd5
leaq 0x2628a(%rip), %rcx     # 0x4201c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rsi
jmp 0x1bdd0
leaq 0x18(%rsp), %rdi
callq 0x1b36f
jmp 0x1bdd5
leaq 0x18(%rsp), %rdi
callq 0x1b330
jmp 0x1bdd5
leaq 0x18(%rsp), %rdi
callq 0x1b346
jmp 0x1bdd5
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x1b383
movl 0x18(%rsp), %edi
jmp 0x1b9ff
callq 0x1b702
pushq $0xa
popq %rdi
callq 0x10070
jmp 0x1be92
movq %r15, %r12
movq %r12, %rdi
callq 0x10060
jmp 0x1be92
callq 0x100a0
movl $0xb, (%rax)
jmp 0x1becc
movslq 0x3a7b1(%rip), %rax     # 0x565c8
leaq -0x1(%rax), %rcx
movl %ecx, 0x3a7a7(%rip)     # 0x565c8
movq 0x3a7a8(%rip), %rcx     # 0x565d0
movq -0x8(%rcx,%rax,8), %rdi
callq 0x10060
cmpl $0x0, 0x3a76f(%rip)     # 0x565a8
je 0x1be45
leaq 0x18(%rsp), %rdi
callq 0x1b36f
movq 0x3a76c(%rip), %rbx     # 0x565b8
testq %rbx, %rbx
je 0x1be6a
andq $0x0, 0x3a75f(%rip)     # 0x565b8
leaq 0x18(%rsp), %rdi
callq 0x1af6f
movq %rbx, 0x3a74e(%rip)     # 0x565b8
movl 0x50(%rsp), %ebx
callq 0x1b702
pushq $0xa
popq %rdi
callq 0x10070
cmpl $-0x1, %ebx
je 0x1be92
leaq 0xa0(%rsp), %rdi
callq 0x10680
movq %rax, %r14
jmp 0x1be95
xorl %r14d, %r14d
movq %r14, %rax
addq $0x10a8, %rsp           # imm = 0x10A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq 0x3a717(%rip), %rax     # 0x565c8
leaq -0x1(%rax), %rcx
movl %ecx, 0x3a70d(%rip)     # 0x565c8
movq 0x3a70e(%rip), %rcx     # 0x565d0
movq -0x8(%rcx,%rax,8), %rdi
callq 0x10060
pushq $-0x1
popq %rbx
jmp 0x1be6e