// File: /workspace/github_c_makefile_star2_O0/nimble-code[P]Modex/Src/tree.c
// Function: find_ident_name
void
find_ident_name(treenode *n, treenode *def, treenode *container, FindFunction find)
{
    if (!n)
        return;

    switch(n->hdr.which)
    {
    case LEAF_T:
        (find)((leafnode*) n,def,container);
        break;

    case NODE_T:
    {
        switch(n->hdr.type)
        {
        case TN_IDENT:
            (find)((leafnode*) n,def,container);
            break;

        case TN_DECL:
            find_ident_name(n->rnode,def,container,find);
            break;

        case TN_COMP_DECL:
            find_ident_name(n->rnode,def,container,find);
            break;

        case TN_ASSIGN:
        case TN_ARRAY_DECL:
            find_ident_name(n->lnode,def,container,find);
            break;

        case TN_FIELD_LIST:
        case TN_DECL_LIST:
        case TN_DECLS:
        case TN_PARAM_LIST:
	case TN_IDENT_LIST:
            find_ident_name(n->lnode,def,container,find);
            find_ident_name(n->rnode,def,container,find);
            break;

        case TN_ELLIPSIS:
            break;

        case TN_PNTR:
            break;

        case TN_FUNC_DECL:
            find_ident_name(n->lnode,def,container,find);
            break;

	case TN_BIT_FIELD:	/* added gjh */
		break;

        default:
            fprintf(stderr,
                    "%s: parse error:%d: "
                    "unknown node type (%s) in find_ident_name\n",
                    progname, n->hdr.line, name_of_node(n->hdr.type));
            break;
        }
    }
    break;

    case IF_T:
    case FOR_T:
    case NONE_T:
    default:
        fprintf(stderr,
            "%s: parse error:%d: unknown node in find_ident_name: %s\n",
            progname, n->hdr.line, name_of_nodetype(n->hdr.which));
        break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x1bfa4
jmp 0x1c175
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x28(%rbp)
subq $0x4, %rax
ja 0x1c128
movq -0x28(%rbp), %rax
leaq 0x1bcb9(%rip), %rcx     # 0x37c7c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
jmp 0x1c175
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x2b, %eax
ja 0x1c0d6
movq -0x30(%rbp), %rax
leaq 0x1bc89(%rip), %rcx     # 0x37c90
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
jmp 0x1c124
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x1bf80
jmp 0x1c124
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x1bf80
jmp 0x1c124
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x1bf80
jmp 0x1c124
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x1bf80
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x1bf80
jmp 0x1c124
jmp 0x1c124
jmp 0x1c124
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x1bf80
jmp 0x1c124
jmp 0x1c124
movq 0x28f1b(%rip), %rax     # 0x44ff8
movq (%rax), %rax
movq %rax, -0x48(%rbp)
leaq 0x29085(%rip), %rax     # 0x45170
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %edi
callq 0x1bc40
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
movl -0x34(%rbp), %ecx
movq %rax, %r8
leaq 0x1be96(%rip), %rsi     # 0x37fb3
movb $0x0, %al
callq 0x4190
jmp 0x1c175
jmp 0x1c128
movq 0x28ec9(%rip), %rax     # 0x44ff8
movq (%rax), %rax
movq %rax, -0x60(%rbp)
leaq 0x29033(%rip), %rax     # 0x45170
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %edi
callq 0x1b9c0
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rdx
movl -0x4c(%rbp), %ecx
movq %rax, %r8
leaq 0x1be84(%rip), %rsi     # 0x37ff2
movb $0x0, %al
callq 0x4190
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)