// File: /workspace/github_c_makefile_star2_O0/simh[P]simtools/crossassemblers/macro11/assemble_aux.c
// Function: complex_tree
int complex_tree(
    TEXT_COMPLEX *tx,
    EX_TREE *tree)
{
    switch (tree->type) {
    case EX_LIT:
        text_complex_lit(tx, tree->data.lit);
        return 1;

    case EX_TEMP_SYM:
    case EX_SYM:
        {
            SYMBOL         *sym = tree->data.symbol;

            if ((sym->flags & (SYMBOLFLAG_GLOBAL | SYMBOLFLAG_DEFINITION)) == SYMBOLFLAG_GLOBAL) {
                text_complex_global(tx, sym->label);
            } else {
                text_complex_psect(tx, sym->section->sector, sym->value);
            }
        }
        return 1;

    case EX_COM:
        if (!complex_tree(tx, tree->data.child.left))
            return 0;
        text_complex_com(tx);
        return 1;

    case EX_NEG:
        if (!complex_tree(tx, tree->data.child.left))
            return 0;
        text_complex_neg(tx);
        return 1;

    case EX_ADD:
        if (!complex_tree(tx, tree->data.child.left))
            return 0;
        if (!complex_tree(tx, tree->data.child.right))
            return 0;
        text_complex_add(tx);
        return 1;

    case EX_SUB:
        if (!complex_tree(tx, tree->data.child.left))
            return 0;
        if (!complex_tree(tx, tree->data.child.right))
            return 0;
        text_complex_sub(tx);
        return 1;

    case EX_MUL:
        if (!complex_tree(tx, tree->data.child.left))
            return 0;
        if (!complex_tree(tx, tree->data.child.right))
            return 0;
        text_complex_mul(tx);
        return 1;

    case EX_DIV:
        if (!complex_tree(tx, tree->data.child.left))
            return 0;
        if (!complex_tree(tx, tree->data.child.right))
            return 0;
        text_complex_div(tx);
        return 1;

    case EX_AND:
        if (!complex_tree(tx, tree->data.child.left))
            return 0;
        if (!complex_tree(tx, tree->data.child.right))
            return 0;
        text_complex_and(tx);
        return 1;

    case EX_OR:
        if (!complex_tree(tx, tree->data.child.left))
            return 0;
        if (!complex_tree(tx, tree->data.child.right))
            return 0;
        text_complex_or(tx);
        return 1;

    default:
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0xc, %eax
ja 0x7f80
movq -0x28(%rbp), %rax
leaq 0xd5ee(%rip), %rcx      # 0x15280
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x10(%rax), %esi
callq 0x12680
movl $0x1, -0x4(%rbp)
jmp 0x7f87
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
andl $0xa, %eax
cmpl $0x2, %eax
jne 0x7ce4
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
callq 0x12770
jmp 0x7cff
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x18(%rax), %esi
movq -0x20(%rbp), %rax
movl 0x8(%rax), %edx
callq 0x12840
movl $0x1, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x7c60
cmpl $0x0, %eax
jne 0x7d2d
movl $0x0, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
callq 0x12640
movl $0x1, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x7c60
cmpl $0x0, %eax
jne 0x7d64
movl $0x0, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
callq 0x12660
movl $0x1, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x7c60
cmpl $0x0, %eax
jne 0x7d9b
movl $0x0, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x7c60
cmpl $0x0, %eax
jne 0x7dbd
movl $0x0, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
callq 0x12510
movl $0x1, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x7c60
cmpl $0x0, %eax
jne 0x7df4
movl $0x0, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x7c60
cmpl $0x0, %eax
jne 0x7e16
movl $0x0, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
callq 0x12580
movl $0x1, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x7c60
cmpl $0x0, %eax
jne 0x7e4d
movl $0x0, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x7c60
cmpl $0x0, %eax
jne 0x7e6f
movl $0x0, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
callq 0x125a0
movl $0x1, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x7c60
cmpl $0x0, %eax
jne 0x7ea6
movl $0x0, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x7c60
cmpl $0x0, %eax
jne 0x7ec8
movl $0x0, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
callq 0x125c0
movl $0x1, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x7c60
cmpl $0x0, %eax
jne 0x7eff
movl $0x0, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x7c60
cmpl $0x0, %eax
jne 0x7f1e
movl $0x0, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
callq 0x125e0
movl $0x1, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x7c60
cmpl $0x0, %eax
jne 0x7f4f
movl $0x0, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x7c60
cmpl $0x0, %eax
jne 0x7f6e
movl $0x0, -0x4(%rbp)
jmp 0x7f87
movq -0x10(%rbp), %rdi
callq 0x12600
movl $0x1, -0x4(%rbp)
jmp 0x7f87
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq