// File: /workspace/github_c_makefile_star2_O0/heltilda[P]cicada/ciclib.c
// Function: cclib_print_string
void cclib_print_string()
{
    window *precisionWindow, *fieldWidthWindow, *stringWindow, *charWindow;
    member *charMember;
    view windowView;
    char *stringPositionMarker;
    ccInt dataSize, sizeofStrings, counter, numArgs, stringWindowPosition = 1, rtrn;
    linkedlist tempPrintLL;
    
    numArgs = numBIF_args();
    if (numArgs < 1)  {  setError(wrong_argument_count_err, pcCodePtr-1);  return;  }
    
    
        // read in the (optional) field width and floating-point precision arguments; otherwise use default values
    
    fieldWidth = 0;
    maxDigits = maxPrintableDigits;
    
    fieldWidthWindow = getBIFmember(1);
    if (fieldWidthWindow == NULL)  {  setError(void_member_err, pcCodePtr-1);  return;  }
    
    if (fieldWidthWindow->variable_ptr->type <= double_type)  {
        stringWindowPosition++;
        if (numArgs < 2)  {  setError(wrong_argument_count_err, pcCodePtr-1);  return;  }
        fieldWidth = (ccInt) getBIFnumArg(1, 0., (ccFloat) maxFieldWidth);
        
        precisionWindow = getBIFmember(2);
        if (precisionWindow == NULL)  {  setError(void_member_err, pcCodePtr-1);  return;  }
        
        if (precisionWindow->variable_ptr->type <= double_type)  {
            stringWindowPosition++;
            if (numArgs < 3)  {  setError(wrong_argument_count_err, pcCodePtr-1);  return;  }
            maxDigits = (ccInt) getBIFnumArg(2, 0., (ccFloat) maxPrintableDigits);
    }   }
    
    stringWindow = getBIFmember(stringWindowPosition);
    if (stringWindow == NULL)  {  setError(void_member_err, pcCodePtr-1);  return;  }
    if (stringWindow->variable_ptr->type != string_type)  {  setError(string_expected_err, pcCodePtr-1);  return;  }
    
    
        // compute the byte size of the final string without printing it yet
    
    dataSize = 0;  sizeofStrings = 0;
    for (counter = stringWindowPosition+1; counter <= numArgs; counter++)  {
        windowView.windowPtr = getBIFmember(counter);
        if (windowView.windowPtr != NULL)  {
            windowView.offset = windowView.windowPtr->offset;
            windowView.width = windowView.windowPtr->width;
            sizeViewString(&windowView, &dataSize, (void *) &sizeofStrings);
    }   }
    
    
        // allocate contiguous memory in the destination string
    
    rtrn = newLinkedList(&tempPrintLL, dataSize+sizeofStrings, sizeof(char), 0, ccFalse);
    if (rtrn == passed)  rtrn = defragmentLinkedList(&tempPrintLL);
    if (rtrn != passed)  {  setError(out_of_memory_err, pcCodePtr-1);  return;  }
    
    
        // print the string
    
    if (dataSize+sizeofStrings > 0)  {
        stringPositionMarker = (char *) element(&tempPrintLL, 1);
        for (counter = stringWindowPosition+1; counter <= numArgs; counter++)  {
            windowView.windowPtr = getBIFmember(counter);
            if (windowView.windowPtr != NULL)  {
                windowView.offset = windowView.windowPtr->offset;
                windowView.width = windowView.windowPtr->width;
                printViewString(&windowView, (void *) &stringPositionMarker, (void *) &sizeofStrings);
                if (warningCode != passed)  errIndex--;
                if (errCode != passed)  {  deleteLinkedList(&tempPrintLL);  return;  }
    }   }   }
    
    
        // rewire the output string to point to the linked list we just created
    
    charMember = LL_member(stringWindow->variable_ptr, stringWindow->offset+1);
    charWindow = charMember->memberWindow;
    resizeMember(charMember, 1, tempPrintLL.elementNum);
    if (errCode != passed)  return;
    
    copyElements(&tempPrintLL, 1, &(charWindow->variable_ptr->mem.data), charWindow->offset+1, tempPrintLL.elementNum);
    deleteLinkedList(&tempPrintLL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl $0x1, -0x5c(%rbp)
callq 0x1fa40
movl %eax, -0x58(%rbp)
cmpl $0x1, -0x58(%rbp)
jge 0x1e291
leaq 0xe4d9(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x2d, %edi
callq 0xf740
jmp 0x1e659
leaq 0xe4b8(%rip), %rax      # 0x2c750
movl $0x0, 0x1fc(%rax)
leaq 0x3d87(%rip), %rax      # 0x22030
movl (%rax), %ecx
leaq 0xe49e(%rip), %rax      # 0x2c750
movl %ecx, 0x1f8(%rax)
movl $0x1, %edi
callq 0x1fab0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1e2ee
leaq 0xe47c(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x1a, %edi
callq 0xf740
jmp 0x1e659
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x3, 0xc0(%rax)
jg 0x1e3fe
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
cmpl $0x2, -0x58(%rbp)
jge 0x1e333
leaq 0xe437(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x2d, %edi
callq 0xf740
jmp 0x1e659
leaq 0x3cfa(%rip), %rax      # 0x22034
cvtsi2sdl (%rax), %xmm1
movl $0x1, %edi
xorps %xmm0, %xmm0
callq 0x1fb80
cvttsd2si %xmm0, %ecx
leaq 0xe3fa(%rip), %rax      # 0x2c750
movl %ecx, 0x1fc(%rax)
movl $0x2, %edi
callq 0x1fab0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x1e392
leaq 0xe3d8(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x1a, %edi
callq 0xf740
jmp 0x1e659
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x3, 0xc0(%rax)
jg 0x1e3fc
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
cmpl $0x3, -0x58(%rbp)
jge 0x1e3d3
leaq 0xe397(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x2d, %edi
callq 0xf740
jmp 0x1e659
leaq 0x3c56(%rip), %rax      # 0x22030
cvtsi2sdl (%rax), %xmm1
movl $0x2, %edi
xorps %xmm0, %xmm0
callq 0x1fb80
cvttsd2si %xmm0, %ecx
leaq 0xe35a(%rip), %rax      # 0x2c750
movl %ecx, 0x1f8(%rax)
jmp 0x1e3fe
movl -0x5c(%rbp), %edi
callq 0x1fab0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1e432
leaq 0xe338(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x1a, %edi
callq 0xf740
jmp 0x1e659
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x4, 0xc0(%rax)
je 0x1e464
leaq 0xe306(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x25, %edi
callq 0xf740
jmp 0x1e659
movl $0x0, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x58(%rbp), %eax
jg 0x1e4c8
movl -0x54(%rbp), %edi
callq 0x1fab0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x1e4bb
movq -0x40(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x40(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x34(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x4c(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x10ff0
jmp 0x1e4bd
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x1e47b
movl -0x4c(%rbp), %esi
addl -0x50(%rbp), %esi
leaq -0x80(%rbp), %rdi
movl $0x1, %edx
xorps %xmm0, %xmm0
xorl %ecx, %ecx
callq 0x8460
movl %eax, -0x60(%rbp)
cmpl $0x0, -0x60(%rbp)
jne 0x1e4f6
leaq -0x80(%rbp), %rdi
callq 0x8f70
movl %eax, -0x60(%rbp)
cmpl $0x0, -0x60(%rbp)
je 0x1e51d
leaq 0xe24d(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x1, %edi
callq 0xf740
jmp 0x1e659
movl -0x4c(%rbp), %eax
addl -0x50(%rbp), %eax
cmpl $0x0, %eax
jle 0x1e5de
leaq -0x80(%rbp), %rdi
movl $0x1, %esi
callq 0x9700
movq %rax, -0x48(%rbp)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x58(%rbp), %eax
jg 0x1e5dc
movl -0x54(%rbp), %edi
callq 0x1fab0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x1e5cc
movq -0x40(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x40(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x34(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x10c30
leaq 0xe1be(%rip), %rax      # 0x2c750
cmpl $0x0, 0x20(%rax)
je 0x1e5af
leaq 0xe1b1(%rip), %rax      # 0x2c750
movl 0x1c(%rax), %ecx
addl $-0x1, %ecx
leaq 0xe1a4(%rip), %rax      # 0x2c750
movl %ecx, 0x1c(%rax)
leaq 0xe19a(%rip), %rax      # 0x2c750
cmpl $0x0, 0x18(%rax)
je 0x1e5ca
leaq -0x80(%rbp), %rdi
callq 0x8540
jmp 0x1e659
jmp 0x1e5cc
jmp 0x1e5ce
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x1e547
jmp 0x1e5de
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rax
movl 0x18(%rax), %esi
addl $0x1, %esi
callq 0x9700
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
movl -0x80(%rbp), %edx
movl $0x1, %esi
callq 0x16ca0
leaq 0xe130(%rip), %rax      # 0x2c750
cmpl $0x0, 0x18(%rax)
je 0x1e628
jmp 0x1e659
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdx
addq $0x10, %rdx
movq -0x20(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl -0x80(%rbp), %r8d
leaq -0x80(%rbp), %rdi
movl $0x1, %esi
callq 0x8a90
leaq -0x80(%rbp), %rdi
callq 0x8540
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)