// File: /workspace/github_c_makefile_star2_O1/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 0x12d49
cmpl $0x0, 0x11c71(%rip)     # 0x25778
jne 0x13be4
movq 0x11e34(%rip), %rax     # 0x25948
movq %rax, 0x20(%rsp)
movups 0x11e18(%rip), %xmm0    # 0x25938
movaps %xmm0, 0x10(%rsp)
movups 0x11d5c(%rip), %xmm0    # 0x25888
movaps %xmm0, 0x70(%rsp)
movups 0x11d40(%rip), %xmm0    # 0x25878
movaps %xmm0, 0x60(%rsp)
movups 0x11d24(%rip), %xmm0    # 0x25868
movaps %xmm0, 0x50(%rsp)
movq 0x11d78(%rip), %rax     # 0x258c8
movq %rax, 0x40(%rsp)
movups 0x11d5c(%rip), %xmm0    # 0x258b8
movaps %xmm0, 0x30(%rsp)
movq 0x11d60(%rip), %rax     # 0x258c8
movq %rax, 0x11dd9(%rip)     # 0x25948
movups 0x11d42(%rip), %xmm0    # 0x258b8
movups %xmm0, 0x11dbb(%rip)    # 0x25938
movl $0x2, %edi
callq 0x10a77
movq 0x20(%rsp), %rax
movq %rax, 0x11db5(%rip)     # 0x25948
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x11d99(%rip)    # 0x25938
movaps 0x50(%rsp), %xmm0
movaps 0x60(%rsp), %xmm1
movaps 0x70(%rsp), %xmm2
movups %xmm0, 0x11cb3(%rip)    # 0x25868
movups %xmm1, 0x11cbc(%rip)    # 0x25878
movups %xmm2, 0x11cc5(%rip)    # 0x25888
movaps 0x30(%rsp), %xmm0
movups %xmm0, 0x11ce9(%rip)    # 0x258b8
movq 0x40(%rsp), %rax
movq %rax, 0x11ced(%rip)     # 0x258c8
cmpl $0x0, 0x11b96(%rip)     # 0x25778
je 0x13bf6
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x11bd0(%rip), %ebx     # 0x257cc
movl %ebx, %r13d
testb %bpl, %bpl
je 0x13cea
movq 0x11d39(%rip), %rax     # 0x25948
movq %rax, 0x20(%rsp)
movups 0x11d1d(%rip), %xmm0    # 0x25938
movaps %xmm0, 0x10(%rsp)
movups 0x11c61(%rip), %xmm0    # 0x25888
movaps %xmm0, 0x70(%rsp)
movups 0x11c45(%rip), %xmm0    # 0x25878
movaps %xmm0, 0x60(%rsp)
movups 0x11c29(%rip), %xmm0    # 0x25868
movaps %xmm0, 0x50(%rsp)
movq 0x11c7d(%rip), %rax     # 0x258c8
movq %rax, 0x40(%rsp)
movups 0x11c61(%rip), %xmm0    # 0x258b8
movaps %xmm0, 0x30(%rsp)
movq 0x11c65(%rip), %rax     # 0x258c8
movq %rax, 0x11cde(%rip)     # 0x25948
movups 0x11c47(%rip), %xmm0    # 0x258b8
movups %xmm0, 0x11cc0(%rip)    # 0x25938
movl $0x2, %edi
callq 0x10a77
movq 0x20(%rsp), %rax
movq %rax, 0x11cba(%rip)     # 0x25948
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x11c9e(%rip)    # 0x25938
movaps 0x50(%rsp), %xmm0
movaps 0x60(%rsp), %xmm1
movaps 0x70(%rsp), %xmm2
movups %xmm0, 0x11bb8(%rip)    # 0x25868
movups %xmm1, 0x11bc1(%rip)    # 0x25878
movups %xmm2, 0x11bca(%rip)    # 0x25888
movaps 0x30(%rsp), %xmm0
movups %xmm0, 0x11bee(%rip)    # 0x258b8
movq 0x40(%rsp), %rax
movq %rax, 0x11bf2(%rip)     # 0x258c8
cmpl $0x0, 0x11a9b(%rip)     # 0x25778
jne 0x13be4
movl 0x11ae2(%rip), %r13d    # 0x257cc
cmpq $0x0, 0x11b76(%rip)     # 0x25868
je 0x13dc2
movb %bpl, 0x11bc9(%rip)     # 0x258c8
leal -0x1(%rbx), %ebp
cmpl %ebx, %r13d
movl %r13d, %r12d
cmovll %ebp, %r12d
movl %r12d, %r14d
subl %ebx, %r14d
incl %r14d
movl %r14d, 0x11b5c(%rip)    # 0x25878
movq 0x11b95(%rip), %rax     # 0x258b8
movq 0x10(%rax), %r15
cmpl $0x5, 0xc0(%r15)
jne 0x13de8
movl $0x0, (%rsp)
leaq 0x50(%rsp), %rcx
leaq 0x10(%rsp), %r8
leaq 0x30(%rsp), %r9
movq %r15, %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0xf043
testl %eax, %eax
je 0x13d7d
movl %eax, %ebp
leaq 0x11b54(%rip), %rdi     # 0x258b8
callq 0xf172
incl %eax
cmpl %eax, %ebx
jne 0x13e95
movl 0x10(%r15), %eax
incl %eax
movl %eax, 0x10(%rsp)
movq 0x11b34(%rip), %rax     # 0x258b8
movq 0x10(%rax), %rdi
movl 0x10(%rsp), %esi
movl $0x0, (%rsp)
leaq 0x50(%rsp), %rcx
movl $0x1, %edx
xorl %r8d, %r8d
movl %r14d, %r9d
callq 0xefa3
testl %eax, %eax
je 0x13eac
movq 0x11a61(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl %eax, %edi
jmp 0x13ea2
movq 0x11a4f(%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 0xd1a9
movl 0x11ad2(%rip), %esi     # 0x258c0
movl $0x0, (%rsp)
leaq 0x11a6c(%rip), %rcx     # 0x25868
leaq 0x11a6d(%rip), %r8      # 0x25870
leaq 0x11a6a(%rip), %r9      # 0x25874
movq %r15, %rdi
movl %ebx, %edx
callq 0xf043
testl %eax, %eax
je 0x13e2a
movq 0x119f9(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl %eax, %edi
callq 0xd1a9
cmpl $0x1e, 0x11947(%rip)    # 0x25778
jne 0x13f81
cmpl 0x11a37(%rip), %ebx     # 0x25874
jne 0x13f81
movl $0x0, 0x1192b(%rip)     # 0x25778
movq 0x11a64(%rip), %rax     # 0x258b8
movq 0x10(%rax), %rdi
cmpl $0x1, %ebx
jne 0x13f34
movl 0x11a59(%rip), %eax     # 0x258c0
incl %eax
cmpl $0x4, 0xc0(%rdi)
movl $0x1, %esi
cmovel %eax, %esi
movl %esi, 0x119f2(%rip)     # 0x25870
addq $0x10, %rdi
callq 0x911c
movq %rax, 0x119da(%rip)     # 0x25868
xorl %eax, %eax
jmp 0x13f7b
movq 0x1197c(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl %ebp, %edi
callq 0xd1a9
jmp 0x13be4
cmpl %ebx, %r13d
jl 0x13eff
cmpl %ebx, %r12d
cmovlel %ebx, %r12d
subl %ebx, %r12d
incl %r12d
xorl %ebp, %ebp
leaq 0x50(%rsp), %r14
movq 0x119ec(%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 0xefa3
testl %eax, %eax
jne 0x13db0
incl %ebp
cmpl %ebp, %r12d
jne 0x13ec5
movq 0x119b2(%rip), %rax     # 0x258b8
movq 0x10(%rax), %rdi
movl $0x0, (%rsp)
leaq 0x11950(%rip), %rcx     # 0x25868
leaq 0x11951(%rip), %r8      # 0x25870
leaq 0x1194e(%rip), %r9      # 0x25874
xorl %esi, %esi
movl %ebx, %edx
callq 0xf043
jmp 0x13be4
movl 0x11986(%rip), %esi     # 0x258c0
movl $0x0, (%rsp)
leaq 0x11920(%rip), %rcx     # 0x25868
leaq 0x11921(%rip), %r8      # 0x25870
leaq 0x1191e(%rip), %r9      # 0x25874
movl %ebp, %edx
callq 0xf043
testl %eax, %eax
je 0x13f73
movq 0x118b0(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl %eax, %edi
jmp 0x13dd2
movl 0x118fb(%rip), %eax     # 0x25874
incl %eax
movl %eax, 0x118f3(%rip)     # 0x25874
cmpl $0x0, 0x117f0(%rip)     # 0x25778
jne 0x13be4
movq 0x11923(%rip), %rax     # 0x258b8
movq 0x10(%rax), %rax
cmpl $0x4, 0xc0(%rax)
je 0x13fb0
movl 0x1191c(%rip), %ecx     # 0x258c4
cmpl 0xf0(%rax), %ecx
jne 0x13fdf
movq 0x118b1(%rip), %rdi     # 0x25868
movl 0x11907(%rip), %esi     # 0x258c4
movl 0x118b1(%rip), %edx     # 0x25874
movl 0x118af(%rip), %ecx     # 0x25878
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x13ff4
movq 0x11832(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x1d, %edi
jmp 0x13dd2