// File: /workspace/github_c_makefile_star2_O3/heltilda[P]cicada/bytecd.c
// Function: masterInsert
void masterInsert(ccBool multipleIndices, ccBool allowAddMember)
{
    ccInt firstIndex, secondIndex, rtrn;
    
    
        // get the first steps on the search path
    
    callSearchPathFunction();
    if (errCode != passed)  return;
    
    
        // find the first index to insert
    
    firstIndex = callIndexFunction();
    if (errCode != passed)  return;
    
    
        // now read in the second index (there are two for this operator)
    
    if (multipleIndices)  {
        secondIndex = callIndexFunction();
        if (errCode != passed)  return;         }
    
    else  secondIndex = firstIndex;
    
    if (GL_Path.stemMember == NULL)  {  setError(undefined_member_err, pcCodePtr-1);  return;  }
    
    searchView.multipleIndices = multipleIndices;
    if (secondIndex < firstIndex)  secondIndex = firstIndex-1;
    GL_Path.indices = secondIndex - firstIndex + 1;
    
    
        // add members if we're in a composite variable
    
    if (searchView.windowPtr->variable_ptr->type == composite_type)   {
        linkedlist *memberLL = &(searchView.windowPtr->variable_ptr->mem.members);
        ccInt lastMemberNumber, lastMemberOffset, loopMember;
        member *oneMember;
        
        rtrn = findMemberIndex(searchView.windowPtr->variable_ptr, 0, firstIndex,
                                        &oneMember, &lastMemberNumber, &lastMemberOffset, ccFalse);
        if (rtrn != passed)  {
            if (firstIndex == numMemberIndices(&searchView)+1)  lastMemberNumber = memberLL->elementNum+1;
            else  {  setError(rtrn, pcCodePtr-1);  return;  }       }
        
        rtrn = addMember(searchView.windowPtr->variable_ptr, lastMemberNumber, 1, &oneMember, ccFalse, secondIndex-firstIndex+1, ccFalse);
        if (rtrn != passed)  {  setError(rtrn, pcCodePtr-1);  return;  }
        for (loopMember = firstIndex; loopMember <= secondIndex; loopMember++)  {
            rtrn = addMember(searchView.windowPtr->variable_ptr, loopMember-firstIndex+lastMemberNumber, 1, &oneMember, ccFalse, 0, ccTrue);
            if (rtrn != passed)  {  setError(rtrn, pcCodePtr-1);  return;  }        }
        
        findMemberIndex(searchView.windowPtr->variable_ptr, 0, firstIndex, &(GL_Path.stemMember),
                                                        &(GL_Path.stemMemberNumber), &(GL_Path.offset), ccFalse);
        return;         }
    
    
        // otherwise it's an array or a string -- resize it using resizeIndices()
    
    rtrn = findMemberIndex(searchView.windowPtr->variable_ptr, searchView.offset, firstIndex, &(GL_Path.stemMember),
                                                        &(GL_Path.stemMemberNumber), &(GL_Path.offset), ccFalse);
    if (rtrn != passed)  setError(rtrn, pcCodePtr-1);
    
    
        // 2nd condition on next line:  a([+top(a)+1]) is legal
    
    if ((errCode == invalid_index_err) && (firstIndex == GL_Path.offset))   {
        errCode = passed;
        if (firstIndex == 1)  {      // if all indices have been deleted, fix the error as long as there is a member to add to
            if (searchView.windowPtr->variable_ptr->type == string_type)
                GL_Path.stemMemberNumber = searchView.offset+1;
            else  GL_Path.stemMemberNumber = 1;
            GL_Path.stemMember = LL_member(searchView.windowPtr->variable_ptr, GL_Path.stemMemberNumber);
            GL_Path.offset = 0;     }
        else  {
            rtrn = findMemberIndex(searchView.windowPtr->variable_ptr, searchView.offset, firstIndex-1, &(GL_Path.stemMember),
                                                                        &(GL_Path.stemMemberNumber), &(GL_Path.offset), ccFalse);
            if (rtrn != passed)  {  setError(rtrn, pcCodePtr-1);  return;  }
            GL_Path.offset++;       // by default, append to the index just below
    }   }
    
    if (errCode != passed)  return;
    
    if ((searchView.windowPtr->variable_ptr->type != string_type)
                && (searchView.width != searchView.windowPtr->variable_ptr->instances))
        {  setError(incomplete_variable_err, pcCodePtr-1);  return;  }
    
    
        // resizeIndices() takes care of the resize of both the member and the variable
    
    resizeIndices(GL_Path.stemMember, searchView.width, GL_Path.offset, GL_Path.indices);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %edi, %ebp
callq 0x12bea
cmpl $0x0, 0x11d1a(%rip)     # 0x25778
jne 0x13b3b
movq 0x11edd(%rip), %rax     # 0x25948
movq %rax, 0x20(%rsp)
movups 0x11ec1(%rip), %xmm0    # 0x25938
movaps %xmm0, 0x10(%rsp)
movups 0x11e05(%rip), %xmm0    # 0x25888
movaps %xmm0, 0x70(%rsp)
movups 0x11de9(%rip), %xmm0    # 0x25878
movaps %xmm0, 0x60(%rsp)
movups 0x11dcd(%rip), %xmm0    # 0x25868
movaps %xmm0, 0x50(%rsp)
movq 0x11e21(%rip), %rax     # 0x258c8
movq %rax, 0x40(%rsp)
movups 0x11e05(%rip), %xmm0    # 0x258b8
movaps %xmm0, 0x30(%rsp)
movq 0x11e09(%rip), %rax     # 0x258c8
movq %rax, 0x11e82(%rip)     # 0x25948
movups 0x11deb(%rip), %xmm0    # 0x258b8
movups %xmm0, 0x11e64(%rip)    # 0x25938
movl $0x2, %edi
callq 0x10814
movq 0x20(%rsp), %rax
movq %rax, 0x11e5e(%rip)     # 0x25948
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x11e42(%rip)    # 0x25938
movaps 0x50(%rsp), %xmm0
movaps 0x60(%rsp), %xmm1
movaps 0x70(%rsp), %xmm2
movups %xmm0, 0x11d5c(%rip)    # 0x25868
movups %xmm1, 0x11d65(%rip)    # 0x25878
movups %xmm2, 0x11d6e(%rip)    # 0x25888
movaps 0x30(%rsp), %xmm0
movups %xmm0, 0x11d92(%rip)    # 0x258b8
movq 0x40(%rsp), %rax
movq %rax, 0x11d96(%rip)     # 0x258c8
cmpl $0x0, 0x11c3f(%rip)     # 0x25778
je 0x13b4d
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x11c79(%rip), %ebx     # 0x257cc
movl %ebx, %r13d
testb %bpl, %bpl
je 0x13c41
movq 0x11de2(%rip), %rax     # 0x25948
movq %rax, 0x20(%rsp)
movups 0x11dc6(%rip), %xmm0    # 0x25938
movaps %xmm0, 0x10(%rsp)
movups 0x11d0a(%rip), %xmm0    # 0x25888
movaps %xmm0, 0x70(%rsp)
movups 0x11cee(%rip), %xmm0    # 0x25878
movaps %xmm0, 0x60(%rsp)
movups 0x11cd2(%rip), %xmm0    # 0x25868
movaps %xmm0, 0x50(%rsp)
movq 0x11d26(%rip), %rax     # 0x258c8
movq %rax, 0x40(%rsp)
movups 0x11d0a(%rip), %xmm0    # 0x258b8
movaps %xmm0, 0x30(%rsp)
movq 0x11d0e(%rip), %rax     # 0x258c8
movq %rax, 0x11d87(%rip)     # 0x25948
movups 0x11cf0(%rip), %xmm0    # 0x258b8
movups %xmm0, 0x11d69(%rip)    # 0x25938
movl $0x2, %edi
callq 0x10814
movq 0x20(%rsp), %rax
movq %rax, 0x11d63(%rip)     # 0x25948
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x11d47(%rip)    # 0x25938
movaps 0x50(%rsp), %xmm0
movaps 0x60(%rsp), %xmm1
movaps 0x70(%rsp), %xmm2
movups %xmm0, 0x11c61(%rip)    # 0x25868
movups %xmm1, 0x11c6a(%rip)    # 0x25878
movups %xmm2, 0x11c73(%rip)    # 0x25888
movaps 0x30(%rsp), %xmm0
movups %xmm0, 0x11c97(%rip)    # 0x258b8
movq 0x40(%rsp), %rax
movq %rax, 0x11c9b(%rip)     # 0x258c8
cmpl $0x0, 0x11b44(%rip)     # 0x25778
jne 0x13b3b
movl 0x11b8b(%rip), %r13d    # 0x257cc
cmpq $0x0, 0x11c1f(%rip)     # 0x25868
je 0x13cd9
leal -0x1(%rbx), %r14d
cmpl %ebx, %r13d
movl %r13d, %r15d
cmovll %r14d, %r15d
movb %bpl, 0x11c64(%rip)     # 0x258c8
subl %ebx, %r15d
incl %r15d
movl %r15d, 0x11c07(%rip)    # 0x25878
movq 0x11c40(%rip), %rax     # 0x258b8
movq 0x10(%rax), %r12
cmpl $0x5, 0xc0(%r12)
jne 0x13cff
movl $0x0, (%rsp)
leaq 0x50(%rsp), %rcx
leaq 0x10(%rsp), %r8
leaq 0x30(%rsp), %r9
movq %r12, %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0xee01
testl %eax, %eax
je 0x13db0
movl %eax, %ebp
leaq 0x11bfe(%rip), %rdi     # 0x258b8
callq 0xef33
incl %eax
cmpl %eax, %ebx
jne 0x13dee
movl 0x10(%r12), %esi
incl %esi
movl %esi, 0x10(%rsp)
jmp 0x13db4
movq 0x11b38(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x19, %edi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xcfa3
movl 0x11bbb(%rip), %esi     # 0x258c0
movl $0x0, (%rsp)
leaq 0x11b55(%rip), %rcx     # 0x25868
leaq 0x11b56(%rip), %r8      # 0x25870
leaq 0x11b53(%rip), %r9      # 0x25874
movq %r12, %rdi
movl %ebx, %edx
callq 0xee01
testl %eax, %eax
je 0x13d41
movq 0x11ae2(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl %eax, %edi
callq 0xcfa3
movl 0x11a31(%rip), %eax     # 0x25778
movl %eax, %ecx
xorl $0x1e, %ecx
movl 0x11b22(%rip), %edx     # 0x25874
movl %edx, %esi
xorl %ebx, %esi
orl %ecx, %esi
jne 0x13ed3
movl $0x0, 0x11a10(%rip)     # 0x25778
movq 0x11b49(%rip), %rax     # 0x258b8
movq 0x10(%rax), %rdi
cmpl $0x1, %ebx
jne 0x13e7f
movl 0x11b3e(%rip), %eax     # 0x258c0
incl %eax
cmpl $0x4, 0xc0(%rdi)
movl $0x1, %esi
cmovel %eax, %esi
movl %esi, 0x11ad7(%rip)     # 0x25870
addq $0x10, %rdi
callq 0x91d8
movq %rax, 0x11abf(%rip)     # 0x25868
xorl %edx, %edx
jmp 0x13ec7
movl 0x10(%rsp), %esi
movq 0x11afd(%rip), %rax     # 0x258b8
movq 0x10(%rax), %rdi
movl $0x0, (%rsp)
leaq 0x50(%rsp), %rcx
movl $0x1, %edx
xorl %r8d, %r8d
movl %r15d, %r9d
callq 0xed61
testl %eax, %eax
je 0x13e05
movq 0x11a32(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl %eax, %edi
jmp 0x13dfb
movq 0x11a23(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl %ebp, %edi
callq 0xcfa3
jmp 0x13b3b
subl %ebx, %r13d
jl 0x13e4a
incl %r13d
xorl %ebp, %ebp
leaq 0x50(%rsp), %r14
movq 0x11a9d(%rip), %rax     # 0x258b8
movq 0x10(%rax), %rdi
movl 0x10(%rsp), %esi
addl %ebp, %esi
movl $0x1, (%rsp)
movl $0x1, %edx
movq %r14, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xed61
testl %eax, %eax
jne 0x13ddf
incl %ebp
cmpl %ebp, %r13d
jne 0x13e14
movq 0x11a67(%rip), %rax     # 0x258b8
movq 0x10(%rax), %rdi
movl $0x0, (%rsp)
leaq 0x11a05(%rip), %rcx     # 0x25868
leaq 0x11a06(%rip), %r8      # 0x25870
leaq 0x11a03(%rip), %r9      # 0x25874
xorl %esi, %esi
movl %ebx, %edx
callq 0xee01
jmp 0x13b3b
movl 0x11a3b(%rip), %esi     # 0x258c0
movl $0x0, (%rsp)
leaq 0x119d5(%rip), %rcx     # 0x25868
leaq 0x119d6(%rip), %r8      # 0x25870
leaq 0x119d3(%rip), %r9      # 0x25874
movl %r14d, %edx
callq 0xee01
testl %eax, %eax
je 0x13ebf
movq 0x11964(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl %eax, %edi
jmp 0x13ce9
movl 0x119af(%rip), %edx     # 0x25874
incl %edx
movl %edx, 0x119a7(%rip)     # 0x25874
movl 0x118a5(%rip), %eax     # 0x25778
testl %eax, %eax
jne 0x13b3b
movq 0x119d6(%rip), %rax     # 0x258b8
movq 0x10(%rax), %rax
cmpl $0x4, 0xc0(%rax)
movl 0x119d1(%rip), %esi     # 0x258c4
je 0x13efd
cmpl 0xf0(%rax), %esi
jne 0x13f20
movq 0x11964(%rip), %rdi     # 0x25868
movl 0x1196e(%rip), %ecx     # 0x25878
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x13f35
movq 0x118f1(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x1d, %edi
jmp 0x13ce9