// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq 0x48(%rdi), %r14
testq %r14, %r14
movq %rdi, (%rsp)
je 0x1d27a
cmpl $0xa, 0x1c(%r14)
jne 0x1d27a
movq 0x40(%r14), %r13
testq %r13, %r13
je 0x1d27a
cmpl $0xa, 0x1c(%r13)
jne 0x1d27a
cmpq $0x0, 0x40(%r13)
je 0x1d27a
movq 0x48(%r13), %rdi
testq %rdi, %rdi
je 0x1d27a
movl %edx, %ebx
leaq 0x63851(%rip), %r15     # 0x80988
movl $0x0, (%r15)
movq %r12, %rsi
callq 0x1b08f
movl %eax, %ebp
movq 0x48(%r14), %rdi
movq %r12, %rsi
callq 0x1b08f
cmpl $0x0, (%r15)
jne 0x1d27a
movl %eax, %r14d
movq 0x40(%r13), %rax
cmpl $0x2f, 0x1c(%rax)
jne 0x1d27a
movq 0x40(%rax), %r15
movq %r15, 0x638ee(%rip)     # 0x80a68
testq %r12, %r12
je 0x1d18c
cmpl $0x1b, 0x1c(%r12)
jne 0x1d18c
movq 0x40(%r12), %r12
testq %r12, %r12
je 0x1d1b0
movq 0x28(%r12), %rax
testq %rax, %rax
je 0x1d1b0
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x1d1b0
movl $0x0, (%rax)
movq 0x10(%rax), %rax
jmp 0x1d19f
movq 0x638a1(%rip), %rax     # 0x80a58
testq %rax, %rax
je 0x1d1ce
movq (%rax), %rax
testq %rax, %rax
je 0x1d1ce
andb $-0x2, 0x13(%rax)
movq 0x18(%rax), %rax
jmp 0x1d1bf
xorl %r13d, %r13d
testq %r12, %r12
je 0x1d268
movq 0x28(%r12), %rax
testq %rax, %rax
je 0x1d268
movq 0x18(%rax), %r12
testq %r12, %r12
je 0x1d268
xorl %r13d, %r13d
cmpb $0x0, (%r15)
je 0x1d213
movq 0x8(%r12), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
movq %r15, %rdi
callq 0x3180
testl %eax, %eax
jne 0x1d254
cmpl $0x1, %ebx
jne 0x1d22d
movl 0x4(%r12), %edx
testl %ebp, %edx
je 0x1d254
movl $0x1, %eax
movl $0x1, %ecx
jmp 0x1d248
cmpl $0x0, (%r12)
je 0x1d254
movl 0x4(%r12), %edx
testl %ebp, %edx
je 0x1d260
xorl %eax, %eax
movl %r13d, %ecx
movl $0x1, %r13d
andl %r14d, %edx
jne 0x1d254
movl %eax, (%r12)
movl %ecx, %r13d
movq 0x10(%r12), %r12
testq %r12, %r12
jne 0x1d1f4
jmp 0x1d268
movl $0x1, %r13d
jmp 0x1d254
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x4421