// File: besm6[P]pascal-re/pascompl.cc
// Function: structBranch(bool)
bool structBranch(bool isGoto)
{
    StrLabel * curLab;
    int ii;
    bool ret = true;
    StrLabel * &strLabList = programme::super.back()->strLabList;

    if (SY == IDENT or not isGoto) {
        curLab = strLabList;
        ii = 1;
        while (curLab != NULL) {
            if (curLab->ident == 0) {
                ii = ii - 1;
            } else {
                if (curLab->ident == curIdent) {
                    if (ii == 1) {
                        if (isGoto) {
                            form1Insn(InsnTemp[UJ] + curLab->offset);
                        } else {
                            formJump(curLab->exitTarget);
                        }
                    } else {
                        form1Insn(getValueOrAllocSymtab(ii) +
                                  (KVTM+I13));
                        if (isGoto) {
                            form1Insn(KVTM+I10 + curLab->offset);
                        } else {
                            jumpType = KVTM+I10;
                            formJump(curLab->exitTarget);
                            jumpType = InsnTemp[UJ];
                        };
                        form1Insn(getHelperProc(60) +
                                  06437777713700000); /* P/ZAM */
                    };
                    return ret;
                }
            }
            curLab = curLab->next;
        }
        if (not isGoto and SY != IDENT) {
            if (ii != 1) {
                form1Insn(getValueOrAllocSymtab(ii) + (KVTM+I13));
                form1Insn(getHelperProc(60)); /* P/ZAM */
            }
            formJump(int53z);
        } else {
            error(errNotDefined);
        }
    } else
        return false;
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x2(%rbp)
movb $0x1, -0x15(%rbp)
leaq 0xc2625(%rip), %rdi     # 0xd8a30
callq 0x1e890
movq (%rax), %rax
addq $0x78, %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, 0x69aba(%rip)     # 0x7fedc
je 0x1642e
testb $0x1, -0x2(%rbp)
jne 0x16598
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1653f
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x16464
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1652f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq 0x69c8d(%rip), %rax     # 0x80100
jne 0x1652d
cmpl $0x1, -0x14(%rbp)
jne 0x164aa
testb $0x1, -0x2(%rbp)
je 0x1649b
movq 0x6e70c(%rip), %rdi     # 0x84b98
movq -0x10(%rbp), %rax
addq 0x10(%rax), %rdi
callq 0x7c20
jmp 0x164a8
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x7e70
jmp 0x16523
movslq -0x14(%rbp), %rdi
callq 0x8870
movq %rax, %rdi
addq $0xda0000, %rdi         # imm = 0xDA0000
callq 0x7c20
testb $0x1, -0x2(%rbp)
je 0x164de
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0xaa0000, %rdi         # imm = 0xAA0000
callq 0x7c20
jmp 0x16504
movq $0xaa0000, 0x699d7(%rip) # imm = 0xAA0000
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0x7e70
movq 0x6e69b(%rip), %rax     # 0x84b98
movq %rax, 0x699bc(%rip)     # 0x7fec0
movl $0x3c, %edi
callq 0x80d0
movq %rax, %rdi
movabsq $0xd1ffff2f8000, %rax   # imm = 0xD1FFFF2F8000
addq %rax, %rdi
callq 0x7c20
movb -0x15(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x165a6
jmp 0x1652f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x16440
testb $0x1, -0x2(%rbp)
jne 0x1658c
cmpl $0x0, 0x69990(%rip)     # 0x7fedc
je 0x1658c
cmpl $0x1, -0x14(%rbp)
je 0x1657e
movslq -0x14(%rbp), %rdi
callq 0x8870
movq %rax, %rdi
addq $0xda0000, %rdi         # imm = 0xDA0000
callq 0x7c20
movl $0x3c, %edi
callq 0x80d0
movq %rax, %rdi
callq 0x7c20
leaq 0x6994b(%rip), %rdi     # 0x7fed0
callq 0x7e70
jmp 0x16596
movl $0xb, %edi
callq 0x7b40
jmp 0x1659e
movb $0x0, -0x1(%rbp)
jmp 0x165a6
movb -0x15(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)