// File: /workspace/github_c_makefile_star2_O2/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 0x153e2(%rip), %rax     # 0x192f8
andl $0x0, (%rax)
xorl %r15d, %r15d
cmpq $0x0, (%r14,%r15,8)
leaq 0x1(%r15), %r15
jne 0x3f1c
decq %r15
movl $0x0, 0xc(%rsp)
movb $0x1, %al
movl %eax, 0x18(%rsp)
leaq 0xa30b(%rip), %r12      # 0xe24a
pushq $0x1
popq %rbp
movl $0x0, 0x8(%rsp)
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 0x5c00
movl %ebp, %ecx
cmpl $0x73, %eax
je 0x3f5a
cmpl $-0x1, %eax
je 0x3fad
cmpl $0x62, %eax
je 0x3f95
cmpl $0x76, %eax
je 0x3f9b
cmpl $0x70, %eax
je 0x3f9f
cmpl $0x66, %eax
jne 0x4183
movl %ebp, 0x10(%rsp)
jmp 0x3f57
movl %ebp, 0x8(%rsp)
jmp 0x3f57
movl %ebp, %ebx
jmp 0x3f57
movl $0x0, 0x18(%rsp)
movl %ebp, 0xc(%rsp)
jmp 0x3f57
leaq 0x15344(%rip), %rax     # 0x192f8
movslq (%rax), %rax
movq (%r14,%rax,8), %r12
testq %r12, %r12
je 0x4193
leaq (%r14,%rax,8), %r15
movl 0x8(%rsp), %ecx
movl %ecx, %eax
movl 0xc(%rsp), %edi
orl %edi, %eax
movl %ebx, %ebp
movl %ebx, %esi
movl 0x10(%rsp), %edx
orl %edx, %esi
orl %eax, %esi
orl %r13d, %esi
xorl $0x1, %esi
orl %esi, %ebp
orl %esi, %r13d
movl %esi, %eax
orl %edx, %eax
movl %eax, 0x2c(%rsp)
orl %esi, %ecx
movl %ecx, 0x8(%rsp)
orl %edi, %esi
movl %esi, 0x28(%rsp)
callq 0x3040
movq %rax, 0x18(%rsp)
leaq 0x15340(%rip), %r14     # 0x19350
xorl %ebx, %ebx
pushq $0x1
popq %rax
movl %eax, 0x14(%rsp)
movl %r13d, 0x24(%rsp)
movq %r15, 0x30(%rsp)
testq %r12, %r12
je 0x418a
movq 0x18(%rsp), %rax
movl $0x2, (%rax)
movb $0x1, %al
movl %eax, 0xc(%rsp)
testl %ebp, %ebp
je 0x4065
movq %r12, %rdi
callq 0xc16d
testq %rax, %rax
je 0x4065
movq (%r15,%rbx,8), %rsi
pushq $0x1
popq %rdi
movq %rax, %rdx
callq 0xc4c9
movl $0x0, 0xc(%rsp)
testl %r13d, %r13d
je 0x40b1
movl %ebp, %r13d
movq (%r15,%rbx,8), %r12
movb (%r12), %r15b
xorl %ebp, %ebp
cmpq $0x410, %rbp            # imm = 0x410
je 0x409b
movq (%r14,%rbp), %rsi
cmpb (%rsi), %r15b
jne 0x4095
movq %r12, %rdi
callq 0x31f0
testl %eax, %eax
je 0x40be
addq $0x10, %rbp
jmp 0x4077
cmpl $0x0, 0x2c(%rsp)
movl %r13d, %ebp
movl 0x24(%rsp), %r13d
movq 0x30(%rsp), %r15
jne 0x40cb
jmp 0x40e9
cmpl $0x0, 0x10(%rsp)
je 0x40e9
movq (%r15,%rbx,8), %r12
jmp 0x40cb
movl %r13d, %ebp
movl 0x24(%rsp), %r13d
movq 0x30(%rsp), %r15
movq %r12, %rdi
callq 0x4e40
testq %rax, %rax
je 0x40e9
movq (%r15,%rbx,8), %rsi
pushq $0x1
popq %rdi
movq %rax, %rdx
callq 0x4f96
jmp 0x4164
cmpl $0x0, 0x8(%rsp)
je 0x4110
movq (%r15,%rbx,8), %r12
movq %r12, %rdi
callq 0x349c
testq %rax, %rax
je 0x4110
pushq $0x1
popq %rdi
leaq 0xa145(%rip), %rsi      # 0xe250
movq %r12, %rdx
jmp 0x415d
cmpl $0x0, 0x28(%rsp)
je 0x4136
movq (%r15,%rbx,8), %rdi
xorl %esi, %esi
callq 0xd48d
testq %rax, %rax
je 0x4136
pushq $0x1
popq %rdi
leaq 0xf5b5(%rip), %rsi      # 0x136e6
movq %rax, %rdx
jmp 0x415d
cmpb $0x0, 0xc(%rsp)
je 0x4164
movq 0x18(%rsp), %rax
cmpl $0x2, (%rax)
movq (%r15,%rbx,8), %rdx
jne 0x4171
movl $0x0, 0x14(%rsp)
pushq $0x2
popq %rdi
leaq 0xa121(%rip), %rsi      # 0xe27e
xorl %eax, %eax
callq 0xa8f6
movq 0x8(%r15,%rbx,8), %r12
incq %rbx
jmp 0x4023
movq %rdx, %rdi
callq 0xbe9d
movl $0x0, 0x14(%rsp)
jmp 0x4164
xorl %ebx, %ebx
jmp 0x421f
movl 0x14(%rsp), %ebx
jmp 0x421f
movl 0x10(%rsp), %edi
movl %edi, %r14d
orl %ebx, %r14d
je 0x41a6
movl %ebx, %esi
callq 0x788a
testl %r13d, %r13d
je 0x41b0
callq 0x4efd
cmpl $0x0, 0x8(%rsp)
je 0x41eb
pushq $0x8
popq %r15
leaq 0x1501e(%rip), %r12     # 0x191e0
leaq 0xa087(%rip), %rbx      # 0xe250
pushq $0x1
popq %rbp
cmpq $0x118, %r15            # imm = 0x118
je 0x41eb
movq (%r15,%r12), %rdx
movl %ebp, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0xa8f6
addq $0x10, %r15
jmp 0x41cc
testb $0x1, 0x18(%rsp)
jne 0x4203
leaq 0xa063(%rip), %rsi      # 0xe25c
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0xa8f6
movl 0x8(%rsp), %eax
orl 0xc(%rsp), %eax
orl %r14d, %eax
pushq $0x1
popq %rbx
orl %r13d, %eax
jne 0x421f
movl %ebx, %edi
movl %ebx, %esi
callq 0x788a
movl %ebx, %edi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb43a