// File: /workspace/github_c_makefile_star2_O2/heltilda[P]cicada/bytecd.c
// Function: forced_equate
void _forced_equate()
{
    view sourceView, holdThatView, destView;
    step_params destPath;
    void *objectCopy = NULL, *stringPtr;
    ccInt sourceDataSize = 0, destDataSize = 0, sourceStringSize = no_string, destStringSize = no_string;
    ccInt sourceType, holdCodeNumber;
    char byteBackup;
    ccBool canResizeDestination = ccFalse, resizedFromZero = ccFalse;
    
    
        // Get the left-hand argument (the destination variable).
    
    if (*pcCodePtr == step_to_all)  canResizeDestination = ccTrue;
    holdThatView = thatView;
    
    callBytecodeFunction();
    if ((errCode == passed) && (GL_Object.type != var_type))  setError(not_a_variable_err, pcCodePtr-1);
    if ((errCode == passed) && (searchView.windowPtr == NULL))  setError(void_member_err, pcCodePtr-1);
    if (errCode != passed)  return;
    
    if (GL_Path.stemView.width == 0)  canResizeDestination = ccFalse;        // no point in trying
    if (GL_Path.stemView.width != GL_Path.stemView.windowPtr->variable_ptr->instances)  canResizeDestination = ccFalse;

    destView = searchView;
    refWindow(destView.windowPtr);
    
    destPath = GL_Path;
    holdCodeNumber = codeNumber;
    
    
        // Load the right-hand argument.  We do this in different ways depending on the type of the left-hand variable.
    
    thatView = destView;
    callBytecodeFunction();
    
    sourceView = searchView;
    searchView = destView;
    thatView = holdThatView;            // 'that' might have been overwritten
    
    derefWindow(&(destView.windowPtr));
    
    if (errCode != passed)  return;
    
    if (searchView.windowPtr != NULL)  {
    if (*(searchView.windowPtr->references) == 0)  {
        return;
    }}
    
    sourceType = GL_Object.type;
    
    
        // if the data to copy comes from a variable, size it using sizeView()
    
    if (sourceType == var_type)  {
        if (sourceView.windowPtr == NULL)  {  setError(not_a_variable_err, pcCodePtr-1);  return;  }
        
        sourceDataSize = 0;
        sizeView(&sourceView, &sourceDataSize, &sourceStringSize);
        if (sourceStringSize != no_string)  sourceDataSize += sourceStringSize;    // we don't care what form the source data is in
        
        objectCopy = (void *) malloc((size_t) sourceDataSize + sizeof(char));      // avoid size-0 malloc
        if (objectCopy == NULL)  {  setError(out_of_memory_err, pcCodePtr-1);  return;  }
        
        stringPtr = objectCopy;     // do this twice since readView() modifies stringPtr
        readView(&sourceView, &stringPtr, &sourceStringSize);
        stringPtr = objectCopy;       }
    
    
        // if the data to copy is a constant (i.e. is stored in one of the registers), make a pointer to that register
        // (we make a copy of the byte stored in intRegister if it's of type 'char')
    
    else  {
        sourceDataSize = typeSizes[sourceType];
        if (sourceType <= char_type)  {
            if (sourceType == bool_type)  stringPtr = (void *) &boolRegister;
            else  {  byteBackup = (char) intRegister;  stringPtr = (void *) &byteBackup;  }    }
        else if (sourceType == int_type)  stringPtr = (void *) &intRegister;
        else if (sourceType == double_type)  stringPtr = (void *) &doubleRegister;
        else if (sourceType == string_type)  {
            stringPtr = objectCopy = malloc(stringRegister.elementNum);
            if (objectCopy == NULL)  {  setError(out_of_memory_err, pcCodePtr-1);  return;  }
            getElements(&stringRegister, 1, stringRegister.elementNum, objectCopy);
            sourceDataSize = stringRegister.elementNum;
    }   }
    
    
        // Get the byte size of the destination variable.
    
    sizeView(&searchView, &destDataSize, &destStringSize);
    
    
        // If the source and destination variable sizes don't match, we can try resizing the latter if the destination path ended in [*].
    
    if (((sourceDataSize > destDataSize) && (destStringSize == no_string)) || (sourceDataSize < destDataSize))  {
        
                      // zero indices in source -- hard to deal with, so just throw an error
        
        if (destPath.stemView.width == 0)  setError(unequal_data_size_err, pcCodePtr-1);
        else if (destPath.stemMember == NULL)  setError(undefined_member_err, pcCodePtr-1);
        
        
            // if [*] was present and current top of that list is zero, then size it to 1 so we can measure its byte-size per index
        
        if ((canResizeDestination) && (destPath.stemMember->indices == 0) && (GL_Path.stemView.width > 0) && (errCode == passed))     {        
            resizeMember(destPath.stemMember, destPath.stemView.width, 1);
            if (errCode == passed)  {
                searchView.width = destPath.stemView.width;
                sizeView(&searchView, &destDataSize, &destStringSize);
                resizedFromZero = ccTrue;
        }   }
        
        
            // If sizes don't match and the dest. path ended in a [*], try to resize the destination variable.
        
        if (errCode == passed)  {
        if (((sourceDataSize > destDataSize) && (destStringSize == no_string)) || (sourceDataSize < destDataSize))  {
            if ((destDataSize > 0) && (canResizeDestination) && 
                    ( (destStringSize != no_string) || (sourceDataSize % (destDataSize/destPath.stemMember->indices) == 0) ))  {
                resizeMember(destPath.stemMember, destPath.stemView.width,     // this also rescales seachView.width
                                                        sourceDataSize/(destDataSize/destPath.stemMember->indices));
                destDataSize = sourceDataSize;         }
            
            
                // either we can't resize, or we tried and the dest. variable is still size-0 so there's no hope
            
            else if (resizedFromZero)  resizeMember(destPath.stemMember, destPath.stemView.width, 0);
    }   }}
    
    if (destStringSize != no_string)  {
        destStringSize = sourceDataSize-destDataSize;
        if ((errCode == passed) && (destStringSize < 0))  setError(unequal_data_size_err, pcCodePtr-1);     }
    else if ((errCode == passed) && (sourceDataSize != destDataSize))  setError(unequal_data_size_err, pcCodePtr-1);
    
    
        // write the data from the buffer to the destination variable
    
    if (errCode == passed)  writeView(&searchView, &stringPtr, &destStringSize);
    
    
        // free the memory & clean up
    
    if (objectCopy != NULL)  free(objectCopy);
    
    GL_Path = destPath;
    
    GL_Object.type = var_type;
    GL_Object.codeList = &(searchView.windowPtr->variable_ptr->codeList);
    codeNumber = holdCodeNumber;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
andl $0x0, 0x8(%rsp)
andl $0x0, 0x14(%rsp)
orl $-0x1, 0x34(%rsp)
orl $-0x1, 0x10(%rsp)
movq 0x13420(%rip), %rax     # 0x24818
movslq (%rax), %rbx
movups 0x1351e(%rip), %xmm0    # 0x24920
movaps %xmm0, 0x60(%rsp)
movq 0x13522(%rip), %rcx     # 0x24930
movq %rcx, 0x70(%rsp)
addq $0x4, %rax
movq %rax, 0x133fa(%rip)     # 0x24818
leaq 0x1213b(%rip), %r15     # 0x23560
callq *(%r15,%rbx,8)
movl 0x13349(%rip), %eax     # 0x24778
testl %eax, %eax
jne 0x11455
cmpl $-0x1, 0x133fe(%rip)    # 0x24838
je 0x11455
movq 0x133d5(%rip), %rsi     # 0x24818
addq $-0x4, %rsi
pushq $0x22
popq %rdi
callq 0xc7c2
movl 0x13323(%rip), %eax     # 0x24778
testl %eax, %eax
jne 0x1147c
cmpq $0x0, 0x13457(%rip)     # 0x248b8
jne 0x1147c
movq 0x133ae(%rip), %rsi     # 0x24818
addq $-0x4, %rsi
pushq $0x1a
popq %rdi
callq 0xc7c2
movl 0x132fc(%rip), %eax     # 0x24778
testl %eax, %eax
jne 0x11948
xorl $0xe, %ebx
movl 0x133ff(%rip), %eax     # 0x2488c
testl %eax, %eax
setne 0xf(%rsp)
movq 0x133e5(%rip), %rcx     # 0x24880
movq 0x10(%rcx), %rcx
xorl 0xf0(%rcx), %eax
orl %ebx, %eax
sete %bpl
movups 0x13406(%rip), %xmm0    # 0x248b8
leaq 0xa0(%rsp), %r14
movaps %xmm0, (%r14)
movq 0x13403(%rip), %rax     # 0x248c8
movq %rax, 0x10(%r14)
movq (%r14), %rdi
callq 0xc7e1
movq 0x13390(%rip), %r13     # 0x24868
movups 0x1339d(%rip), %xmm0    # 0x2487c
movups %xmm0, 0x8c(%rsp)
movups 0x13382(%rip), %xmm0    # 0x24870
movaps %xmm0, 0x80(%rsp)
movl 0x13390(%rip), %ebx     # 0x2488c
movq 0x1338d(%rip), %rax     # 0x24890
movq %rax, 0x38(%rsp)
movl 0x13445(%rip), %r12d    # 0x24954
movaps (%r14), %xmm0
movups %xmm0, 0x13406(%rip)    # 0x24920
movq 0x10(%r14), %rax
movq %rax, 0x1340b(%rip)     # 0x24930
movq 0x132ec(%rip), %rax     # 0x24818
movslq (%rax), %rcx
addq $0x4, %rax
movq %rax, 0x132de(%rip)     # 0x24818
callq *(%r15,%rcx,8)
movq 0x13383(%rip), %rax     # 0x248c8
movq %rax, 0x50(%rsp)
movups 0x13367(%rip), %xmm0    # 0x248b8
movaps %xmm0, 0x40(%rsp)
movaps (%r14), %xmm0
movups %xmm0, 0x13357(%rip)    # 0x248b8
movq 0x10(%r14), %rax
movq %rax, 0x1335c(%rip)     # 0x248c8
movaps 0x60(%rsp), %xmm0
movups %xmm0, 0x133a8(%rip)    # 0x24920
movq 0x70(%rsp), %rax
movq %rax, 0x133ac(%rip)     # 0x24930
movq %r14, %rdi
callq 0xc801
cmpl $0x0, 0x131e5(%rip)     # 0x24778
jne 0x11948
movq 0x13318(%rip), %rax     # 0x248b8
testq %rax, %rax
je 0x115b2
movq 0x8(%rax), %rax
cmpl $0x0, (%rax)
je 0x11948
movslq 0x1327f(%rip), %rax     # 0x24838
cmpq $-0x1, %rax
je 0x115f8
leaq 0x86fa(%rip), %rcx      # 0x19cc0
movl (%rcx,%rax,4), %ecx
movl %ecx, 0x8(%rsp)
cmpl $0x1, %eax
jg 0x11671
movl %r12d, %r14d
testl %eax, %eax
je 0x116a2
movb 0x131e5(%rip), %al      # 0x247cc
leaq 0x27(%rsp), %rcx
movb %al, (%rcx)
movq %rcx, 0x28(%rsp)
jmp 0x116b7
cmpq $0x0, 0x40(%rsp)
je 0x11690
leaq 0x8(%rsp), %r14
andl $0x0, (%r14)
leaq 0x40(%rsp), %rdi
leaq 0x34(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0xcc12
movl (%r15), %ecx
movl (%r14), %eax
cmpl $-0x1, %ecx
je 0x11633
addl %ecx, %eax
movl %eax, 0x8(%rsp)
movslq %eax, %rdi
incq %rdi
callq 0x81d0
testq %rax, %rax
je 0x11935
movl %r12d, %r14d
leaq 0x28(%rsp), %r15
movq %rax, (%r15)
leaq 0x40(%rsp), %rdi
leaq 0x34(%rsp), %rdx
movq %r15, %rsi
movq %rax, %r12
callq 0xd1c1
movq %r12, 0x18(%rsp)
movq %r12, (%r15)
jmp 0x116c0
cmpl $0x4, %eax
je 0x118f0
movl %r12d, %r14d
cmpl $0x3, %eax
je 0x116ab
cmpl $0x2, %eax
jne 0x116b7
leaq 0x1313e(%rip), %rax     # 0x247cc
jmp 0x116b2
movq 0x13181(%rip), %rsi     # 0x24818
addq $-0x4, %rsi
pushq $0x22
jmp 0x11942
leaq 0x1311f(%rip), %rax     # 0x247c8
jmp 0x116b2
leaq 0x1311e(%rip), %rax     # 0x247d0
movq %rax, 0x28(%rsp)
movq $0x0, 0x18(%rsp)
leaq 0x131f1(%rip), %rdi     # 0x248b8
leaq 0x14(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0xcc12
movl 0x8(%rsp), %edx
movl (%r15), %esi
cmpl %esi, %edx
setg %al
movl (%r12), %r8d
cmpl $-0x1, %r8d
sete %cl
cmpl %esi, %edx
movl %r14d, %r15d
movl %ebx, %r14d
jl 0x11705
andb %cl, %al
je 0x117a0
andb 0xf(%rsp), %bpl
testl %r14d, %r14d
je 0x11718
testq %r13, %r13
jne 0x1172b
pushq $0x19
jmp 0x1171a
pushq $0x28
popq %rdi
movq 0x130f6(%rip), %rsi     # 0x24818
addq $-0x4, %rsi
callq 0xc7c2
testb %bpl, %bpl
je 0x11787
cmpl $0x0, 0x13155(%rip)     # 0x2488c
setg %cl
movl 0x13038(%rip), %eax     # 0x24778
movl 0xc(%r13), %edx
orl %eax, %edx
sete %dl
andb %cl, %dl
movb $0x1, %dil
cmpb $0x1, %dl
jne 0x11793
pushq $0x1
popq %rdx
movq %r13, %rdi
movl %r14d, %esi
callq 0x11183
cmpl $0x0, 0x13010(%rip)     # 0x24778
jne 0x1179b
movl %r14d, 0x13153(%rip)    # 0x248c4
leaq 0x13140(%rip), %rdi     # 0x248b8
leaq 0x14(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0xcc12
movl %ebp, %edi
xorb $0x1, %dil
movl 0x12fe5(%rip), %eax     # 0x24778
testl %eax, %eax
je 0x11874
movl 0x10(%rsp), %r8d
cmpl $-0x1, %r8d
je 0x117fb
movl 0x8(%rsp), %ecx
subl 0x14(%rsp), %ecx
movl %ecx, 0x10(%rsp)
movl 0x12fc0(%rip), %eax     # 0x24778
testl %eax, %eax
sete %dl
testl %ecx, %ecx
sets %cl
testb %cl, %dl
je 0x117df
movq 0x1304b(%rip), %rsi     # 0x24818
addq $-0x4, %rsi
pushq $0x28
popq %rdi
callq 0xc7c2
movl 0x12f99(%rip), %eax     # 0x24778
testl %eax, %eax
jne 0x11808
leaq 0x130ce(%rip), %rdi     # 0x248b8
leaq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0xd0bf
jmp 0x11808
cmpl $0x0, 0x12f76(%rip)     # 0x24778
je 0x118dd
movq 0x18(%rsp), %rdi
callq 0x81c0
movq %r13, 0x1304f(%rip)     # 0x24868
movaps 0x80(%rsp), %xmm0
movups %xmm0, 0x13048(%rip)    # 0x24870
movups 0x8c(%rsp), %xmm0
movups %xmm0, 0x13045(%rip)    # 0x2487c
movl %r14d, 0x1304e(%rip)    # 0x2488c
movq 0x38(%rsp), %rax
movq %rax, 0x13046(%rip)     # 0x24890
orl $-0x1, 0x12fe7(%rip)    # 0x24838
movq 0x13060(%rip), %rax     # 0x248b8
movl $0xd0, %ecx
addq 0x10(%rax), %rcx
movq %rcx, 0x12ff8(%rip)     # 0x24860
movl %r15d, 0x130e5(%rip)    # 0x24954
jmp 0x11948
movl 0x8(%rsp), %ecx
movl 0x14(%rsp), %eax
cmpl %eax, %ecx
setg %dl
movl 0x10(%rsp), %r8d
cmpl $-0x1, %r8d
sete %sil
cmpl %eax, %ecx
jl 0x1189b
andb %sil, %dl
je 0x117a0
testl %eax, %eax
setle %dl
xorb $0x1, %bpl
orb %dl, %bpl
jne 0x11967
cltd
idivl 0xc(%r13)
movl %eax, %esi
cmpl $-0x1, %r8d
je 0x1195a
movl %ecx, %eax
cltd
idivl %esi
movq %r13, %rdi
movl %r14d, %esi
movl %eax, %edx
callq 0x11183
movl 0x8(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0x1179b
movl 0x8(%rsp), %eax
cmpl 0x14(%rsp), %eax
jne 0x117c6
jmp 0x117d9
movl 0x12ee1(%rip), %r15d    # 0x247d8
movslq %r15d, %rdi
callq 0x81d0
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x11935
movl %r12d, %r14d
leaq 0x12ec5(%rip), %rdi     # 0x247d8
pushq $0x1
popq %rsi
movl %r15d, %edx
movq %rax, %rcx
movq %rax, 0x18(%rsp)
callq 0x8f8b
movl 0x12eac(%rip), %eax     # 0x247d8
movl %eax, 0x8(%rsp)
jmp 0x116c0
movq 0x12edc(%rip), %rsi     # 0x24818
addq $-0x4, %rsi
pushq $0x1
popq %rdi
callq 0xc7c2
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ecx, %eax
cltd
idivl %esi
testl %edx, %edx
je 0x118be
testb %dil, %dil
jne 0x1179b
movq %r13, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x11183
jmp 0x1179b