// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xb0, %rsp
movq $0x0, -0x80(%rbp)
movl $0x0, -0x8c(%rbp)
movl $0x0, -0x90(%rbp)
movl $0xffffffff, -0x94(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x98(%rbp) # imm = 0xFFFFFFFF
movb $0x0, -0xa2(%rbp)
movb $0x0, -0xa3(%rbp)
movq 0x15708(%rip), %rax     # 0x2c808
cmpl $0xe, (%rax)
jne 0x1710c
movb $0x1, -0xa2(%rbp)
movq 0x157fd(%rip), %rax     # 0x2c910
movq %rax, -0x30(%rbp)
movq 0x157fa(%rip), %rax     # 0x2c918
movq %rax, -0x28(%rbp)
movq 0x157f7(%rip), %rax     # 0x2c920
movq %rax, -0x20(%rbp)
callq 0x146f0
cmpl $0x0, 0x1562f(%rip)     # 0x2c768
jne 0x17159
cmpl $-0x1, 0x156e6(%rip)    # 0x2c828
je 0x17159
movq 0x156bd(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x22, %edi
callq 0xf740
cmpl $0x0, 0x15608(%rip)     # 0x2c768
jne 0x17181
cmpq $0x0, 0x1573e(%rip)     # 0x2c8a8
jne 0x17181
movq 0x15695(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x1a, %edi
callq 0xf740
cmpl $0x0, 0x155e0(%rip)     # 0x2c768
je 0x1718f
jmp 0x17784
cmpl $0x0, 0x156e6(%rip)     # 0x2c87c
jne 0x1719f
movb $0x0, -0xa2(%rbp)
movl 0x156d7(%rip), %eax     # 0x2c87c
movq 0x156c4(%rip), %rcx     # 0x2c870
movq 0x10(%rcx), %rcx
cmpl 0xf0(%rcx), %eax
je 0x171bf
movb $0x0, -0xa2(%rbp)
movq 0x156e2(%rip), %rax     # 0x2c8a8
movq %rax, -0x48(%rbp)
movq 0x156df(%rip), %rax     # 0x2c8b0
movq %rax, -0x40(%rbp)
movq 0x156dc(%rip), %rax     # 0x2c8b8
movq %rax, -0x38(%rbp)
movq -0x48(%rbp), %rdi
callq 0xf780
leaq -0x78(%rbp), %rdi
leaq 0x1555c(%rip), %rsi     # 0x2c750
addq $0x108, %rsi            # imm = 0x108
movl $0x30, %edx
callq 0x8120
movl 0x15739(%rip), %eax     # 0x2c944
movl %eax, -0xa0(%rbp)
movq -0x48(%rbp), %rax
movq %rax, 0x156f4(%rip)     # 0x2c910
movq -0x40(%rbp), %rax
movq %rax, 0x156f1(%rip)     # 0x2c918
movq -0x38(%rbp), %rax
movq %rax, 0x156ee(%rip)     # 0x2c920
callq 0x146f0
movq 0x1566a(%rip), %rax     # 0x2c8a8
movq %rax, -0x18(%rbp)
movq 0x15667(%rip), %rax     # 0x2c8b0
movq %rax, -0x10(%rbp)
movq 0x15664(%rip), %rax     # 0x2c8b8
movq %rax, -0x8(%rbp)
movq -0x48(%rbp), %rax
movq %rax, 0x15645(%rip)     # 0x2c8a8
movq -0x40(%rbp), %rax
movq %rax, 0x15642(%rip)     # 0x2c8b0
movq -0x38(%rbp), %rax
movq %rax, 0x1563f(%rip)     # 0x2c8b8
movq -0x30(%rbp), %rax
movq %rax, 0x1568c(%rip)     # 0x2c910
movq -0x28(%rbp), %rax
movq %rax, 0x15689(%rip)     # 0x2c918
movq -0x20(%rbp), %rax
movq %rax, 0x15686(%rip)     # 0x2c920
leaq -0x48(%rbp), %rdi
callq 0xf7d0
cmpl $0x0, 0x154be(%rip)     # 0x2c768
je 0x172b1
jmp 0x17784
cmpq $0x0, 0x155ef(%rip)     # 0x2c8a8
je 0x172d2
movq 0x155e6(%rip), %rax     # 0x2c8a8
movq 0x8(%rax), %rax
cmpl $0x0, (%rax)
jne 0x172d0
jmp 0x17784
jmp 0x172d2
movl 0x15550(%rip), %eax     # 0x2c828
movl %eax, -0x9c(%rbp)
cmpl $-0x1, -0x9c(%rbp)
jne 0x173af
cmpq $0x0, -0x18(%rbp)
jne 0x1730c
movq 0x1550f(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x22, %edi
callq 0xf740
jmp 0x17784
movl $0x0, -0x8c(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x8c(%rbp), %rsi
leaq -0x94(%rbp), %rdx
callq 0x10160
cmpl $-0x1, -0x94(%rbp)
je 0x17348
movl -0x94(%rbp), %eax
addl -0x8c(%rbp), %eax
movl %eax, -0x8c(%rbp)
movslq -0x8c(%rbp), %rdi
addq $0x1, %rdi
callq 0x81d0
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
jne 0x1737d
movq 0x1549e(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x1, %edi
callq 0xf740
jmp 0x17784
movq -0x80(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0x94(%rbp), %rdx
callq 0x10a90
movq -0x80(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x174bc
movslq -0x9c(%rbp), %rcx
leaq 0xb8e3(%rip), %rax      # 0x22ca0
movl (%rax,%rcx,4), %eax
movl %eax, -0x8c(%rbp)
cmpl $0x1, -0x9c(%rbp)
jg 0x1740b
cmpl $0x0, -0x9c(%rbp)
jne 0x173ec
leaq 0x15371(%rip), %rax     # 0x2c750
addq $0x68, %rax
movq %rax, -0x88(%rbp)
jmp 0x17406
movl 0x153ca(%rip), %eax     # 0x2c7bc
movb %al, -0xa1(%rbp)
leaq -0xa1(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x174ba
cmpl $0x2, -0x9c(%rbp)
jne 0x1742b
leaq 0x15335(%rip), %rax     # 0x2c750
addq $0x6c, %rax
movq %rax, -0x88(%rbp)
jmp 0x174b8
cmpl $0x3, -0x9c(%rbp)
jne 0x17448
leaq 0x15315(%rip), %rax     # 0x2c750
addq $0x70, %rax
movq %rax, -0x88(%rbp)
jmp 0x174b6
cmpl $0x4, -0x9c(%rbp)
jne 0x174b4
movslq 0x15370(%rip), %rdi     # 0x2c7c8
callq 0x81d0
movq %rax, -0x80(%rbp)
movq %rax, -0x88(%rbp)
cmpq $0x0, -0x80(%rbp)
jne 0x17489
movq 0x15392(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x1, %edi
callq 0xf740
jmp 0x17784
movl 0x15339(%rip), %edx     # 0x2c7c8
movq -0x80(%rbp), %rcx
leaq 0x152b6(%rip), %rdi     # 0x2c750
addq $0x78, %rdi
movl $0x1, %esi
callq 0x9540
movl 0x1531a(%rip), %eax     # 0x2c7c8
movl %eax, -0x8c(%rbp)
jmp 0x174b6
jmp 0x174b8
jmp 0x174ba
jmp 0x174bc
leaq 0x1528d(%rip), %rdi     # 0x2c750
addq $0x158, %rdi            # imm = 0x158
leaq -0x90(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x10160
movl -0x8c(%rbp), %eax
cmpl -0x90(%rbp), %eax
jle 0x174f4
cmpl $-0x1, -0x98(%rbp)
je 0x17506
movl -0x8c(%rbp), %eax
cmpl -0x90(%rbp), %eax
jge 0x1768e
cmpl $0x0, -0x54(%rbp)
jne 0x17523
movq 0x152f5(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x28, %edi
callq 0xf740
jmp 0x17541
cmpq $0x0, -0x78(%rbp)
jne 0x1753f
movq 0x152d7(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x19, %edi
callq 0xf740
jmp 0x17541
cmpb $0x0, -0xa2(%rbp)
je 0x175b3
movq -0x78(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x175b3
cmpl $0x0, 0x15321(%rip)     # 0x2c87c
jle 0x175b3
cmpl $0x0, 0x15204(%rip)     # 0x2c768
jne 0x175b3
movq -0x78(%rbp), %rdi
movl -0x54(%rbp), %esi
movl $0x1, %edx
callq 0x16ca0
cmpl $0x0, 0x151ea(%rip)     # 0x2c768
jne 0x175b1
movl -0x54(%rbp), %eax
movl %eax, 0x1532b(%rip)     # 0x2c8b4
leaq 0x151c0(%rip), %rdi     # 0x2c750
addq $0x158, %rdi            # imm = 0x158
leaq -0x90(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x10160
movb $0x1, -0xa3(%rbp)
jmp 0x175b3
cmpl $0x0, 0x151ae(%rip)     # 0x2c768
jne 0x1768c
movl -0x8c(%rbp), %eax
cmpl -0x90(%rbp), %eax
jle 0x175d7
cmpl $-0x1, -0x98(%rbp)
je 0x175e9
movl -0x8c(%rbp), %eax
cmpl -0x90(%rbp), %eax
jge 0x1768a
cmpl $0x0, -0x90(%rbp)
jle 0x1766f
cmpb $0x0, -0xa2(%rbp)
je 0x1766f
cmpl $-0x1, -0x98(%rbp)
jne 0x1762e
movl -0x8c(%rbp), %eax
movl %eax, -0xa8(%rbp)
movl -0x90(%rbp), %eax
movq -0x78(%rbp), %rcx
cltd
idivl 0xc(%rcx)
movl %eax, %ecx
movl -0xa8(%rbp), %eax
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x1766f
movq -0x78(%rbp), %rdi
movl -0x54(%rbp), %esi
movl -0x8c(%rbp), %eax
movl %eax, -0xac(%rbp)
movl -0x90(%rbp), %eax
movq -0x78(%rbp), %rcx
cltd
idivl 0xc(%rcx)
movl %eax, %ecx
movl -0xac(%rbp), %eax
cltd
idivl %ecx
movl %eax, %edx
callq 0x16ca0
movl -0x8c(%rbp), %eax
movl %eax, -0x90(%rbp)
jmp 0x17688
cmpb $0x0, -0xa3(%rbp)
je 0x17686
movq -0x78(%rbp), %rdi
movl -0x54(%rbp), %esi
xorl %edx, %edx
callq 0x16ca0
jmp 0x17688
jmp 0x1768a
jmp 0x1768c
jmp 0x1768e
cmpl $-0x1, -0x98(%rbp)
je 0x176d2
movl -0x8c(%rbp), %eax
subl -0x90(%rbp), %eax
movl %eax, -0x98(%rbp)
cmpl $0x0, 0x150b8(%rip)     # 0x2c768
jne 0x176d0
cmpl $0x0, -0x98(%rbp)
jge 0x176d0
movq 0x15146(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x28, %edi
callq 0xf740
jmp 0x17700
cmpl $0x0, 0x1508f(%rip)     # 0x2c768
jne 0x176fe
movl -0x8c(%rbp), %eax
cmpl -0x90(%rbp), %eax
je 0x176fe
movq 0x15118(%rip), %rsi     # 0x2c808
addq $-0x4, %rsi
movl $0x28, %edi
callq 0xf740
jmp 0x17700
cmpl $0x0, 0x15061(%rip)     # 0x2c768
jne 0x1772a
leaq 0x15040(%rip), %rdi     # 0x2c750
addq $0x158, %rdi            # imm = 0x158
leaq -0x88(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x108b0
cmpq $0x0, -0x80(%rbp)
je 0x1773a
movq -0x80(%rbp), %rdi
callq 0x81c0
leaq 0x1500f(%rip), %rdi     # 0x2c750
addq $0x108, %rdi            # imm = 0x108
leaq -0x78(%rbp), %rsi
movl $0x30, %edx
callq 0x8120
movl $0xffffffff, 0x150c8(%rip) # imm = 0xFFFFFFFF
movq 0x15141(%rip), %rax     # 0x2c8a8
movq 0x10(%rax), %rax
addq $0xd0, %rax
movq %rax, 0x150d8(%rip)     # 0x2c850
movl -0xa0(%rbp), %eax
movl %eax, 0x151c0(%rip)     # 0x2c944
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)