// File: /workspace/github_c_makefile_star2_O0/nimble-code[P]Uno/Src/uno_generic.c
// Function: sel_args
static int
sel_args(treenode *e, treenode *n, int which)	/* 1:select(name,with,without), 2:unselect() */
{	treenode *f, *g;
	int val1, val2;

	/*	   TN_FUNC_CALL:e
		      /    \
		     /      \
		TN_IDENT  TN_EXPR_LIST:f
		   /          /         \
		select       /       TN_INT:val2
	                    /
	           TN_EXPR_LIST:g
	                  /      \
		 TN_STRING       TN_INT:val1
	      or TN_IDENT:MATCH:arg1
	 */
		if (!e->rnode
		||   e->rnode->hdr.type != TN_EXPR_LIST)
			goto bad1;
	f = e->rnode;
		if (!f->lnode
		||   f->lnode->hdr.type != TN_EXPR_LIST)
			goto bad1;
	g = f->lnode;
		if (!g->lnode || !g->rnode)
			goto bad1;
	nogood = 0;
	val1 = eval_const_expr(g->rnode, n);
	val2 = eval_const_expr(f->rnode, n);
	if (nogood || g->lnode->hdr.type != TN_STRING)
	{
bad1:		err_path++;
		fprintf(stderr, "\t\t%s:%d: error expecting string in '%s' [%d:%d]\n",
			n?n->hdr.fnm:"--",
			n?n->hdr.line:0,
			x_stmnt(e),
			nogood,
			(!nogood)?g->lnode->hdr.type:-1);
		exit(1);
	}

	user_name = ((leafnode *)g->lnode)->data.str;

	if (debug)
	printf(">>saw %s(%s,%d,%d)\n", x_stmnt(e), user_name, val1, val2);

	return dosel(n, user_name, val1, val2, which);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x2facc
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
cmpl $0xa, 0x1c(%rax)
je 0x2fad1
jmp 0x2fb71
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x2faf6
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
cmpl $0xa, 0x1c(%rax)
je 0x2faf8
jmp 0x2fb71
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x2fb1a
movq -0x28(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x2fb1c
jmp 0x2fb71
leaq 0x66fd5(%rip), %rax     # 0x96af8
movl $0x0, (%rax)
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x2b4f0
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x2b4f0
movl %eax, -0x30(%rbp)
leaq 0x66fa0(%rip), %rax     # 0x96af8
cmpl $0x0, (%rax)
jne 0x2fb6f
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
cmpl $0x2f, 0x1c(%rax)
je 0x2fc48
jmp 0x2fb71
movl 0x67069(%rip), %eax     # 0x96be0
addl $0x1, %eax
movl %eax, 0x67060(%rip)     # 0x96be0
movq 0x1e471(%rip), %rax     # 0x4dff8
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2fba3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x2fbb0
leaq 0x5661(%rip), %rax      # 0x3520b
movq %rax, -0x40(%rbp)
jmp 0x2fbb0
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2fbcb
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x4c(%rbp)
jmp 0x2fbd2
xorl %eax, %eax
movl %eax, -0x4c(%rbp)
jmp 0x2fbd2
movl -0x4c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4ec0
movq %rax, -0x58(%rbp)
leaq 0x66f0c(%rip), %rax     # 0x96af8
movl (%rax), %eax
movl %eax, -0x50(%rbp)
leaq 0x66f00(%rip), %rax     # 0x96af8
cmpl $0x0, (%rax)
jne 0x2fc0d
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x60(%rbp)
jmp 0x2fc17
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x60(%rbp)
jmp 0x2fc17
movl -0x50(%rbp), %r9d
movq -0x58(%rbp), %r8
movl -0x5c(%rbp), %ecx
movq -0x48(%rbp), %rdx
movq -0x38(%rbp), %rdi
movl -0x60(%rbp), %eax
leaq 0x17766(%rip), %rsi     # 0x4739a
movl %eax, (%rsp)
movb $0x0, %al
callq 0x3170
movl $0x1, %edi
callq 0x3230
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x40(%rax), %rax
movq %rax, 0x66f95(%rip)     # 0x96bf0
cmpl $0x0, 0x66f86(%rip)     # 0x96be8
je 0x2fc8c
movq -0x8(%rbp), %rdi
callq 0x4ec0
movq %rax, %rsi
movq 0x66f79(%rip), %rdx     # 0x96bf0
movl -0x2c(%rbp), %ecx
movl -0x30(%rbp), %r8d
leaq 0x177f8(%rip), %rdi     # 0x4747d
movb $0x0, %al
callq 0x30f0
movq -0x10(%rbp), %rdi
movq 0x66f59(%rip), %rsi     # 0x96bf0
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x14(%rbp), %r8d
callq 0x31fa0
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)