// File: /workspace/github_c_makefile_star2_O0/heltilda[P]cicada/intrpt.c
// Function: doReadWrite
void doReadWrite(view *theView, void *globalPtr, void *secondaryPtr, ccBool doInIndexOrder, ccBool skipBusyMembers, ccBool bundleStrings,
        void(*srwComposite)(view *, void *, void *),
        void(*srwData)(view *, void *, void *),
        void(*srwString)(view *, ccInt, void *, void *))
{
    view nextView;
    member *loopMember;
    variable *theVar = theView->windowPtr->variable_ptr;
    ccInt memberCounter, indexCounter;
    
    if (theVar->type >= composite_type)   {
        
        for (memberCounter = 1; memberCounter <= theVar->mem.members.elementNum; memberCounter++)  {
            loopMember = LL_member(theVar, memberCounter);
            
            if (isBusy(loopMember, busy_SRW_flag))  {
                if (!skipBusyMembers)  {
                    setError(self_reference_err, pcCodePtr-1);
                    return;
            }   }
            
            else  {
                setBusy(loopMember, busy_SRW_flag);
                
                if ((loopMember->memberWindow != NULL) && (!loopMember->ifHidden))      {
                    if (doInIndexOrder)  {
                    for (indexCounter = 0; indexCounter < theView->width*loopMember->indices; indexCounter++)  {
                        nextView.windowPtr = theView->windowPtr;
                        nextView.offset = theView->offset;
                        nextView.width = 1;
                        stepView(&nextView, loopMember, indexCounter, 1);
                        if (errCode == passed)  srwComposite(&nextView, globalPtr, secondaryPtr);
                        else  errCode = passed;
                    }}
                    
                    else  {
                        nextView = *theView;
                        stepView(&nextView, loopMember, 0, loopMember->indices);
                        if (errCode == passed)  srwComposite(&nextView, globalPtr, secondaryPtr);
                        else  errCode = passed;
                }   }
                
                clearBusy(loopMember, busy_SRW_flag);
                if (errCode != passed)  return;
    }   }   }
    
    else  {        // it's a primitive variable
        if (theVar->type == string_type)  {
            ccInt viewTop = theView->width;
            if (bundleStrings)  viewTop = 1;  
            
            for (indexCounter = 1; indexCounter <= viewTop; indexCounter++)  {
                srwString(theView, theView->offset+indexCounter, globalPtr, secondaryPtr);
                if (errCode != passed)  break;
        }   }
        else  srwData(theView, globalPtr, secondaryPtr);            }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl %r8d, -0x70(%rbp)
movl %ecx, %eax
movl -0x70(%rbp), %ecx
movl %eax, -0x6c(%rbp)
movq %rdx, %rax
movl -0x6c(%rbp), %edx
movq %rax, -0x68(%rbp)
movq %rsi, %rax
movq -0x68(%rbp), %rsi
movq %rax, -0x60(%rbp)
movq %rdi, %r8
movq -0x60(%rbp), %rdi
movb %r9b, %al
movq 0x20(%rbp), %r9
movq 0x18(%rbp), %r9
movq 0x10(%rbp), %r9
movq %r8, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb %dl, -0x19(%rbp)
movb %cl, -0x1a(%rbp)
movb %al, -0x1b(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpl $0x5, 0xc0(%rax)
jl 0x103fe
movl $0x1, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movq -0x48(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jg 0x103f9
movq -0x48(%rbp), %rdi
addq $0x10, %rdi
movl -0x4c(%rbp), %esi
callq 0x9700
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl 0x44(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x1029a
cmpb $0x0, -0x1a(%rbp)
jne 0x10295
leaq 0x1c4d5(%rip), %rax     # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x2f, %edi
callq 0xf740
jmp 0x1047f
jmp 0x103e9
movq -0x40(%rbp), %rax
movl 0x44(%rax), %ecx
orl $0x40, %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x44(%rax)
movq -0x40(%rbp), %rax
cmpq $0x0, (%rax)
je 0x103c4
movq -0x40(%rbp), %rax
cmpb $0x0, 0x40(%rax)
jne 0x103c4
cmpb $0x0, -0x19(%rbp)
je 0x10360
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x8(%rbp), %rcx
movl 0xc(%rcx), %ecx
movq -0x40(%rbp), %rdx
imull 0xc(%rdx), %ecx
cmpl %ecx, %eax
jge 0x1035e
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x30(%rbp)
movl $0x1, -0x2c(%rbp)
movq -0x40(%rbp), %rsi
movl -0x50(%rbp), %edx
leaq -0x38(%rbp), %rdi
movl $0x1, %ecx
callq 0xff50
leaq 0x1c42a(%rip), %rax     # 0x2c750
cmpl $0x0, 0x18(%rax)
jne 0x10340
movq 0x10(%rbp), %rax
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq *%rax
jmp 0x1034e
leaq 0x1c409(%rip), %rax     # 0x2c750
movl $0x0, 0x18(%rax)
jmp 0x10350
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x102d8
jmp 0x103c2
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x38(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x40(%rbp), %rsi
movq -0x40(%rbp), %rax
movl 0xc(%rax), %ecx
leaq -0x38(%rbp), %rdi
xorl %edx, %edx
callq 0xff50
leaq 0x1c3b8(%rip), %rax     # 0x2c750
cmpl $0x0, 0x18(%rax)
jne 0x103b2
movq 0x10(%rbp), %rax
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq *%rax
jmp 0x103c0
leaq 0x1c397(%rip), %rax     # 0x2c750
movl $0x0, 0x18(%rax)
jmp 0x103c2
jmp 0x103c4
movq -0x40(%rbp), %rax
movl 0x44(%rax), %ecx
andl $-0x41, %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x44(%rax)
leaq 0x1c374(%rip), %rax     # 0x2c750
cmpl $0x0, 0x18(%rax)
je 0x103e7
jmp 0x1047f
jmp 0x103e9
jmp 0x103eb
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x1023b
jmp 0x1047f
movq -0x48(%rbp), %rax
cmpl $0x4, 0xc0(%rax)
jne 0x1046b
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x54(%rbp)
cmpb $0x0, -0x1b(%rbp)
je 0x10422
movl $0x1, -0x54(%rbp)
movl $0x1, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x54(%rbp), %eax
jg 0x10469
movq 0x20(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rcx
movl 0x8(%rcx), %esi
addl -0x50(%rbp), %esi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq *%rax
leaq 0x1c2fc(%rip), %rax     # 0x2c750
cmpl $0x0, 0x18(%rax)
je 0x1045c
jmp 0x10469
jmp 0x1045e
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x10429
jmp 0x1047d
movq 0x18(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
jmp 0x1047f
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)