// File: /workspace/github_c_makefile_star2_O1/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
xorl %ebp, %ebp
movl %ebp, 0x8(%rsp)
movl %ebp, 0x14(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, 0x34(%rsp)
movl %eax, 0x10(%rsp)
movq 0x133b9(%rip), %rax     # 0x25818
movslq (%rax), %rbx
movups 0x134b7(%rip), %xmm0    # 0x25920
movaps %xmm0, 0x60(%rsp)
movq 0x134bb(%rip), %rcx     # 0x25930
movq %rcx, 0x70(%rsp)
addq $0x4, %rax
movq %rax, 0x13393(%rip)     # 0x25818
leaq 0x120d4(%rip), %r15     # 0x24560
callq *(%r15,%rbx,8)
cmpl %ebp, 0x132e2(%rip)     # 0x25778
jne 0x124b6
cmpl $-0x1, 0x13399(%rip)    # 0x25838
je 0x124b6
movq 0x13370(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x22, %edi
callq 0xd1a9
cmpl $0x0, 0x132bb(%rip)     # 0x25778
jne 0x124de
cmpq $0x0, 0x133f1(%rip)     # 0x258b8
jne 0x124de
movq 0x13348(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x1a, %edi
callq 0xd1a9
cmpl $0x0, 0x13293(%rip)     # 0x25778
jne 0x129cb
xorl $0xe, %ebx
movl 0x13398(%rip), %eax     # 0x2588c
testl %eax, %eax
setne 0xf(%rsp)
movq 0x1337e(%rip), %rcx     # 0x25880
movq 0x10(%rcx), %rcx
xorl 0xf0(%rcx), %eax
orl %ebx, %eax
sete %bpl
movups 0x1339f(%rip), %xmm0    # 0x258b8
leaq 0xa0(%rsp), %r14
movaps %xmm0, (%r14)
movq 0x1339c(%rip), %rax     # 0x258c8
movq %rax, 0x10(%r14)
movq (%r14), %rdi
callq 0xd1c8
movq 0x13329(%rip), %r13     # 0x25868
movups 0x13336(%rip), %xmm0    # 0x2587c
movups %xmm0, 0x8c(%rsp)
movups 0x1331b(%rip), %xmm0    # 0x25870
movaps %xmm0, 0x80(%rsp)
movl 0x13329(%rip), %ebx     # 0x2588c
movq 0x13326(%rip), %rax     # 0x25890
movq %rax, 0x38(%rsp)
movl 0x133de(%rip), %r12d    # 0x25954
movaps (%r14), %xmm0
movups %xmm0, 0x1339f(%rip)    # 0x25920
movq 0x10(%r14), %rax
movq %rax, 0x133a4(%rip)     # 0x25930
movq 0x13285(%rip), %rax     # 0x25818
movslq (%rax), %rcx
addq $0x4, %rax
movq %rax, 0x13277(%rip)     # 0x25818
callq *(%r15,%rcx,8)
movq 0x1331c(%rip), %rax     # 0x258c8
movq %rax, 0x50(%rsp)
movups 0x13300(%rip), %xmm0    # 0x258b8
movaps %xmm0, 0x40(%rsp)
movaps (%r14), %xmm0
movups %xmm0, 0x132f0(%rip)    # 0x258b8
movq 0x10(%r14), %rax
movq %rax, 0x132f5(%rip)     # 0x258c8
movaps 0x60(%rsp), %xmm0
movups %xmm0, 0x13341(%rip)    # 0x25920
movq 0x70(%rsp), %rax
movq %rax, 0x13345(%rip)     # 0x25930
movq %r14, %rdi
callq 0xd1e8
cmpl $0x0, 0x1317e(%rip)     # 0x25778
jne 0x129cb
movq 0x132b1(%rip), %rax     # 0x258b8
testq %rax, %rax
je 0x12619
movq 0x8(%rax), %rax
cmpl $0x0, (%rax)
je 0x129cb
movslq 0x13218(%rip), %rax     # 0x25838
cmpq $-0x1, %rax
je 0x1265f
leaq 0x9703(%rip), %rcx      # 0x1bd30
movl (%rcx,%rax,4), %ecx
movl %ecx, 0x8(%rsp)
cmpl $0x1, %eax
jg 0x126d4
movl %r12d, %r14d
testl %eax, %eax
je 0x12708
movb 0x1317e(%rip), %al      # 0x257cc
leaq 0x27(%rsp), %rcx
movb %al, (%rcx)
movq %rcx, 0x28(%rsp)
jmp 0x1271d
cmpq $0x0, 0x40(%rsp)
je 0x126f3
leaq 0x8(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x40(%rsp), %rdi
leaq 0x34(%rsp), %r14
movq %r14, %rdx
callq 0xd661
movl (%r14), %eax
cmpl $-0x1, %eax
je 0x12694
addl %eax, 0x8(%rsp)
movslq 0x8(%rsp), %rdi
incq %rdi
callq 0x81d0
testq %rax, %rax
je 0x128ab
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 0xdc89
movq %r12, 0x18(%rsp)
movq %r12, (%r15)
jmp 0x12726
cmpl $0x4, %eax
je 0x12864
movl %r12d, %r14d
cmpl $0x3, %eax
je 0x12711
cmpl $0x2, %eax
jne 0x1271d
leaq 0x130db(%rip), %rax     # 0x257cc
jmp 0x12718
movq 0x1311e(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x22, %edi
jmp 0x128bb
leaq 0x130b9(%rip), %rax     # 0x257c8
jmp 0x12718
leaq 0x130b8(%rip), %rax     # 0x257d0
movq %rax, 0x28(%rsp)
movq $0x0, 0x18(%rsp)
leaq 0x1318b(%rip), %rdi     # 0x258b8
leaq 0x14(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r15, %rsi
movq %r12, %rdx
callq 0xd661
movl 0x8(%rsp), %edx
movl (%r15), %esi
cmpl %esi, %edx
setg %al
cmpl $-0x1, (%r12)
sete %cl
cmpl %esi, %edx
movl %r14d, %r15d
movl %ebx, %r14d
movl %ebp, %r12d
jl 0x1276b
andb %cl, %al
je 0x128ed
andb 0xf(%rsp), %r12b
testl %r14d, %r14d
je 0x12781
testq %r13, %r13
jne 0x12796
movl $0x19, %edi
jmp 0x12786
movl $0x28, %edi
movq 0x1308b(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
callq 0xd1a9
movb $0x1, %bpl
testb %r12b, %r12b
je 0x127ef
cmpl $0x0, 0xc(%r13)
jne 0x127ef
cmpl $0x0, 0x130e0(%rip)     # 0x2588c
jle 0x127ef
cmpl $0x0, 0x12fc3(%rip)     # 0x25778
jne 0x127ef
movq %r13, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x121b3
cmpl $0x0, 0x12faa(%rip)     # 0x25778
jne 0x127ef
movl %r14d, 0x130ed(%rip)    # 0x258c4
leaq 0x130da(%rip), %rdi     # 0x258b8
leaq 0x14(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0xd661
xorl %ebp, %ebp
cmpl $0x0, 0x12f82(%rip)     # 0x25778
jne 0x128ed
movl 0x8(%rsp), %ecx
movl 0x14(%rsp), %esi
cmpl %esi, %ecx
setg %dl
movl 0x10(%rsp), %eax
cmpl $-0x1, %eax
sete %dil
cmpl %esi, %ecx
jl 0x12821
andb %dil, %dl
je 0x128ed
testl %esi, %esi
setle %dl
xorb $0x1, %r12b
orb %dl, %r12b
jne 0x128db
cmpl $-0x1, %eax
je 0x128c5
movl %esi, %eax
cltd
idivl 0xc(%r13)
movl %eax, %esi
movl %ecx, %eax
cltd
idivl %esi
movq %r13, %rdi
movl %r14d, %esi
movl %eax, %edx
callq 0x121b3
movl 0x8(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0x128ed
movl 0x12f6d(%rip), %r15d    # 0x257d8
movslq %r15d, %rdi
callq 0x81d0
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x128ab
movl %r12d, %r14d
leaq 0x12f51(%rip), %rdi     # 0x257d8
movl $0x1, %esi
movl %r15d, %edx
movq %rax, %rcx
movq %rax, 0x18(%rsp)
callq 0x8fee
movl 0x12f36(%rip), %eax     # 0x257d8
movl %eax, 0x8(%rsp)
jmp 0x12726
movq 0x12f66(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x1, %edi
callq 0xd1a9
jmp 0x129cb
movl %esi, %eax
cltd
idivl 0xc(%r13)
movl %eax, %edi
movl %ecx, %eax
cltd
idivl %edi
testl %edx, %edx
je 0x1283c
testb %bpl, %bpl
jne 0x128ed
movq %r13, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x121b3
cmpl $-0x1, 0x10(%rsp)
je 0x1292a
movl 0x8(%rsp), %eax
subl 0x14(%rsp), %eax
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x12e71(%rip)     # 0x25778
sete %cl
testl %eax, %eax
sets %al
testb %al, %cl
je 0x1293d
movq 0x12efe(%rip), %rsi     # 0x25818
addq $-0x4, %rsi
movl $0x28, %edi
callq 0xd1a9
jmp 0x1293d
cmpl $0x0, 0x12e47(%rip)     # 0x25778
jne 0x1293d
movl 0x8(%rsp), %eax
cmpl 0x14(%rsp), %eax
jne 0x12913
cmpl $0x0, 0x12e34(%rip)     # 0x25778
jne 0x1295c
leaq 0x12f6b(%rip), %rdi     # 0x258b8
leaq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0xdb7e
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1296b
callq 0x81c0
movq %r13, 0x12ef6(%rip)     # 0x25868
movaps 0x80(%rsp), %xmm0
movups %xmm0, 0x12eef(%rip)    # 0x25870
movups 0x8c(%rsp), %xmm0
movups %xmm0, 0x12eec(%rip)    # 0x2587c
movl %r14d, 0x12ef5(%rip)    # 0x2588c
movq 0x38(%rsp), %rax
movq %rax, 0x12eed(%rip)     # 0x25890
movl $0xffffffff, 0x12e8b(%rip) # imm = 0xFFFFFFFF
movq 0x12f04(%rip), %rax     # 0x258b8
movl $0xd0, %ecx
addq 0x10(%rax), %rcx
movq %rcx, 0x12e9c(%rip)     # 0x25860
movl %r15d, 0x12f89(%rip)    # 0x25954
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq