// File: /workspace/github_c_makefile_star2_O1/rakitzis[P]rc/builtins.c
// Function: b_whatis
static void b_whatis(char **av) {
	bool ess, eff, vee, pee, bee;
	bool f, found;
	int i, ac, c;
	List *s;
	Node *n;
	char *e;
	for (rc_optind = ac = 0; av[ac] != NULL; ac++)
		; /* count the arguments for getopt */
	ess = eff = vee = pee = bee = FALSE;
	while ((c = rc_getopt(ac, av, "sfvpb")) != -1)
		switch (c) {
		default: set(FALSE); return;
		case 's': ess = TRUE; break;
		case 'f': eff = TRUE; break;
		case 'v': vee = TRUE; break;
		case 'p': pee = TRUE; break;
		case 'b': bee = TRUE; break;
		}
	av += rc_optind;
	if (*av == NULL) {
		if (vee|eff)
			whatare_all_vars(eff, vee);
		if (ess)
			whatare_all_signals();
		if (bee)
			for (i = 0; i < arraysize(builtins); i++)
				fprint(1, "builtin %s\n", builtins[i].name);
		if (pee)
			fprint(2, "whatis -p: must specify argument\n");
		if (show(FALSE)) /* no options? */
			whatare_all_vars(TRUE, TRUE);
		set(TRUE);
		return;
	}
	found = TRUE;
	for (i = 0; av[i] != NULL; i++) {
		f = FALSE;
		errno = ENOENT;
		if (show(vee) && (s = varlookup(av[i])) != NULL) {
			f = TRUE;
			prettyprint_var(1, av[i], s);
		}
		if (((show(ess)&&issig(av[i])) || show(eff)) && (n = fnlookup(av[i])) != NULL) {
			f = TRUE;
			prettyprint_fn(1, av[i], n);
		} else if (show(bee) && isbuiltin(av[i]) != NULL) {
			f = TRUE;
			fprint(1, "builtin %s\n", av[i]);
		} else if (show(pee) && (e = which(av[i], FALSE)) != NULL) {
			f = TRUE;
			fprint(1, "%S\n", e);
		}
		if (!f) {
			found = FALSE;
			if (errno != ENOENT)
				uerror(av[i]);
			else
				fprint(2, "%s not found\n", av[i]);
		}
	}
	set(found);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
leaq 0x1525f(%rip), %rax     # 0x192f8
movl $0x0, (%rax)
xorl %r15d, %r15d
cmpq $0x0, (%r14,%r15,8)
leaq 0x1(%r15), %r15
jne 0x40a2
decq %r15
movl $0x0, 0xc(%rsp)
movb $0x1, %al
movl %eax, 0x18(%rsp)
leaq 0xb192(%rip), %r12      # 0xf257
xorl %ebp, %ebp
xorl %ebx, %ebx
movl $0x0, 0x10(%rsp)
xorl %r13d, %r13d
movl %r13d, %ecx
movl %ecx, %r13d
movl %r15d, %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x5ea0
movl $0x1, %ecx
cmpl $0x73, %eax
je 0x40d7
cmpl $0x65, %eax
jle 0x4114
cmpl $0x76, %eax
je 0x4129
cmpl $0x70, %eax
je 0x4130
cmpl $0x66, %eax
jne 0x434e
movl $0x1, 0x10(%rsp)
jmp 0x40d4
cmpl $-0x1, %eax
je 0x4142
cmpl $0x62, %eax
jne 0x434e
movl $0x1, %ebp
jmp 0x40d4
movl $0x1, %ebx
jmp 0x40d4
movl $0x1, 0xc(%rsp)
movl $0x0, 0x18(%rsp)
jmp 0x40d4
leaq 0x151af(%rip), %rax     # 0x192f8
movslq (%rax), %rax
cmpq $0x0, (%r14,%rax,8)
je 0x436d
leaq (%r14,%rax,8), %rax
movq %rax, 0x18(%rsp)
movq (%rax), %r12
testq %r12, %r12
je 0x4410
callq 0x3040
movq %rax, 0x30(%rsp)
movl %ebp, %eax
movl 0xc(%rsp), %edi
orl %edi, %eax
movl %ebx, %esi
movl 0x10(%rsp), %edx
orl %edx, %esi
orl %eax, %esi
orl %r13d, %esi
xorl $0x1, %esi
orl %esi, %ebx
movl %ebx, 0x2c(%rsp)
orl %esi, %r13d
movl %esi, %eax
orl %edx, %eax
movl %eax, 0x24(%rsp)
orl %esi, %ebp
movl %ebp, 0x28(%rsp)
orl %edi, %esi
movl %esi, 0x20(%rsp)
movl $0x1, 0xc(%rsp)
leaq 0x15196(%rip), %r15     # 0x19350
xorl %ebx, %ebx
movq 0x18(%rsp), %rbp
movl %r13d, 0x14(%rsp)
movq 0x30(%rsp), %rax
movl $0x2, (%rax)
movl $0x0, %r14d
cmpl $0x0, 0x2c(%rsp)
je 0x4209
movq %r12, %rdi
callq 0xcaf4
movl $0x0, %r14d
testq %rax, %rax
je 0x4209
movq (%rbp,%rbx,8), %rsi
movl $0x1, %r14d
movl $0x1, %edi
movq %rax, %rdx
callq 0xcebb
testl %r13d, %r13d
je 0x4245
movq (%rbp,%rbx,8), %r12
movb (%r12), %bpl
xorl %r13d, %r13d
movq (%r15,%r13), %rsi
cmpb (%rsi), %bpl
jne 0x422f
movq %r12, %rdi
callq 0x31f0
testl %eax, %eax
je 0x424c
addq $0x10, %r13
cmpq $0x410, %r13            # imm = 0x410
jne 0x421a
cmpl $0x0, 0x24(%rsp)
jne 0x424c
jmp 0x427e
cmpl $0x0, 0x10(%rsp)
je 0x427e
movq 0x18(%rsp), %rax
movq (%rax,%rbx,8), %rdi
callq 0x5099
testq %rax, %rax
je 0x427e
movq 0x18(%rsp), %rbp
movq (%rbp,%rbx,8), %rsi
movl $0x1, %r14d
movl $0x1, %edi
movq %rax, %rdx
callq 0x51fa
jmp 0x42f5
cmpl $0x0, 0x28(%rsp)
movq 0x18(%rsp), %rbp
je 0x42ba
movq (%rbp,%rbx,8), %r12
movq %r12, %rdi
callq 0x349c
testq %rax, %rax
je 0x42ba
movl $0x1, %r14d
movl $0x1, %edi
leaq 0xafaf(%rip), %rsi      # 0xf25d
movq %r12, %rdx
xorl %eax, %eax
callq 0xb06f
jmp 0x42f5
cmpl $0x0, 0x20(%rsp)
je 0x42f5
movq (%rbp,%rbx,8), %rdi
xorl %esi, %esi
callq 0xdfb5
testq %rax, %rax
movl 0x14(%rsp), %r13d
je 0x42fa
movl $0x1, %r14d
movl $0x1, %edi
leaq 0x103ad(%rip), %rsi     # 0x14696
movq %rax, %rdx
xorl %eax, %eax
callq 0xb06f
jmp 0x42fa
movl 0x14(%rsp), %r13d
testl %r14d, %r14d
jne 0x433b
movq 0x30(%rsp), %rax
cmpl $0x2, (%rax)
movq (%rbp,%rbx,8), %rdx
jne 0x432b
movl $0x0, 0xc(%rsp)
movl $0x2, %edi
leaq 0xaf69(%rip), %rsi      # 0xf28b
xorl %eax, %eax
callq 0xb06f
jmp 0x433b
movq %rdx, %rdi
callq 0xc7ed
movl $0x0, 0xc(%rsp)
movq 0x8(%rbp,%rbx,8), %r12
incq %rbx
testq %r12, %r12
jne 0x41c6
jmp 0x4356
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %edi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xbcdc
movl 0x10(%rsp), %edi
movl %edi, %r14d
orl %ebx, %r14d
je 0x4380
movl %ebx, %esi
callq 0x7ca4
testl %r13d, %r13d
je 0x438a
callq 0x5159
testl %ebp, %ebp
je 0x43c2
movl $0x8, %r15d
leaq 0x14e45(%rip), %r12     # 0x191e0
leaq 0xaebb(%rip), %rbx      # 0xf25d
movq (%r15,%r12), %rdx
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0xb06f
addq $0x10, %r15
cmpq $0x118, %r15            # imm = 0x118
jne 0x43a2
testb $0x1, 0x18(%rsp)
jne 0x43dc
leaq 0xae99(%rip), %rsi      # 0xf269
movl $0x2, %edi
xorl %eax, %eax
callq 0xb06f
orl 0xc(%rsp), %ebp
orl %r14d, %ebp
movl $0x1, 0xc(%rsp)
orl %r13d, %ebp
jne 0x4356
movl $0x1, 0xc(%rsp)
movl $0x1, %edi
movl $0x1, %esi
callq 0x7ca4
jmp 0x4356
movl $0x1, 0xc(%rsp)
jmp 0x4356