// File: /workspace/github_c_makefile_star2_O0/nimble-code[P]Uno/Src/uno_fcts.c
// Function: take_action
static int
take_action(Label *m)
{	char *p, *q;
	Label *lb;
	int x, y;
	char c = '\"';

	if (strncmp((char *) m->label, "error(", strlen("error(")) == 0)
	{	p = strchr((char *) m->label, c);
		if (p)
		{	q = strchr(p+1, c);
		} else
		{	c = '\'';
			p = strchr((char *) m->label, c);
			if (!p) return 0;
			q = strchr(p+1, c);
		}
		f2d_assert((int) (p && q && q > p+1), "bad error() arg");
		*q = '\0';

		if (n_reported(stack))
			goto shortcut;

		printf("uno:#%d: %s", ErrCnt++, p+1);
		if (stack->move)
		for (lb = stack->move->to->lab; lb; lb = lb->nxt)
			if (strlen((char *) lb->label) > 0)
				printf(": [%s]", lb->label);
		printf("\n");

		if (print_fnm(rstack, "in fct"))
		print_rstack(rstack->nxt, "called from");

		if (debug) list_sel();

		if (longtrace)
		{	printf("Trace Detail (length %d):\n", depth);
			tabs = 0;
			print_stack(stack, depth);
			printf("\n");
		}
shortcut:		*q = c;
		if (debug) printf("	STOP '%s'\n", m->label);
		if (debug) exit(0);
		return 0;	/* i.e., stop search along this path */
	}

	if (strncmp((char *) m->label, "mark(", strlen("mark(")) == 0)
	{	x = strlen("mark(");
		if (!isdigit(m->label[x])) notyet(m, "arg to mark()");
		x = atoi((char *) &(m->label[x]));
		y = mark_select(x);
		if (debug) printf("	mark '%d' [cnt=%d]\n", x, y);
		return 1;
	}
	if (strncmp((char *) m->label, "unmark()", strlen("unmark()")) == 0)
	{	y = mark_select(0);
		if (debug) printf("	unmark [cnt=%d]\n", y);
		return 1;
	}
	if (strncmp((char *) m->label, "list()", strlen("list()")) == 0)
	{	list_sel();
		if (debug) printf("	list\n");
		return 1;
	}
	if (strncmp((char *) m->label, "no_error()", strlen("no_error()")) == 0)
	{	p = strchr((char *) m->label, c);
		if (p)
		{	q = strchr(p+1, c);
			f2d_assert((int) (p && q && q > p+1), "bad no_error() arg");
			*q = '\0';
			printf("%s", p+1);
			*q = c;
		} else
		{	c = '\'';
			p = strchr((char *) m->label, c);
			if (!p) return 0;
			q = strchr(p+1, c);
			f2d_assert((int) (p && q && q > p+1), "bad no_error() arg");
			*q = '\0';
			printf("%s", p+1);
			*q = c;
		}
		if (debug) printf("	no_error\n");
		return 1;
	}

	/* other types of stmnts, e.g., uno_state++, uno_state--, uno_state = N */
	if (strncmp((char *) m->label, "uno_state--", strlen("uno_state--")) == 0)
		stack->uno_state--;
	else if (strncmp((char *) m->label, "uno_state++", strlen("uno_state++")) == 0)
		stack->uno_state++;
	else if (strncmp((char *) m->label, "uno_state=", strlen("uno_state=")) == 0
	     && isdigit(m->label[strlen("uno_state=")]))
		stack->uno_state = atoi((char *) &(m->label[strlen("uno_state=")]));
	else
		notyet(m, "expecting uno_state = N");

	if (debug) printf("\taction '%s' (uno_state = %d)\n", m->label, stack->uno_state);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movb $0x22, -0x31(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x275b(%rip), %rsi      # 0x7db9
movl $0x6, %edx
callq 0x1030
cmpl $0x0, %eax
jne 0x58a4
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movsbl -0x31(%rbp), %esi
callq 0x1070
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x56a3
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movsbl -0x31(%rbp), %esi
callq 0x1070
movq %rax, -0x20(%rbp)
jmp 0x56e3
movb $0x27, -0x31(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movsbl -0x31(%rbp), %esi
callq 0x1070
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x56ce
movl $0x0, -0x4(%rbp)
jmp 0x5c77
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movsbl -0x31(%rbp), %esi
callq 0x1070
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x32(%rbp)
je 0x5710
xorl %eax, %eax
cmpq $0x0, -0x20(%rbp)
movb %al, -0x32(%rbp)
je 0x5710
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
seta %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x26a1(%rip), %rsi      # 0x7dc0
callq 0x6500
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq 0x5c86(%rip), %rdi      # 0xb3b8
callq 0x6540
cmpl $0x0, %eax
je 0x5741
jmp 0x5861
movl 0x59b9(%rip), %esi      # 0xb100
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x59ae(%rip)      # 0xb100
movq -0x18(%rbp), %rdx
addq $0x1, %rdx
leaq 0x266f(%rip), %rdi      # 0x7dd0
movb $0x0, %al
callq 0x1080
movq 0x5c49(%rip), %rax      # 0xb3b8
cmpq $0x0, (%rax)
je 0x57ca
movq 0x5c3c(%rip), %rax      # 0xb3b8
movq (%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x57c8
movq -0x28(%rbp), %rax
movq (%rax), %rdi
callq 0x1060
cmpq $0x0, %rax
jbe 0x57b8
movq -0x28(%rbp), %rax
movq (%rax), %rsi
leaq 0x262b(%rip), %rdi      # 0x7ddc
movb $0x0, %al
callq 0x1080
jmp 0x57ba
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x578a
jmp 0x57ca
leaq 0x2842(%rip), %rdi      # 0x8013
movb $0x0, %al
callq 0x1080
movq 0x6c69(%rip), %rdi      # 0xc448
leaq 0x25fd(%rip), %rsi      # 0x7de3
callq 0x6630
cmpl $0x0, %eax
je 0x5807
movq 0x6c51(%rip), %rax      # 0xc448
movq 0x10(%rax), %rdi
leaq 0x25e8(%rip), %rsi      # 0x7dea
callq 0x66e0
cmpl $0x0, 0x5bb2(%rip)      # 0xb3c0
je 0x5815
callq 0x4ee0
leaq 0x5a4c(%rip), %rax      # 0xb268
cmpl $0x0, (%rax)
je 0x585f
movl 0x6c29(%rip), %esi      # 0xc450
leaq 0x25c8(%rip), %rdi      # 0x7df6
movb $0x0, %al
callq 0x1080
movl $0x0, 0x6c39(%rip)      # 0xc478
movq 0x5b72(%rip), %rdi      # 0xb3b8
movl 0x6c04(%rip), %esi      # 0xc450
callq 0x6720
leaq 0x27bb(%rip), %rdi      # 0x8013
movb $0x0, %al
callq 0x1080
jmp 0x5861
movb -0x31(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
cmpl $0x0, 0x5b4f(%rip)      # 0xb3c0
je 0x5888
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0x2590(%rip), %rdi      # 0x7e11
movb $0x0, %al
callq 0x1080
cmpl $0x0, 0x5b31(%rip)      # 0xb3c0
je 0x5898
xorl %edi, %edi
callq 0x1140
movl $0x0, -0x4(%rbp)
jmp 0x5c77
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x256b(%rip), %rsi      # 0x7e1d
movl $0x5, %edx
callq 0x1030
cmpl $0x0, %eax
jne 0x594e
movl $0x5, -0x2c(%rbp)
callq 0x1160
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movslq -0x2c(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x5904
movq -0x10(%rbp), %rdi
leaq 0x2524(%rip), %rsi      # 0x7e23
callq 0x55f0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movslq -0x2c(%rbp), %rax
addq %rax, %rdi
callq 0x1120
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %edi
callq 0x3880
movl %eax, -0x30(%rbp)
cmpl $0x0, 0x5a94(%rip)      # 0xb3c0
je 0x5942
movl -0x2c(%rbp), %esi
movl -0x30(%rbp), %edx
leaq 0x24f6(%rip), %rdi      # 0x7e31
movb $0x0, %al
callq 0x1080
movl $0x1, -0x4(%rbp)
jmp 0x5c77
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x24ea(%rip), %rsi      # 0x7e46
movl $0x8, %edx
callq 0x1030
cmpl $0x0, %eax
jne 0x599b
xorl %edi, %edi
callq 0x3880
movl %eax, -0x30(%rbp)
cmpl $0x0, 0x5a44(%rip)      # 0xb3c0
je 0x598f
movl -0x30(%rbp), %esi
leaq 0x24c7(%rip), %rdi      # 0x7e4f
movb $0x0, %al
callq 0x1080
movl $0x1, -0x4(%rbp)
jmp 0x5c77
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x24b8(%rip), %rsi      # 0x7e61
movl $0x6, %edx
callq 0x1030
cmpl $0x0, %eax
jne 0x59e0
callq 0x4ee0
cmpl $0x0, 0x59fc(%rip)      # 0xb3c0
je 0x59d4
leaq 0x249b(%rip), %rdi      # 0x7e68
movb $0x0, %al
callq 0x1080
movl $0x1, -0x4(%rbp)
jmp 0x5c77
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x2481(%rip), %rsi      # 0x7e6f
movl $0xa, %edx
callq 0x1030
cmpl $0x0, %eax
jne 0x5b6b
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movsbl -0x31(%rbp), %esi
callq 0x1070
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x5aa1
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movsbl -0x31(%rbp), %esi
callq 0x1070
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x33(%rbp)
je 0x5a62
xorl %eax, %eax
cmpq $0x0, -0x20(%rbp)
movb %al, -0x33(%rbp)
je 0x5a62
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
seta %al
movb %al, -0x33(%rbp)
movb -0x33(%rbp), %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x2409(%rip), %rsi      # 0x7e7a
callq 0x6500
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rsi
addq $0x1, %rsi
leaq 0x234d(%rip), %rdi      # 0x7dd9
movb $0x0, %al
callq 0x1080
movb -0x31(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
jmp 0x5b48
movb $0x27, -0x31(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movsbl -0x31(%rbp), %esi
callq 0x1070
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x5acc
movl $0x0, -0x4(%rbp)
jmp 0x5c77
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movsbl -0x31(%rbp), %esi
callq 0x1070
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x34(%rbp)
je 0x5b0e
xorl %eax, %eax
cmpq $0x0, -0x20(%rbp)
movb %al, -0x34(%rbp)
je 0x5b0e
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
seta %al
movb %al, -0x34(%rbp)
movb -0x34(%rbp), %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x235d(%rip), %rsi      # 0x7e7a
callq 0x6500
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq -0x18(%rbp), %rsi
addq $0x1, %rsi
leaq 0x22a1(%rip), %rdi      # 0x7dd9
movb $0x0, %al
callq 0x1080
movb -0x31(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
cmpl $0x0, 0x5871(%rip)      # 0xb3c0
je 0x5b5f
leaq 0x2335(%rip), %rdi      # 0x7e8d
movb $0x0, %al
callq 0x1080
movl $0x1, -0x4(%rbp)
jmp 0x5c77
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x231f(%rip), %rsi      # 0x7e98
movl $0xb, %edx
callq 0x1030
cmpl $0x0, %eax
jne 0x5ba0
movq 0x5829(%rip), %rax      # 0xb3b8
movw 0x8(%rax), %cx
addw $-0x1, %cx
movw %cx, 0x8(%rax)
jmp 0x5c47
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x22f6(%rip), %rsi      # 0x7ea4
movl $0xb, %edx
callq 0x1030
cmpl $0x0, %eax
jne 0x5bd2
movq 0x57f4(%rip), %rax      # 0xb3b8
movw 0x8(%rax), %cx
addw $0x1, %cx
movw %cx, 0x8(%rax)
jmp 0x5c45
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x22d0(%rip), %rsi      # 0x7eb0
movl $0xa, %edx
callq 0x1030
cmpl $0x0, %eax
jne 0x5c33
callq 0x1160
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movzbl 0xa(%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x5c33
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0xa, %rdi
callq 0x1120
movw %ax, %cx
movq 0x578b(%rip), %rax      # 0xb3b8
movw %cx, 0x8(%rax)
jmp 0x5c43
movq -0x10(%rbp), %rdi
leaq 0x227d(%rip), %rsi      # 0x7ebb
callq 0x55f0
jmp 0x5c45
jmp 0x5c47
cmpl $0x0, 0x5772(%rip)      # 0xb3c0
je 0x5c70
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq 0x575a(%rip), %rax      # 0xb3b8
movswl 0x8(%rax), %edx
leaq 0x226a(%rip), %rdi      # 0x7ed3
movb $0x0, %al
callq 0x1080
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq