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

	switch(decl->hdr.which) {
	case NODE_T:
	        switch(decl->hdr.type) {
		case TN_DECL:
#if 0
			find_ident_name(decl,decl,NULL,find);
#else
			if (decl->rnode
			&&  decl->rnode->hdr.which == NODE_T
			&&  decl->rnode->hdr.type == TN_FUNC_DECL)
				find_params(decl->rnode, find);
			else
				find_ident_name(decl,decl,NULL,find);
#endif
			break;
	
		case TN_DECL_LIST:
		case TN_DECLS:
			find_params(decl->lnode,find);
			find_params(decl->rnode,find);
			break;

		case TN_IDENT_LIST:
		case TN_PARAM_LIST:
			find_ident_name(decl->lnode,decl->lnode,NULL,find);
			find_ident_name(decl->rnode,decl->rnode,NULL,find);
			break;
	
		case TN_FUNC_DECL:
			find_params(decl->rnode,find);
			break;
	
		default:
			fprintf(stderr, "%s: parse error:%d: "
				"unknown node type (%s) in find_params\n",
				progname, decl->hdr.line,
				name_of_node(decl->hdr.type));
			break;
		}
		break;

	case LEAF_T:
		if (0) {	leafnode *leaf = (leafnode *) decl;
			switch (leaf->hdr.type) {
			case TN_IDENT:
				printf("	%s\n", leaf->data.sval->str);
				break;
			default:
				printf("	<leaftype: %d>\n", leaf->hdr.type);
				break;
			}
		}
		find_ident_name(decl,decl,NULL,find);
		break;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x1c2ac
jmp 0x1c480
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x4, %rax
ja 0x1c433
movq -0x18(%rbp), %rax
leaq 0x1ba75(%rip), %rcx     # 0x37d40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0xe, %eax
ja 0x1c3ca
movq -0x20(%rbp), %rax
leaq 0x1ba5c(%rip), %rcx     # 0x37d54
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x1c33a
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
cmpl $0x4, (%rax)
jne 0x1c33a
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
cmpl $0x2, 0x1c(%rax)
jne 0x1c33a
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x1c290
jmp 0x1c34f
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x1bf80
jmp 0x1c418
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x1c290
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x1c290
jmp 0x1c418
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0x10(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x1bf80
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x10(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x1bf80
jmp 0x1c418
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x1c290
jmp 0x1c418
movq 0x28c27(%rip), %rax     # 0x44ff8
movq (%rax), %rax
movq %rax, -0x38(%rbp)
leaq 0x28d91(%rip), %rax     # 0x45170
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %edi
callq 0x1bc40
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rdx
movl -0x24(%rbp), %ecx
movq %rax, %r8
leaq 0x1bc56(%rip), %rsi     # 0x38067
movb $0x0, %al
callq 0x4190
jmp 0x1c480
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x1bf80
jmp 0x1c480
jmp 0x1c433
movq 0x28bbe(%rip), %rax     # 0x44ff8
movq (%rax), %rax
movq %rax, -0x50(%rbp)
leaq 0x28d28(%rip), %rax     # 0x45170
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %edi
callq 0x1b9c0
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rdx
movl -0x3c(%rbp), %ecx
movq %rax, %r8
leaq 0x1bc29(%rip), %rsi     # 0x380a2
movb $0x0, %al
callq 0x4190
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)