// File: /workspace/github_c_makefile_star2_O0/heltilda[P]cicada/ciclib.c
// Function: cclib_input
void cclib_input()
{
    ccInt counter, bytesRead, rtrn;
    const ccInt fileReadBufferSize = 1000;
    char charBuffer[1001], *readRetrn;
    ccBool done;
    
    if (numBIF_args() != 0)  {  cclib_print();  }
    
    rtrn = resizeLinkedList(&stringRegister, 0, ccFalse);
    if (rtrn != passed)  {  setError(out_of_memory_err, pcCodePtr-1);  return;  }
    
    
        // loop until all of the data has been read
    
    done = ccFalse;
    do  {
        
            // load the data into the inlined buffer (on the stack)
        
        bytesRead = fileReadBufferSize;
        readRetrn = fgets(charBuffer, fileReadBufferSize+1, stdin);
        if (readRetrn == NULL)  {  setError(IO_error, pcCodePtr-1);  break;  }
        for (counter = 0; counter < fileReadBufferSize; counter++)  {
            if (*(charBuffer+counter) == '\n')  {
                done = ccTrue;
                bytesRead = counter;    // don't include the terminator
                break;
        }   }
        
        
            // copy from the buffer into the string register
        
        rtrn = addElements(&stringRegister, bytesRead, ccFalse);         // will be contiguous if spareRoom = 0
        if (rtrn != passed)  {  setError(out_of_memory_err, pcCodePtr-1);  return;  }
        setElements(&stringRegister, stringRegister.elementNum-bytesRead+1, stringRegister.elementNum, charBuffer);
    }  while (!done);
    
    defragmentLinkedList(&stringRegister);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x410, %rsp            # imm = 0x410
movl $0x3e8, -0x10(%rbp)     # imm = 0x3E8
callq 0x1fa40
cmpl $0x0, %eax
je 0x1dd41
callq 0x1dec0
leaq 0xea08(%rip), %rdi      # 0x2c750
addq $0x78, %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x8ee0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x1dd7f
leaq 0xe9eb(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x1, %edi
callq 0xf740
jmp 0x1dea8
movb $0x0, -0x409(%rbp)
movl $0x3e8, -0x8(%rbp)      # imm = 0x3E8
leaq -0x400(%rbp), %rdi
movq 0xb245(%rip), %rax      # 0x28fe0
movq (%rax), %rdx
movl $0x3e9, %esi            # imm = 0x3E9
callq 0x81f0
movq %rax, -0x408(%rbp)
cmpq $0x0, -0x408(%rbp)
jne 0x1ddda
leaq 0xe990(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x31, %edi
callq 0xf740
jmp 0x1de98
movl $0x0, -0x4(%rbp)
cmpl $0x3e8, -0x4(%rbp)      # imm = 0x3E8
jge 0x1de17
movslq -0x4(%rbp), %rax
movsbl -0x400(%rbp,%rax), %eax
cmpl $0xa, %eax
jne 0x1de0a
movb $0x1, -0x409(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
jmp 0x1de17
jmp 0x1de0c
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x1dde1
movl -0x8(%rbp), %esi
leaq 0xe92f(%rip), %rdi      # 0x2c750
addq $0x78, %rdi
xorl %edx, %edx
callq 0x8e70
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x1de53
leaq 0xe914(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x1, %edi
callq 0xf740
jmp 0x1dea8
leaq 0xe8f6(%rip), %rax      # 0x2c750
movl 0x78(%rax), %esi
subl -0x8(%rbp), %esi
addl $0x1, %esi
leaq 0xe8e6(%rip), %rax      # 0x2c750
movl 0x78(%rax), %edx
leaq -0x400(%rbp), %rcx
leaq 0xe8d5(%rip), %rdi      # 0x2c750
addq $0x78, %rdi
callq 0x93d0
cmpb $0x0, -0x409(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1dd86
leaq 0xe8b1(%rip), %rdi      # 0x2c750
addq $0x78, %rdi
callq 0x8f70
addq $0x410, %rsp            # imm = 0x410
popq %rbp
retq
nopw %cs:(%rax,%rax)