// File: /workspace/github_c_makefile_star2_O2/heltilda[P]cicada/bytecd.c
// Function: doResize
void doResize(ccBool allowAddMember)
{
    member *oneMember;
    ccInt loopMember, loopMemberLLIndex, rtrn, oneMemberLLIndex, newTop, oldTopIndex, newTopIndex, firstIndex, memberOffset;
    
    
        // get the beginning of the path
    
    callSearchPathFunction();
    if (errCode != passed)  return;
    
    
        // read in the new top index
    
    newTop = callIndexFunction();
    if (errCode != passed)  return;
    if (newTop < 0)  {  setError(index_argument_err, pcCodePtr-1);  return;  }
    
    
        // assuming everything's OK, resize the member
    
    if (searchView.windowPtr->variable_ptr->type == composite_type)  {
        
        linkedlist *memberLL = &(searchView.windowPtr->variable_ptr->mem.members);
        ccInt oldTop = numMemberIndices(&searchView);
        
        findMemberIndex(searchView.windowPtr->variable_ptr, 0, oldTop, &oneMember, &oldTopIndex, &memberOffset, ccFalse);
        
        if (newTop > oldTop)  {
            oneMemberLLIndex = searchView.windowPtr->variable_ptr->mem.members.elementNum;
            rtrn = addMember(searchView.windowPtr->variable_ptr, oneMemberLLIndex+1, 1, &oneMember, ccFalse, newTop-oldTop, ccFalse);
            if (rtrn != passed)  {  setError(rtrn, pcCodePtr-1);  return;  }
            for (loopMember = oldTop+1; loopMember <= newTop; loopMember++)  {
                rtrn = addMember(searchView.windowPtr->variable_ptr, oneMemberLLIndex+loopMember-oldTop, 1, &oneMember, ccFalse, 0, ccTrue);
                if (rtrn != passed)  {  setError(rtrn, pcCodePtr-1);  return;  }
        }   }
        
        else if (newTop < oldTop)  {
            if (newTop == 0)  newTopIndex = 0;
            else  findMemberIndex(searchView.windowPtr->variable_ptr, 0, newTop, &oneMember, &newTopIndex, &memberOffset, ccFalse);
            for (loopMemberLLIndex = memberLL->elementNum; loopMemberLLIndex > newTopIndex; loopMemberLLIndex--)  {
            if (!((member *) element(memberLL, loopMemberLLIndex))->ifHidden)  {
                removeMember(searchView.windowPtr->variable_ptr, loopMemberLLIndex);
        }   }}
        
        if (newTop == 0)  GL_Path.stemMember = NULL;
        else  {
            findMemberIndex(searchView.windowPtr->variable_ptr, 0, 1, &oneMember, &firstIndex, &memberOffset, ccFalse);
            GL_Path.stemMember = (member *) element(memberLL, firstIndex);
    }   }

    else if (searchView.windowPtr->variable_ptr->type == string_type)  {
        GL_Path.stemMember = LL_member(searchView.windowPtr->variable_ptr, searchView.offset + 1);
        if (searchView.width != 1)
            {  setError(multiple_indices_not_allowed_err, pcCodePtr-1);  return;  }
        
        resizeMember(GL_Path.stemMember, searchView.width, intRegister);    }
    
    else    {
        GL_Path.stemMember = LL_member(searchView.windowPtr->variable_ptr, 1);
        if (searchView.width != searchView.windowPtr->variable_ptr->instances)
            {  setError(incomplete_variable_err, pcCodePtr-1);  return;  }
        
        resizeMember(GL_Path.stemMember, searchView.width, intRegister);    }
    
    searchView.multipleIndices = ccTrue;
    
    GL_Path.indices = newTop;
    GL_Path.stemMemberNumber = 1;
    GL_Path.offset = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
callq 0x11be6
cmpl $0x0, 0x1271e(%rip)     # 0x24778
jne 0x1206a
callq 0x11cfc
cmpl $0x0, 0x12710(%rip)     # 0x24778
je 0x12079
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %ebx
testl %eax, %eax
js 0x12170
movq 0x1282e(%rip), %rax     # 0x248b8
movq 0x10(%rax), %r14
movl 0xc0(%r14), %eax
addq $0x10, %r14
cmpl $0x4, %eax
je 0x12182
cmpl $0x5, %eax
jne 0x121ad
leaq 0x12806(%rip), %rdi     # 0x248b8
callq 0xe479
movl %eax, %ebp
movq 0x127f8(%rip), %rax     # 0x248b8
movq 0x10(%rax), %rdi
andl $0x0, (%rsp)
leaq 0x18(%rsp), %rcx
leaq 0x24(%rsp), %r8
leaq 0x10(%rsp), %r9
xorl %esi, %esi
movl %ebp, %edx
callq 0xe374
movl %ebx, %r9d
subl %ebp, %r9d
jle 0x121eb
movq 0x127c5(%rip), %rax     # 0x248b8
movq 0x10(%rax), %rdi
movl 0x10(%rdi), %r15d
incl %r15d
andl $0x0, (%rsp)
pushq $0x1
popq %rdx
leaq 0x18(%rsp), %rcx
movl %r15d, %esi
xorl %r8d, %r8d
callq 0xe2d6
testl %eax, %eax
jne 0x12159
pushq $0x1
popq %r12
leaq 0x18(%rsp), %r13
cmpl %ebx, %ebp
jge 0x12282
incl %ebp
movq 0x12785(%rip), %rax     # 0x248b8
movq 0x10(%rax), %rdi
movl $0x1, (%rsp)
movl %r15d, %esi
movl %r12d, %edx
movq %r13, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xe2d6
incl %r15d
testl %eax, %eax
je 0x12122
movq 0x126b8(%rip), %rsi     # 0x24818
addq $-0x4, %rsi
movl %eax, %edi
callq 0xc7c2
jmp 0x1206a
movq 0x126a1(%rip), %rsi     # 0x24818
addq $-0x4, %rsi
pushq $0x20
jmp 0x1223a
movl 0x12738(%rip), %esi     # 0x248c0
incl %esi
movq %r14, %rdi
callq 0x9088
movq %rax, 0x126cf(%rip)     # 0x24868
cmpl $0x1, 0x12724(%rip)     # 0x248c4
jne 0x1221e
movl 0x12624(%rip), %edx     # 0x247cc
pushq $0x1
popq %rsi
jmp 0x121de
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x9088
movq %rax, 0x126a9(%rip)     # 0x24868
movl 0x126ff(%rip), %esi     # 0x248c4
movq 0x126ec(%rip), %rcx     # 0x248b8
movq 0x10(%rcx), %rcx
cmpl 0xf0(%rcx), %esi
jne 0x1222d
movl 0x125ee(%rip), %edx     # 0x247cc
movq %rax, %rdi
callq 0x11183
jmp 0x122c7
jae 0x12282
testl %ebx, %ebx
je 0x1224e
movq 0x126bc(%rip), %rax     # 0x248b8
movq 0x10(%rax), %rdi
andl $0x0, (%rsp)
leaq 0x18(%rsp), %rcx
leaq 0x14(%rsp), %r8
leaq 0x10(%rsp), %r9
xorl %esi, %esi
movl %ebx, %edx
callq 0xe374
jmp 0x12253
movq 0x125f3(%rip), %rsi     # 0x24818
addq $-0x4, %rsi
pushq $0x1f
jmp 0x1223a
movq 0x125e4(%rip), %rsi     # 0x24818
addq $-0x4, %rsi
pushq $0x1d
popq %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc7c2
andl $0x0, 0x14(%rsp)
movl (%r14), %ebp
cmpl 0x14(%rsp), %ebp
jle 0x12282
movq %r14, %rdi
movl %ebp, %esi
callq 0x9088
cmpb $0x0, 0x40(%rax)
jne 0x1227e
movq 0x12645(%rip), %rax     # 0x248b8
movq 0x10(%rax), %rdi
movl %ebp, %esi
callq 0xec0e
decl %ebp
jmp 0x12256
testl %ebx, %ebx
je 0x122be
movq 0x1262b(%rip), %rax     # 0x248b8
movq 0x10(%rax), %rdi
andl $0x0, (%rsp)
pushq $0x1
popq %rdx
leaq 0x18(%rsp), %rcx
leaq 0x20(%rsp), %r15
leaq 0x10(%rsp), %r9
xorl %esi, %esi
movq %r15, %r8
callq 0xe374
movl (%r15), %esi
movq %r14, %rdi
callq 0x9088
jmp 0x122c0
xorl %eax, %eax
movq %rax, 0x125a1(%rip)     # 0x24868
movb $0x1, 0x125fa(%rip)     # 0x248c8
movl %ebx, 0x125a4(%rip)     # 0x24878
movq $0x1, 0x12591(%rip) # 0x24870
jmp 0x1206a