// File: /workspace/github_c_makefile_star2_O3/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 $0x1098, %rsp           # imm = 0x1098
movq %rdi, %rbx
xorl %edi, %edi
callq 0x100f0
testl %eax, %eax
je 0x21096
leaq 0x22dcd(%rip), %rdi     # 0x43d1a
callq 0x10050
testq %rax, %rax
je 0x20f82
movq %rax, %r14
xorl %r15d, %r15d
leaq 0x354bc(%rip), %r12     # 0x56420
movq (%r15,%r12), %rsi
movq %r14, %rdi
callq 0x10080
testl %eax, %eax
je 0x21127
addq $0x8, %r15
cmpq $0x18, %r15
jne 0x20f64
callq 0x20e5a
cmpl $-0x1, %eax
je 0x21693
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x10(%rsp)
leaq 0x90(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $0x1000, 0x20(%rsp)     # imm = 0x1000
movq %rbx, 0x28(%rsp)
movq %rbx, %rdi
callq 0x101c0
movq %rax, 0x30(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rsp)
movq $0x0, 0x48(%rsp)
leaq 0x68(%rsp), %r14
movl $0x5413, %esi           # imm = 0x5413
movl $0x1, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x10280
cmpl $-0x1, %eax
sete %cl
movzwl 0x2(%r14), %eax
testw %ax, %ax
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x211ad
callq 0x21a9f
movl $0x50, %r15d
cmpl $-0x1, %eax
je 0x211b1
movl %eax, %r14d
leaq 0x26528(%rip), %rsi     # 0x47553
movl $0x6, %edx
movl $0x1, %edi
callq 0x10170
cmpq $0x6, %rax
jne 0x211b1
callq 0x21a9f
cmpl $-0x1, %eax
je 0x211b1
movl %eax, %ebp
movl %eax, %ecx
subl %r14d, %ecx
jle 0x2108e
leaq 0x264f8(%rip), %rdx     # 0x4755a
leaq 0x70(%rsp), %r14
movl $0x20, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x10200
movq %r14, %rdi
callq 0x101c0
movl $0x1, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x10170
movl %ebp, %r15d
jmp 0x211b1
xorl %r13d, %r13d
movq 0x36f28(%rip), %rbp     # 0x57fc8
xorl %ebx, %ebx
xorl %r12d, %r12d
cmpq %rbx, %r13
jne 0x210d6
leaq (,%r13,2), %rbx
testq %r13, %r13
movl $0x20, %eax
cmoveq %rax, %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x104b0
movq %rax, %r15
testq %rax, %rax
jne 0x210d9
jmp 0x21686
movq %r12, %r15
movq (%rbp), %rdi
callq 0x10290
cmpl $0xa, %eax
je 0x210ec
cmpl $-0x1, %eax
jne 0x2110a
cmpl $-0x1, %eax
setne %cl
testq %r13, %r13
setne %dl
orb %cl, %dl
je 0x21681
movb $0x0, (%r15,%r13)
movq %r15, %r14
jmp 0x21111
movb %al, (%r15,%r13)
incq %r13
cmpl $-0x1, %eax
je 0x21696
movq %r15, %r12
cmpl $0xa, %eax
jne 0x210a5
jmp 0x21696
leaq 0x1ef04(%rip), %rdi     # 0x40032
xorl %r14d, %r14d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x101f0
movq 0x36e7e(%rip), %rax     # 0x57fc0
movq (%rax), %rdi
callq 0x10470
movq 0x36e77(%rip), %rax     # 0x57fc8
movq (%rax), %rdx
leaq 0x90(%rsp), %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x10330
testq %rax, %rax
je 0x21696
leaq 0x90(%rsp), %rdi
callq 0x101c0
testq %rax, %rax
je 0x2166f
movzbl 0x8f(%rsp,%rax), %ecx
cmpl $0xd, %ecx
je 0x2119b
cmpl $0xa, %ecx
jne 0x2166f
movb $0x0, 0x8f(%rsp,%rax)
decq %rax
jne 0x21185
jmp 0x2166f
movzwl %ax, %r15d
movslq %r15d, %rax
movq %rax, 0x50(%rsp)
movq $0x0, 0x58(%rsp)
movl $0x0, 0x60(%rsp)
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
decq 0x20(%rsp)
leaq 0x240b2(%rip), %rdi     # 0x45290
callq 0x21762
movl 0x14(%rsp), %edi
movq 0x30(%rsp), %rdx
movq %rbx, %rsi
callq 0x10170
cmpq $-0x1, %rax
je 0x21637
movl 0x10(%rsp), %edi
leaq 0xe(%rsp), %rsi
movl $0x1, %edx
callq 0x102f0
testl %eax, %eax
jle 0x2162b
leaq 0xf(%rsp), %r12
leaq 0xe(%rsp), %r14
movb 0xe(%rsp), %bl
cmpb $0x9, %bl
sete %cl
movq 0x3937c(%rip), %rax     # 0x5a5b0
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x213f0
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movb $0x0, 0xf(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq *%rax
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x2134e
xorl %ebp, %ebp
cmpq %rax, %rbp
jae 0x212bd
movq 0x18(%rsp), %r14
movq 0x38(%rsp), %r13
movq 0x48(%rsp), %r15
movq 0x78(%rsp), %rax
movq (%rax,%rbp,8), %rbx
movq %rbx, %rdi
callq 0x101c0
movq %rax, 0x38(%rsp)
movq %rax, 0x48(%rsp)
movq %rbx, 0x18(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x204db
movq %r15, 0x48(%rsp)
movq %r13, 0x38(%rsp)
movq %r14, 0x18(%rsp)
jmp 0x212c7
leaq 0x10(%rsp), %rdi
callq 0x204db
movl 0x10(%rsp), %edi
movl $0x1, %edx
movq %r12, %rsi
callq 0x102f0
testl %eax, %eax
jle 0x2136e
movzbl 0xf(%rsp), %ebx
cmpl $0x9, %ebx
jne 0x21336
incq %rbp
movq 0x70(%rsp), %rbx
leaq 0x1(%rbx), %rcx
movq %rbp, %rax
xorl %edx, %edx
divq %rcx
movq %rbx, %rax
movq %rdx, %rbp
cmpq %rbx, %rdx
jne 0x2126e
movq 0x36ce4(%rip), %r14     # 0x57ff8
movq (%r14), %rsi
movl $0x7, %edi
callq 0x102b0
movq (%r14), %rdi
callq 0x10470
movq 0x70(%rsp), %rax
movq %rbx, %rbp
jmp 0x2126e
cmpl $0x1b, %ebx
jne 0x21375
cmpq 0x70(%rsp), %rbp
jae 0x213a9
leaq 0x10(%rsp), %rdi
callq 0x204db
jmp 0x213a9
movq 0x36ca3(%rip), %rbx     # 0x57ff8
movq (%rbx), %rsi
movl $0x7, %edi
callq 0x102b0
movq (%rbx), %rdi
callq 0x10470
xorl %ebx, %ebx
jmp 0x213ac
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x213ac
cmpq 0x70(%rsp), %rbp
jae 0x213a9
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x78(%rsp), %rax
movq (%rax,%rbp,8), %rcx
leaq 0x1ec9c(%rip), %rdx     # 0x40032
xorl %eax, %eax
callq 0x10200
cltq
movq %rax, 0x38(%rsp)
movq %rax, 0x48(%rsp)
movsbl %bl, %ebx
cmpq $0x0, 0x70(%rsp)
je 0x213ce
xorl %ebp, %ebp
movq 0x78(%rsp), %rax
movq (%rax,%rbp,8), %rdi
callq 0x10060
incq %rbp
cmpq 0x70(%rsp), %rbp
jb 0x213b6
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x213dd
callq 0x10060
testl %ebx, %ebx
leaq 0xe(%rsp), %r14
js 0x2162b
je 0x21612
movzbl %bl, %eax
leal -0x1(%rax), %ecx
cmpl $0x1a, %ecx
ja 0x21425
leaq 0x2605e(%rip), %rdx     # 0x47460
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
cmpq $0x0, 0x38(%rsp)
je 0x21612
movq $0x0, 0x38(%rsp)
jmp 0x215fa
cmpl $0x7f, %eax
jne 0x21439
leaq 0x10(%rsp), %rdi
callq 0x20ca6
jmp 0x21612
movsbl %bl, %esi
leaq 0x10(%rsp), %rdi
callq 0x2040e
testl %eax, %eax
je 0x21612
jmp 0x21753
movb $0x0, 0x90(%rsp)
xorl %eax, %eax
movq %rax, 0x48(%rsp)
jmp 0x215f5
movl 0x10(%rsp), %edi
movl $0x1, %edx
leaq 0x68(%rsp), %rsi
callq 0x102f0
cmpq $-0x1, %rax
je 0x21612
movl 0x10(%rsp), %edi
movl $0x1, %edx
leaq 0x69(%rsp), %rsi
callq 0x102f0
cmpq $-0x1, %rax
je 0x21612
movzbl 0x68(%rsp), %eax
cmpl $0x4f, %eax
je 0x21590
cmpl $0x5b, %eax
jne 0x21612
movzbl 0x69(%rsp), %eax
leal -0x30(%rax), %ecx
cmpb $0x9, %cl
ja 0x215a5
movl 0x10(%rsp), %edi
movl $0x1, %edx
leaq 0x6a(%rsp), %rsi
callq 0x102f0
cmpq $-0x1, %rax
je 0x21612
cmpb $0x7e, 0x6a(%rsp)
jne 0x21612
cmpb $0x33, 0x69(%rsp)
je 0x21524
jmp 0x21612
movl $0x7, %edx
movl $0x1, %edi
leaq 0x25fde(%rip), %rsi     # 0x474ec
callq 0x10170
jmp 0x215fa
cmpq $0x0, 0x48(%rsp)
je 0x21731
leaq 0x10(%rsp), %rdi
callq 0x20c57
jmp 0x21612
movq 0x38(%rsp), %rax
movb $0x0, 0x90(%rsp,%rax)
movq %rax, 0x48(%rsp)
jmp 0x215fa
movq 0x38(%rsp), %rax
movq 0x48(%rsp), %rcx
testq %rax, %rax
setne %dl
cmpq %rcx, %rax
setb %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x21612
rolw $0x8, 0x8f(%rsp,%rax)
decq %rcx
cmpq %rcx, %rax
jne 0x215f2
jmp 0x215fa
leaq 0x10(%rsp), %rdi
callq 0x20cf6
jmp 0x21612
movzbl 0x69(%rsp), %eax
cmpl $0x46, %eax
je 0x215c9
cmpl $0x48, %eax
je 0x2140b
jmp 0x21612
addl $-0x41, %eax
cmpl $0x7, %eax
ja 0x21612
leaq 0x25f18(%rip), %rcx     # 0x474cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
jmp 0x2160d
movq 0x48(%rsp), %rax
cmpq %rax, 0x38(%rsp)
jne 0x215f5
jmp 0x21612
movq 0x38(%rsp), %rax
testq %rax, %rax
je 0x21612
decq %rax
jmp 0x215f5
movq 0x38(%rsp), %rax
cmpq 0x48(%rsp), %rax
je 0x21612
incq %rax
movq %rax, 0x38(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x204db
jmp 0x21612
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x20b87
movl 0x10(%rsp), %edi
movl $0x1, %edx
movq %r14, %rsi
callq 0x102f0
testl %eax, %eax
jg 0x21223
movl 0x48(%rsp), %eax
cmpl $-0x1, %eax
sete %bl
jmp 0x21639
movb $0x1, %bl
cmpb $0x1, 0x38fd8(%rip)     # 0x5a618
jne 0x21661
leaq 0x38f93(%rip), %rdx     # 0x5a5dc
xorl %edi, %edi
movl $0x2, %esi
callq 0x10580
cmpl $-0x1, %eax
je 0x21661
movb $0x0, 0x38fb7(%rip)     # 0x5a618
movl $0xa, %edi
callq 0x10070
testb %bl, %bl
jne 0x21693
leaq 0x90(%rsp), %rdi
callq 0x10680
movq %rax, %r14
jmp 0x21696
movq %r15, %rdi
jmp 0x2168e
testq %r12, %r12
je 0x21693
movq %r12, %rdi
callq 0x10060
xorl %r14d, %r14d
movq %r14, %rax
addq $0x1098, %rsp           # imm = 0x1098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x100a0
movl $0xb, (%rax)
jmp 0x21753
movslq 0x38f06(%rip), %rax     # 0x5a5c8
leaq -0x1(%rax), %rcx
movl %ecx, 0x38efc(%rip)     # 0x5a5c8
movq 0x38efd(%rip), %rcx     # 0x5a5d0
movq -0x8(%rcx,%rax,8), %rdi
callq 0x10060
cmpl $0x0, 0x38ec4(%rip)     # 0x5a5a8
je 0x21700
movq 0x48(%rsp), %rax
cmpq %rax, 0x38(%rsp)
je 0x21700
leaq 0x10(%rsp), %rdi
movq %rax, 0x28(%rdi)
callq 0x204db
movq 0x38eb1(%rip), %rbx     # 0x5a5b8
testq %rbx, %rbx
je 0x2162b
movq $0x0, 0x38e9d(%rip) # 0x5a5b8
leaq 0x10(%rsp), %rdi
callq 0x204db
movq %rbx, 0x38e8c(%rip)     # 0x5a5b8
jmp 0x2162b
movslq 0x38e90(%rip), %rax     # 0x5a5c8
leaq -0x1(%rax), %rcx
movl %ecx, 0x38e86(%rip)     # 0x5a5c8
movq 0x38e87(%rip), %rcx     # 0x5a5d0
movq -0x8(%rcx,%rax,8), %rdi
callq 0x10060
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2162f