LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/builtins.c
// Function: b_dot
extern void b_dot(char **av) {
	int fd;
	bool old_i = interactive, i = FALSE;
	Estack e;
	Edata star;
	av++;
	if (*av == NULL)
		return;
	if (streq(*av, "-i")) {
		av++;
		i = TRUE;
	}
	if (dasheye) { /* rc -i file has to do the right thing. reset the dasheye state to FALSE, though. */
		dasheye = FALSE;
		i = TRUE;
	}
	if (*av == NULL)
		return;
	fd = rc_open(*av, rFrom);
	if (fd < 0) {
		uerror(*av);
		set(FALSE);
		return;
	}
	starassign(*av, av+1, TRUE);
	interactive = i;
	pushfd(fd);
	star.name = "*";
	except(eVarstack, star, &e);
	doit(TRUE);
	varrm("*", TRUE);
	unexcept(eVarstack);
	interactive = old_i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x3679
leaq 0x8(%rdi), %rbx
xorl %r14d, %r14d
cmpb $0x2d, (%rax)
jne 0x35e7
cmpb $0x69, 0x1(%rax)
jne 0x35e7
addq $0x10, %rdi
xorl %r14d, %r14d
cmpb $0x0, 0x2(%rax)
sete %r14b
cmoveq %rdi, %rbx
leaq 0x165ea(%rip), %rax     # 0x19bd8
cmpl $0x0, (%rax)
je 0x35ff
movl $0x0, (%rax)
movl $0x1, %r14d
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3679
leaq 0x165c6(%rip), %r15     # 0x19bd4
movl (%r15), %r12d
xorl %esi, %esi
callq 0xa08c
movq (%rbx), %rdi
testl %eax, %eax
js 0x3686
movl %eax, %ebp
addq $0x8, %rbx
movq %rbx, %rsi
movl $0x1, %edx
callq 0xcbaf
movl %r14d, (%r15)
movl %ebp, %edi
callq 0x82ed
leaq 0xba19(%rip), %rbx      # 0xf05c
leaq 0x8(%rsp), %rdx
movl $0x3, %edi
movq %rbx, %rsi
callq 0x44b0
movl $0x1, %edi
callq 0x84c5
movq %rbx, %rdi
movl $0x1, %esi
callq 0xcb35
movl $0x3, %edi
callq 0x44e4
movl %r12d, (%r15)
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0xc6dd
xorl %edi, %edi
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xbbec
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/builtins.c
// Function: b_break
static void b_break(char **av) {
	if (av[1] != NULL) {
		arg_count("break");
		return;
	}
	rc_raise(eBreak);
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x36df
pushq %rax
leaq 0xb9ec(%rip), %rsi      # 0xf0b0
leaq 0xb993(%rip), %rdx      # 0xf05e
movl $0x2, %edi
xorl %eax, %eax
callq 0xaf8c
xorl %edi, %edi
popq %rax
jmp 0xbbec
movl $0x1, %edi
jmp 0x4566
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/builtins.c
// Function: b_continue
static void b_continue(char **av) {
	if (av[1] != NULL) {
		arg_count("continue");
		return;
	}
	rc_raise(eContinue);
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x3915
pushq %rax
leaq 0xb7b6(%rip), %rsi      # 0xf0b0
leaq 0xb76e(%rip), %rdx      # 0xf06f
movl $0x2, %edi
xorl %eax, %eax
callq 0xaf8c
xorl %edi, %edi
popq %rax
jmp 0xbbec
movl $0x7, %edi
jmp 0x4566
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/builtins.c
// Function: b_echo
static void b_echo(char **av) {
    char *format = "%A\n";
    if (*++av != NULL) {
	if (streq(*av, "-n"))
	    format = "%A", av++;
	else if (streq(*av, "--"))
	    av++;
    }
    fprint(1, format, av);
    set(TRUE);
}

// Assembly:
leaq 0x8(%rdi), %rdx
movq 0x8(%rdi), %rax
leaq 0xb7c1(%rip), %rsi      # 0xf0ef
testq %rax, %rax
je 0x3966
cmpb $0x2d, (%rax)
jne 0x3966
cmpb $0x6e, 0x1(%rax)
jne 0x3944
cmpb $0x0, 0x2(%rax)
je 0x3958
cmpb $0x2d, 0x1(%rax)
jne 0x3966
addq $0x10, %rdi
cmpb $0x0, 0x2(%rax)
cmoveq %rdi, %rdx
jmp 0x3966
addq $0x10, %rdi
leaq 0xb790(%rip), %rsi      # 0xf0f3
movq %rdi, %rdx
pushq %rax
movl $0x1, %edi
xorl %eax, %eax
callq 0xaf8c
movl $0x1, %edi
popq %rax
jmp 0xbbec
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/builtins.c
// Function: b_eval
static void b_eval(char **av) {
	bool i = interactive;
	if (av[1] == NULL)
		return;
	interactive = FALSE;
	pushstring(av + 1, i); /* don't reset line numbers on noninteractive eval */
	doit(TRUE);
	interactive = i;
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x39b9
pushq %r14
pushq %rbx
pushq %rax
addq $0x8, %rdi
leaq 0x16240(%rip), %r14     # 0x19bd4
movl (%r14), %ebx
movl $0x0, (%r14)
movl %ebx, %esi
callq 0x8388
movl $0x1, %edi
callq 0x84c5
movl %ebx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/builtins.c
// Function: b_newpgrp
static void b_newpgrp(char **av) {
	if (av[1] != NULL) {
		arg_count("newpgrp");
		return;
	}
	setpgid(rc_pid, rc_pid); /* XXX check return value */
	tcsetpgrp(2, rc_pid); /* XXX check return value */
}

// Assembly:
pushq %rbx
cmpq $0x0, 0x8(%rdi)
je 0x3dea
leaq 0xb2e1(%rip), %rsi      # 0xf0b0
leaq 0xb2b1(%rip), %rdx      # 0xf087
movl $0x2, %edi
xorl %eax, %eax
callq 0xaf8c
xorl %edi, %edi
popq %rbx
jmp 0xbbec
leaq 0x15dcf(%rip), %rbx     # 0x19bc0
movl (%rbx), %edi
movl %edi, %esi
callq 0x3320
movl (%rbx), %esi
movl $0x2, %edi
popq %rbx
jmp 0x32e0
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/builtins.c
// Function: b_shift
static void b_shift(char **av) {
	int shift = (av[1] == NULL ? 1 : a2u(av[1]));
	List *s, *dollarzero;
	if (av[1] != NULL && av[2] != NULL) {
		arg_count("shift");
		return;
	}
	if (shift < 0) {
		badnum(av[1]);
		return;
	}
	s = varlookup("*")->n;
	dollarzero = varlookup("0");
	while (s != NULL && shift != 0) {
		s = s->n;
		--shift;
	}
	if (s == NULL && shift != 0) {
		fprint(2, "rc: cannot shift\n");
		set(FALSE);
	} else {
		varassign("*", append(dollarzero, s), FALSE);
		set(TRUE);
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x3e80
movl $0xa, %esi
callq 0xc780
movl %eax, %ebx
movq 0x8(%r14), %rdx
testq %rdx, %rdx
je 0x3e62
cmpq $0x0, 0x10(%r14)
je 0x3e62
leaq 0xb257(%rip), %rsi      # 0xf0b0
leaq 0xb236(%rip), %rdx      # 0xf096
jmp 0x3e6d
testl %ebx, %ebx
jns 0x3e85
leaq 0xb3b3(%rip), %rsi      # 0xf220
xorl %ebx, %ebx
movl $0x2, %edi
xorl %eax, %eax
callq 0xaf8c
jmp 0x3f09
movl $0x1, %ebx
leaq 0xb1d0(%rip), %rdi      # 0xf05c
callq 0xc9da
movq 0x10(%rax), %r14
leaq 0x10158(%rip), %rdi     # 0x13ff4
callq 0xc9da
testq %r14, %r14
setne %dl
testl %ebx, %ebx
setne %cl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x3ec8
decl %ebx
movq 0x10(%r14), %r14
addl $-0x1, %ebx
setb %cl
testq %r14, %r14
je 0x3ec8
testb %cl, %cl
jne 0x3eb5
testq %r14, %r14
jne 0x3ee8
testb %cl, %cl
je 0x3ee8
leaq 0xb336(%rip), %rsi      # 0xf20e
xorl %ebx, %ebx
movl $0x2, %edi
xorl %eax, %eax
callq 0xaf8c
jmp 0x3f09
movq %rax, %rdi
movq %r14, %rsi
callq 0x6677
leaq 0xb162(%rip), %rdi      # 0xf05c
movq %rax, %rsi
xorl %edx, %edx
callq 0xc808
movl $0x1, %ebx
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xbbec
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/builtins.c
// Function: b_umask
static void b_umask(char **av) {
    int i;
    if (*++av == NULL) {
	set(TRUE);
	i = umask(0);
	umask(i);
	fprint(1, "0%o\n", i);
    } else if (av[1] == NULL) {
	i = o2u(*av);
	if ((unsigned int) i > 0777) {
	    fprint(2, "bad umask\n");
	    set(FALSE);
	} else {
	    umask(i);
	    set(TRUE);
	}
    } else {
	arg_count("umask");
	return;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rax
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x3f47
cmpq $0x0, 0x10(%rax)
je 0x3f77
leaq 0xb17e(%rip), %rsi      # 0xf0b0
leaq 0xb163(%rip), %rdx      # 0xf09c
movl $0x2, %edi
xorl %eax, %eax
callq 0xaf8c
jmp 0x3f9b
movl $0x1, %edi
callq 0xbbec
xorl %edi, %edi
callq 0x3200
movl %eax, %ebx
movl %eax, %edi
callq 0x3200
leaq 0xb2d2(%rip), %rsi      # 0xf23a
movl $0x1, %edi
movl %ebx, %edx
xorl %eax, %eax
popq %rbx
jmp 0xaf8c
movl $0x8, %esi
callq 0xc780
cmpl $0x200, %eax            # imm = 0x200
jb 0x3fa3
leaq 0xb2b0(%rip), %rsi      # 0xf23f
movl $0x2, %edi
xorl %eax, %eax
callq 0xaf8c
xorl %edi, %edi
popq %rbx
jmp 0xbbec
movl %eax, %edi
callq 0x3200
movl $0x1, %edi
jmp 0x3f9d
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/builtins.c
// Function: b_wait
static void b_wait(char **av) {
	if (*++av == NULL)
		waitforall();
	else
		waitfor(av);
        sigchk();
}

// Assembly:
pushq %rax
cmpq $0x0, 0x8(%rdi)
je 0x3fc4
addq $0x8, %rdi
callq 0xd108
jmp 0x3fc9
callq 0xd099
popq %rax
jmp 0xb9f9
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/builtins.c
// Function: printlimit
static void printlimit(const struct Limit *limit, bool hard) {
	struct rlimit rlim;
	rlim_t lim;
	getrlimit(limit->flag, &rlim);
	if (hard)
		lim = rlim.rlim_max;
	else
		lim = rlim.rlim_cur;
	if (lim == RLIM_INFINITY)
		fprint(1, "%s \tunlimited\n", limit->name);
	else {
		const struct Suffix *suf;
		for (suf = limit->suffix; suf != NULL; suf = suf->next)
			if (lim % suf->amount == 0 && (lim != 0 || suf->amount > 1)) {
				lim /= suf->amount;
				break;
			}
		fprint(1, RLIM_FMT, limit->name, (RLIM_CONV)lim, (suf == NULL || lim == 0) ? "" : suf->name);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movl 0x8(%rdi), %edi
movq %rsp, %r14
movq %r14, %rsi
callq 0x3340
testl %ebp, %ebp
leaq 0x8(%rsp), %rax
cmoveq %r14, %rax
movq (%rax), %rcx
cmpq $-0x1, %rcx
je 0x43a4
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x4398
testq %rcx, %rcx
setne %r8b
movq 0x8(%rsi), %rdi
movq %rcx, %rax
xorl %edx, %edx
divq %rdi
cmpq $0x2, %rdi
setge %r9b
testq %rdx, %rdx
jne 0x4393
orb %r9b, %r8b
jne 0x43bc
movq (%rsi), %rsi
jmp 0x4369
movq (%rbx), %rdx
leaq 0xba85(%rip), %r8       # 0xfe27
jmp 0x43d4
movq (%rbx), %rdx
leaq 0xae3c(%rip), %rsi      # 0xf1ea
movl $0x1, %edi
xorl %eax, %eax
callq 0xaf8c
jmp 0x43e7
movq (%rbx), %rdx
cmpq %rcx, %rdi
jbe 0x43cd
leaq 0xba5c(%rip), %r8       # 0xfe27
jmp 0x43d1
movq 0x10(%rsi), %r8
movq %rax, %rcx
leaq 0xae1e(%rip), %rsi      # 0xf1f9
movl $0x1, %edi
xorl %eax, %eax
callq 0xaf8c
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/except.c
// Function: except
extern void except(ecodes e, Edata data, Estack *ex) {
	ex->prev = estack;
	estack = ex;
	estack->e = e;
	estack->data = data;
	if (e == eError || e == eBreak || e == eReturn || e == eContinue)
		estack->interactive = interactive;
}

// Assembly:
movq 0x152c1(%rip), %rax     # 0x19778
movq %rax, 0x10(%rdx)
movq %rdx, 0x152b6(%rip)     # 0x19778
movl %edi, (%rdx)
movq %rsi, 0x8(%rdx)
cmpl $0x7, %edi
ja 0x44e3
movl $0x87, %eax
btl %edi, %eax
jae 0x44e3
leaq 0x156f6(%rip), %rax     # 0x19bd4
movl (%rax), %eax
movl %eax, 0x4(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/except.c
// Function: unexcept
extern void unexcept(ecodes e) {
	assert(e == estack->e);
	switch (estack->e) {
	default:
		break;
	case eError:
		interactive = estack->interactive;
		break;
	case eArena:
		restoreblock(estack->data.b);
		break;
	case eFifo:
		unlink(estack->data.name);
		break;
	case eFd:
		close(estack->data.fd);
		break;
	}
	estack = estack->prev;
}

// Assembly:
pushq %rax
movq 0x1528c(%rip), %rax     # 0x19778
cmpl %edi, (%rax)
jne 0x4547
cmpl $0x6, %edi
ja 0x4533
movl %edi, %ecx
leaq 0xae3a(%rip), %rdx      # 0xf338
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl 0x4(%rax), %eax
leaq 0x156c3(%rip), %rcx     # 0x19bd4
movl %eax, (%rcx)
jmp 0x4533
movq 0x8(%rax), %rdi
callq 0x3050
jmp 0x4533
movq 0x8(%rax), %rdi
callq 0x9ffb
jmp 0x4533
movl 0x8(%rax), %edi
callq 0x3170
movq 0x1523e(%rip), %rax     # 0x19778
movq 0x10(%rax), %rax
movq %rax, 0x15233(%rip)     # 0x19778
popq %rax
retq
leaq 0xae16(%rip), %rdi      # 0xf364
leaq 0xae1e(%rip), %rsi      # 0xf373
leaq 0xae20(%rip), %rcx      # 0xf37c
movl $0x20, %edx
callq 0x3140
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/except.c
// Function: rc_raise
extern void rc_raise(ecodes e) {
	if (e == eError && rc_pid != getpid())
		exit(1); /* child processes exit on an error/signal */
	for (; estack != NULL; estack = estack->prev)
		if (estack->e != e) {
			if (e == eBreak && (estack->e != eArena && estack->e != eVarstack && estack->e != eContinue))
				rc_error("break outside of loop");
			else if (e == eContinue && (estack->e != eVarstack))
				rc_error("continue outside of loop");
			else if (e == eReturn && estack->e == eError) /* can return from loops inside functions */
				rc_error("return outside of function");
			switch (estack->e) {
			default:
				break;
			case eVarstack:
				varrm(estack->data.name, TRUE);
				break;
			case eArena:
				restoreblock(estack->data.b);
				break;
			case eFifo:
				unlink(estack->data.name);
				break;
			case eFd:
				close(estack->data.fd);
				break;
			}
		} else {
			if (e == eError && !estack->interactive) {
				popinput();
			} else {
				Jbwrap *j = estack->data.jb;

				interactive = estack->interactive;
				estack = estack->prev;
				siglongjmp(j->j, 1);
			}
		}
	rc_exit(1); /* top of exception stack */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
testl %edi, %edi
jne 0x458d
leaq 0x15642(%rip), %rax     # 0x19bc0
movl (%rax), %ebp
callq 0x30d0
cmpl %eax, %ebp
jne 0x46b6
movq 0x151e4(%rip), %rax     # 0x19778
testq %rax, %rax
je 0x467c
leaq 0xae04(%rip), %r14      # 0xf3a8
leaq 0xada9(%rip), %r15      # 0xf354
leaq 0xae0f(%rip), %r12      # 0xf3c1
leaq 0xadd9(%rip), %r13      # 0xf392
movl $0x98, %ebp
movl (%rax), %ecx
cmpl %ebx, %ecx
jne 0x45f2
movl 0x4(%rax), %ecx
movl %ebx, %edx
orl %ecx, %edx
jne 0x4694
callq 0x83f1
movq 0x1519b(%rip), %rax     # 0x19778
movq 0x10(%rax), %rax
movq %rax, 0x15190(%rip)     # 0x19778
testq %rax, %rax
jne 0x45be
jmp 0x467c
cmpl $0x7, %ebx
je 0x461c
cmpl $0x2, %ebx
je 0x4613
cmpl $0x1, %ebx
jne 0x4629
movq %r13, %rdi
cmpl $0x7, %ecx
ja 0x4624
btl %ecx, %ebp
movq %r13, %rdi
jb 0x4629
jmp 0x4624
movq %r12, %rdi
testl %ecx, %ecx
jne 0x4629
jmp 0x4624
movq %r14, %rdi
cmpl $0x3, %ecx
je 0x4629
callq 0x46c0
movq 0x15148(%rip), %rax     # 0x19778
movl (%rax), %ecx
addl $-0x3, %ecx
cmpl $0x3, %ecx
ja 0x45d6
movslq (%r15,%rcx,4), %rcx
addq %r15, %rcx
jmpq *%rcx
movq 0x8(%rax), %rdi
movl $0x1, %esi
callq 0xcb35
jmp 0x45d6
movq 0x8(%rax), %rdi
callq 0x3050
jmp 0x45d6
movl 0x8(%rax), %edi
callq 0x3170
jmp 0x45d6
movq 0x8(%rax), %rdi
callq 0x9ffb
jmp 0x45d6
movl $0x1, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4eb5
movq 0x8(%rax), %rdi
leaq 0x15535(%rip), %rdx     # 0x19bd4
movl %ecx, (%rdx)
movq 0x10(%rax), %rax
movq %rax, 0x150cc(%rip)     # 0x19778
movl $0x1, %esi
callq 0x3130
movl $0x1, %edi
callq 0x3330
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/except.c
// Function: rc_error
extern void rc_error(char *s) {
	pr_error(s, -1);
	set(FALSE);
	redirq = NULL;
	cond = FALSE; /* no longer inside conditional */
	rc_raise(eError);
}

// Assembly:
pushq %rax
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xc694
xorl %edi, %edi
callq 0xbbec
leaq 0x153ef(%rip), %rax     # 0x19ac8
movq $0x0, (%rax)
leaq 0x168f1(%rip), %rax     # 0x1afd8
movl $0x0, (%rax)
xorl %edi, %edi
popq %rax
jmp 0x4566
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/except.c
// Function: clearflow
extern void clearflow() {
	Estack **e = &estack;
	while (*e != NULL)
		switch ((*e)->e) {
		case eBreak: case eContinue: case eReturn:
			*e = (*e)->prev;
			break;
		default:
			e = &(*e)->prev;
		}
}

// Assembly:
movq 0x1507c(%rip), %rax     # 0x19778
testq %rax, %rax
je 0x4732
leaq 0x15070(%rip), %rdx     # 0x19778
movl $0x86, %ecx
movl (%rax), %esi
cmpl $0x7, %esi
ja 0x4722
btl %esi, %ecx
jae 0x4722
movq 0x10(%rax), %rax
movq %rax, (%rdx)
jmp 0x472d
movq %rax, %rdx
movq 0x10(%rax), %rax
addq $0x10, %rdx
testq %rax, %rax
jne 0x470d
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/except.c
// Function: pop_cmdarg
extern void pop_cmdarg(bool remove) {
	for (; estack != NULL; estack = estack->prev)
		switch (estack->e) {
		case eFifo:
			if (remove)
				unlink(estack->data.name);
			break;
		case eFd:
			if (remove)
				close(estack->data.fd);
			break;
		default:
			return;
		}
}

// Assembly:
movq 0x15029(%rip), %rax     # 0x19778
testq %rax, %rax
je 0x4796
pushq %rbx
movl %edi, %ebx
movl (%rax), %ecx
cmpl $0x6, %ecx
je 0x4772
cmpl $0x5, %ecx
jne 0x4795
testl %ebx, %ebx
je 0x477e
movq 0x8(%rax), %rdi
callq 0x3050
jmp 0x477e
testl %ebx, %ebx
je 0x477e
movl 0x8(%rax), %edi
callq 0x3170
movq 0x14ff3(%rip), %rax     # 0x19778
movq 0x10(%rax), %rax
movq %rax, 0x14fe8(%rip)     # 0x19778
testq %rax, %rax
jne 0x4757
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/except.c
// Function: sigint
extern void sigint(int s) {
	if (s != SIGINT)
		panic("s != SIGINT in sigint catcher");
	/* this is the newline you see when you hit ^C while typing a command */
	if (interactive && nl_on_intr)
		fprint(2, "\n");
	nl_on_intr = TRUE;
	redirq = NULL;
	cond = FALSE;
	rc_raise(eError);
}

// Assembly:
pushq %rax
cmpl $0x2, %edi
je 0x47a9
leaq 0xac38(%rip), %rdi      # 0xf3dc
callq 0xc72e
leaq 0x15424(%rip), %rax     # 0x19bd4
cmpl $0x0, (%rax)
je 0x47d1
cmpl $0x0, 0x14b34(%rip)     # 0x192f0
je 0x47d1
leaq 0xfe33(%rip), %rsi      # 0x145f8
movl $0x2, %edi
xorl %eax, %eax
callq 0xaf8c
movl $0x1, 0x14b15(%rip)     # 0x192f0
leaq 0x152e6(%rip), %rax     # 0x19ac8
movq $0x0, (%rax)
leaq 0x167e8(%rip), %rax     # 0x1afd8
movl $0x0, (%rax)
xorl %edi, %edi
popq %rax
jmp 0x4566
nop
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/fn.c
// Function: inithandler
extern void inithandler() {
	int i;
	null.type = nBody;
	null.u[0].p = null.u[1].p = NULL;
	for (i = 1; i < NUMOFSIGNALS; i++)
		if (i != SIGCHLD && sighandlers[i] == SIG_IGN)
			fnassign(signals[i].name, NULL); /* ignore incoming ignored signals */
	if (interactive || sighandlers[SIGINT] != SIG_IGN) {
		def_sigint = sigint;
		fnrm("sigint"); /* installs SIGINT catcher if not inherited ignored */
	}
	if (!dashdee) {
		if (interactive || sighandlers[SIGQUIT] != SIG_IGN) {
			def_sigquit = dud_handler;
			fnrm("sigquit"); /* "ignores" SIGQUIT unless inherited ignored */
		}
		if (interactive) {
			def_sigterm = dud_handler;
			fnrm("sigterm"); /* ditto for SIGTERM */
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl $0x4, 0x14c85(%rip)     # 0x19780
xorps %xmm0, %xmm0
movups %xmm0, 0x14c83(%rip)    # 0x19788
xorl %r14d, %r14d
leaq 0x15a91(%rip), %rbx     # 0x1a5a0
leaq 0x1483a(%rip), %r15     # 0x19350
cmpq $0x80, %r14
je 0x4b33
cmpq $0x1, 0x8(%rbx,%r14)
jne 0x4b33
movq 0x10(%r15,%r14,2), %rdi
xorl %esi, %esi
callq 0x4bc5
addq $0x8, %r14
cmpq $0x200, %r14            # imm = 0x200
jne 0x4b16
leaq 0x1508d(%rip), %r14     # 0x19bd4
cmpl $0x0, (%r14)
jne 0x4b54
cmpq $0x1, 0x10(%rbx)
je 0x4b6e
leaq -0x3c4(%rip), %rax      # 0x4797
movq %rax, 0x14c46(%rip)     # 0x197a8
leaq 0xa89e(%rip), %rdi      # 0xf407
callq 0x4cf4
leaq 0x15053(%rip), %rax     # 0x19bc8
cmpl $0x0, (%rax)
je 0x4b80
popq %rbx
popq %r14
popq %r15
retq
cmpl $0x0, (%r14)
jne 0x4b8d
cmpq $0x1, 0x18(%rbx)
je 0x4b7a
leaq 0x225(%rip), %rbx       # 0x4db9
movq %rbx, 0x14c15(%rip)     # 0x197b0
leaq 0xa86c(%rip), %rdi      # 0xf40e
callq 0x4cf4
cmpl $0x0, (%r14)
je 0x4b7a
movq %rbx, 0x14c04(%rip)     # 0x197b8
leaq 0xa85b(%rip), %rdi      # 0xf416
popq %rbx
popq %r14
popq %r15
jmp 0x4cf4
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/fn.c
// Function: fnassign
extern void fnassign(char *name, Node *def) {
	Node *newdef = treecpy(def == NULL ? &null : def, ealloc); /* important to do the treecopy first */
	rc_Function *new = get_fn_place(name);
	int i;
	new->def = newdef;
	new->extdef = NULL;
	if (strncmp(name, "sig", conststrlen("sig")) == 0) { /* slight optimization */
		if (streq(name, "sigchld") || streq(name, "sigcld"))
			rc_error("can't trap SIGCHLD");
		if (streq(name, "sigexit"))
			runexit = TRUE;
		for (i = 1; i < NUMOFSIGNALS; i++) /* zero is a bogus signal */
			if (streq(signals[i].name, name)) {
				handlers[i] = newdef;
				if (def == NULL)
					rc_signal(i, SIG_IGN);
				else
					rc_signal(i, fn_handler);
				break;
			}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
leaq 0x14ba0(%rip), %rdi     # 0x19780
cmovneq %rsi, %rdi
leaq 0x5422(%rip), %rsi      # 0xa00d
callq 0xc44b
movq %rax, %r15
movq %r14, %rdi
callq 0x7390
movq %r15, (%rax)
movq $0x0, 0x8(%rax)
cmpb $0x73, (%r14)
jne 0x4cb1
cmpb $0x69, 0x1(%r14)
jne 0x4cb1
cmpb $0x67, 0x2(%r14)
jne 0x4cb1
leaq 0xa7f9(%rip), %rsi      # 0xf426
movq %r14, %rdi
callq 0x31f0
testl %eax, %eax
je 0x4c4c
leaq 0xa7ee(%rip), %rsi      # 0xf42e
movq %r14, %rdi
callq 0x31f0
testl %eax, %eax
jne 0x4c61
leaq 0xa7e2(%rip), %rdi      # 0xf435
callq 0x46c0
movb (%r14), %bpl
cmpb $0x73, %bpl
jne 0x4c7e
leaq 0xa7b6(%rip), %rsi      # 0xf41e
movq %r14, %rdi
callq 0x31f0
movb $0x73, %bpl
testl %eax, %eax
jne 0x4c7e
movb $0x1, 0x14d4a(%rip)     # 0x199c8
leaq 0x146cb(%rip), %r13     # 0x19350
addq $0x10, %r13
movl $0x1, %r12d
movq (%r13), %rdi
cmpb %bpl, (%rdi)
jne 0x4ca4
movq %r14, %rsi
callq 0x31f0
testl %eax, %eax
je 0x4cc0
incq %r12
addq $0x10, %r13
cmpq $0x41, %r12
jne 0x4c8f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %rbx, %rbx
leaq 0x14af6(%rip), %rax     # 0x197c0
movq %r15, (%rax,%r12,8)
leaq 0x21a(%rip), %rax       # 0x4eef
movl $0x1, %esi
cmovneq %rax, %rsi
movl %r12d, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xbaa4
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/fn.c
// Function: fnrm
extern void fnrm(char *name) {
	int i;
	for (i = 1; i < NUMOFSIGNALS; i++)
		if (streq(signals[i].name, name)) {
			handlers[i] = NULL;
			switch (i) {
			case SIGINT:
				rc_signal(i, def_sigint);
				break;
			case SIGQUIT:
				rc_signal(i, def_sigquit);
				break;
			case SIGTERM:
				rc_signal(i, def_sigterm);
				break;
			default:
				rc_signal(i, SIG_DFL);
			}
		}
	if (streq(name, "sigexit"))
		runexit = FALSE;
	delete_fn(name);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1464a(%rip), %r15     # 0x19350
addq $0x10, %r15
movl $0x1, %r14d
leaq 0x14aa9(%rip), %r12     # 0x197c0
movq (%r15), %rdi
movb (%rdi), %al
cmpb (%rbx), %al
jne 0x4d7a
movq %rbx, %rsi
callq 0x31f0
testl %eax, %eax
jne 0x4d7a
movq $0x0, (%r12,%r14,8)
cmpl $0xf, %r14d
je 0x4d62
cmpl $0x3, %r14d
je 0x4d54
cmpl $0x2, %r14d
jne 0x4d70
movq 0x14a5b(%rip), %rsi     # 0x197a8
movl $0x2, %edi
jmp 0x4d75
movq 0x14a55(%rip), %rsi     # 0x197b0
movl $0x3, %edi
jmp 0x4d75
movq 0x14a4f(%rip), %rsi     # 0x197b8
movl $0xf, %edi
jmp 0x4d75
movl %r14d, %edi
xorl %esi, %esi
callq 0xbaa4
incq %r14
addq $0x10, %r15
cmpq $0x41, %r14
jne 0x4d17
cmpb $0x73, (%rbx)
jne 0x4da6
leaq 0xa68b(%rip), %rsi      # 0xf41e
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jne 0x4da6
movb $0x0, 0x14c22(%rip)     # 0x199c8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x771d
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/fn.c
// Function: setsigdefaults
extern void setsigdefaults(bool sysvbackground) {
	int i;
	/*
	   General housekeeping: setsigdefaults happens after fork(),
	   so it's a convenient place to clean up open file descriptors.
	   (history file, scripts, etc.)
	*/
	closefds();
	/*
	   Restore signals to SIG_DFL, paying close attention to
	   a few quirks: SIGINT, SIGQUIT and are treated specially
	   depending on whether we are doing v7-style backgrounding
	   or not; the default action for SIGINT, SIGQUIT and SIGTERM
	   must be set to the appropriate action; finally, care must
	   be taken not to set to SIG_DFL any signals which are being
	   ignored.
	*/
	for (i = 1; i < NUMOFSIGNALS; i++)
		if (sighandlers[i] != SIG_IGN) {
			handlers[i] = NULL;
			switch (i) {
			case SIGINT:
				if (sysvbackground) {
					def_sigint = SIG_IGN;
					fnassign("sigint", NULL); /* ignore */
				} else {
					def_sigint = SIG_DFL;
					goto sigcommon;
				}
				break;
			case SIGQUIT:
				if (sysvbackground) {
					def_sigquit = SIG_IGN;
					fnassign("sigquit", NULL); /* ignore */
				} else {
					def_sigquit = SIG_DFL;
					goto sigcommon;
				}
				break;
			case SIGTERM:
				def_sigterm = SIG_DFL;
				/* FALLTHROUGH */
			sigcommon:
			default:
				if (sighandlers[i] != SIG_DFL) {
					rc_signal(i, SIG_DFL);
					delete_fn(signals[i].name);
				}
			}
		}
	delete_fn("sigexit");
	runexit = FALSE; /* No sigexit on subshells */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
callq 0x86dd
leaq 0x1457d(%rip), %r13     # 0x19350
addq $0x10, %r13
movl $0x1, %r14d
leaq 0x157bc(%rip), %rbp     # 0x1a5a0
leaq 0x149d5(%rip), %r15     # 0x197c0
leaq 0x149c6(%rip), %r12     # 0x197b8
movq (%rbp,%r14,8), %rax
cmpq $0x1, %rax
je 0x4e82
movq $0x0, (%r15,%r14,8)
movq %r12, %rcx
cmpl $0xf, %r14d
je 0x4e63
cmpl $0x3, %r14d
je 0x4e3d
cmpl $0x2, %r14d
jne 0x4e6a
leaq 0x14983(%rip), %rcx     # 0x197a8
testl %ebx, %ebx
je 0x4e63
movq $0x1, 0x14974(%rip) # 0x197a8
leaq 0xa5cc(%rip), %rdi      # 0xf407
jmp 0x4e5a
leaq 0x1496c(%rip), %rcx     # 0x197b0
testl %ebx, %ebx
je 0x4e63
movq $0x1, 0x1495d(%rip) # 0x197b0
leaq 0xa5b4(%rip), %rdi      # 0xf40e
xorl %esi, %esi
callq 0x4bc5
jmp 0x4e82
movq $0x0, (%rcx)
testq %rax, %rax
je 0x4e82
movl %r14d, %edi
xorl %esi, %esi
callq 0xbaa4
movq (%r13), %rdi
callq 0x771d
incq %r14
addq $0x10, %r13
cmpq $0x41, %r14
jne 0x4df2
leaq 0xa584(%rip), %rdi      # 0xf41e
callq 0x771d
movb $0x0, 0x14b22(%rip)     # 0x199c8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/fn.c
// Function: rc_exit
extern void rc_exit(int stat) {
	if (runexit) {
		char *sig[2];
		sig[0] = "sigexit";
		sig[1] = NULL;
		runexit = FALSE;
		funcall(sig);
		stat = getstatus();
	}
	exit(stat);
}

// Assembly:
subq $0x18, %rsp
cmpb $0x1, 0x14b08(%rip)     # 0x199c8
jne 0x4eea
leaq 0xa555(%rip), %rax      # 0xf41e
movq %rsp, %rdi
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x14aea(%rip)     # 0x199c8
callq 0x34ee
callq 0xbb95
movl %eax, %edi
callq 0x3330
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/fn.c
// Function: fn_handler
static void fn_handler(int s) {
	char *sig[2];
	int olderrno;
	if (s < 1 || s >= NUMOFSIGNALS)
		panic("unknown signal");
	olderrno = errno;
	sig[0] = signals[s].name;
	sig[1] = NULL;
	funcall(sig);
	errno = olderrno;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leal -0x41(%rbx), %eax
cmpl $-0x41, %eax
ja 0x4f0d
leaq 0xa568(%rip), %rdi      # 0xf470
callq 0xc72e
callq 0x3040
movq %rax, %r14
movl (%rax), %ebp
movslq %ebx, %rax
shlq $0x4, %rax
leaq 0x1442b(%rip), %rcx     # 0x19350
movq (%rcx,%rax), %rax
movq %rsp, %rdi
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
callq 0x34ee
movl %ebp, (%r14)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/fn.c
// Function: fnassign_string
extern void fnassign_string(char *extdef) {
	char *name = get_name(extdef+3); /* +3 to skip over "fn_" */
	rc_Function *new;
	if (name == NULL)
		return;
	new = get_fn_place(name);
	new->def = NULL;
	new->extdef = ecpy(extdef);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x3, %rdi
callq 0x5177
testq %rax, %rax
je 0x4f93
movq %rax, %rdi
callq 0x7390
movq %rax, %r14
movq $0x0, (%rax)
movq %rbx, %rdi
callq 0x30f0
leaq 0x1(%rax), %rdi
callq 0xa00d
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3070
movq %r15, 0x8(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/fn.c
// Function: fnlookup
extern Node *fnlookup(char *name) {
	rc_Function *look = lookup_fn(name);
	Node *ret;
	if (look == NULL)
		return NULL; /* not found */
	if (look->def != NULL)
		return look->def;
	if (look->extdef == NULL) /* function was set to null, e.g., fn foo {} */
		return &null;
	ret = parse_fn(look->extdef);
	if (ret == NULL) {
		efree(look->extdef);
		look->extdef = NULL;
		return &null;
	} else {
		return look->def = treecpy(ret, ealloc); /* Need to take it out of nalloc space */
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x14b2c(%rip), %rax     # 0x19ad0
movq (%rax), %rsi
callq 0x72f5
testq %rax, %rax
je 0x4fed
movq %rax, %rbx
movq (%rax), %r14
testq %r14, %r14
jne 0x4ff0
movq 0x8(%rbx), %rdi
leaq 0x147b9(%rip), %r14     # 0x19780
testq %rdi, %rdi
je 0x4ff0
callq 0x5353
testq %rax, %rax
je 0x4ffb
leaq 0x5030(%rip), %rsi      # 0xa00d
movq %rax, %rdi
callq 0xc44b
movq %rax, %r14
movq %rax, (%rbx)
jmp 0x4ff0
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x8(%rbx), %rdi
callq 0x9fde
movq $0x0, 0x8(%rbx)
jmp 0x4ff0
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/fn.c
// Function: fnlookup_string
extern char *fnlookup_string(char *name) {
	rc_Function *look = lookup_fn(name);

	if (look == NULL)
		return NULL;
	if (look->extdef != NULL)
		return look->extdef;
	return look->extdef = mprint("fn_%F={%T}", name, look->def);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x14ab4(%rip), %rax     # 0x19ad0
movq (%rax), %rsi
callq 0x72f5
testq %rax, %rax
je 0x504f
movq %rax, %r14
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x5051
movq (%r14), %rdx
leaq 0xa409(%rip), %rdi      # 0xf448
movq %rbx, %rsi
xorl %eax, %eax
callq 0xb09e
movq %rax, 0x8(%r14)
jmp 0x5051
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/fn.c
// Function: whatare_all_signals
extern void whatare_all_signals() {
	int i;
	for (i = 1; i < NUMOFSIGNALS; i++)
		if (*signals[i].name != '\0') {
			if (sighandlers[i] == SIG_IGN)
				fprint(1, "fn %s {}\n", signals[i].name);
			else if (sighandlers[i] == fn_handler)
				fprint(1, "fn %S {%T}\n", signals[i].name, handlers[i]);
			else
				fprint(1, "fn %s\n", signals[i].name);
		}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x142e5(%rip), %r12     # 0x19350
leaq 0x1552e(%rip), %r13     # 0x1a5a0
leaq 0xa3da(%rip), %rbx      # 0xf453
leaq -0x191(%rip), %rbp      # 0x4eef
leaq 0xa3e2(%rip), %r15      # 0xf469
xorl %r14d, %r14d
movq 0x10(%r12,%r14,2), %rdx
cmpb $0x0, (%rdx)
je 0x50de
movq 0x8(%r13,%r14), %rax
cmpq $0x1, %rax
je 0x50ae
cmpq %rbp, %rax
je 0x50bf
movl $0x1, %edi
movq %r15, %rsi
jmp 0x50b6
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0xaf8c
jmp 0x50de
leaq 0x146fa(%rip), %rax     # 0x197c0
movq 0x8(%r14,%rax), %rcx
movl $0x1, %edi
leaq 0xa386(%rip), %rsi      # 0xf45d
xorl %eax, %eax
callq 0xaf8c
addq $0x8, %r14
cmpq $0x200, %r14            # imm = 0x200
jne 0x508a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/footobar.c
// Function: list2array
extern char **list2array(List *s, bool print) {
	char **argv, **av;

	if (print)
		fprint(2, "%L\n", s, " ");
	/*
	   Allocate 3 extra spots (2 for the fake execve & 1 for defaulting to
	   sh) and hide these from exec().
	*/
	argv = av = (char **) nalloc((listnel(s) + 4) * sizeof *av) + 3;
	while (s != NULL) {
		*av++ = s->w;
		s = s->n;
	}
	*av = NULL;
	return argv;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
je 0x5135
leaq 0xf606(%rip), %rsi      # 0x14725
leaq 0xf4cf(%rip), %rcx      # 0x145f5
movl $0x2, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0xaf8c
movq %rbx, %rdi
callq 0x9751
cltq
leaq 0x20(,%rax,8), %rdi
callq 0x9e80
addq $0x18, %rax
movq %rax, %rcx
testq %rbx, %rbx
je 0x516e
movq %rax, %rcx
movq (%rbx), %rdx
movq %rdx, (%rcx)
addq $0x8, %rcx
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0x515b
movq $0x0, (%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/footobar.c
// Function: get_name
extern char *get_name(char *s) {
	char *eq = strchr(s, '=');
	char *r, *result;
	int c;
	
	if (eq == NULL)
		return NULL;
	r = result = nalloc(eq - s + 1);
	while (1)
		switch (c = *s++) {
		case '=':
			*r++ = '\0';
			return result;
#if PROTECT_ENV
		case '_':
			if (*s == '_') {
				static const char hexchar[] = "0123456789abcdef";
				char *h1 = strchr(hexchar, s[1]);
				char *h2 = strchr(hexchar, s[2]);
				if (h1 != NULL && h2 != NULL) {
					*r++ = ((h1 - hexchar) << 4) | (h2 - hexchar);
					s += 3;
					break;
				}
			}
			/* FALLTHROUGH */
#endif
		default:
			*r++ = c;
			break;
		}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x3d, %esi
callq 0x3120
testq %rax, %rax
je 0x5233
subq %rbx, %rax
incq %rax
movq %rax, %rdi
callq 0x9e80
leaq 0xa373(%rip), %r15      # 0xf520
movq %rax, (%rsp)
movq %rax, %r13
leaq 0x1(%rbx), %rbp
movzbl (%rbx), %r14d
cmpl $0x5f, %r14d
je 0x51ca
cmpl $0x3d, %r14d
jne 0x521c
jmp 0x5228
cmpb $0x5f, (%rbp)
jne 0x521c
movsbl 0x2(%rbx), %esi
movl $0x11, %edx
movq %r15, %rdi
callq 0x31b0
movq %rax, %r12
movsbl 0x3(%rbx), %esi
movl $0x11, %edx
movq %r15, %rdi
callq 0x31b0
testq %r12, %r12
setne %cl
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x521c
shll $0x4, %r12d
subl %r15d, %eax
orl %r12d, %eax
movb %al, (%r13)
addq $0x4, %rbx
jmp 0x5223
movb %r14b, (%r13)
movq %rbp, %rbx
incq %r13
jmp 0x51b4
movb $0x0, (%r13)
movq (%rsp), %rax
jmp 0x5235
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/footobar.c
// Function: parse_var
extern List *parse_var(char *extdef) {
	char *begin, *end, *from, *to;
	int len;
	List *first, *last, *new;

	first = last = NULL;
	begin = strchr(extdef, '=');
	assert(begin); /* guaranteed by initenv() */
	while (*begin) {
		++begin;
		end = begin;
		len = 0;
		while (*end != ENV_SEP && *end != '\0') {
			if (*end == ENV_ESC) {
				++end;
				if (*end != ENV_SEP && *end != ENV_ESC) --end;
			}
			++end; ++len;
		}
		new = enew(List);
		if (last)
			last->n = new;
		else
			first = new;
		last = new;
		new->w = ealloc(len + 1);
		new->m = NULL;
		new->n = NULL;
		to = new->w;
		for (from = begin; from < end; ++from) {
			if (*from == ENV_ESC) {
				++from;
				if (*from != ENV_SEP && *from != ENV_ESC)
					--from;
			}
			*to = *from;
			++to;
		}
		*to = '\0';
		begin = end;
	}
	return first;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x3d, %esi
callq 0x3120
testq %rax, %rax
je 0x5334
movq %rax, %rbx
cmpb $0x0, (%rax)
je 0x531f
xorl %r14d, %r14d
xorl %r15d, %r15d
movq %r15, (%rsp)
movq %r14, %rbp
movq %rbx, %r13
incq %r13
movl $0x1, %r12d
movq %r13, %rbx
movzbl (%rbx), %eax
cmpl $0x2, %eax
je 0x5296
jae 0x52a2
jmp 0x52aa
movb 0x1(%rbx), %al
decb %al
cmpb $0x2, %al
jae 0x52a2
incq %rbx
incq %rbx
incq %r12
jmp 0x528a
movl $0x18, %edi
callq 0xa00d
movq %rax, %r14
movq %rax, %r15
testq %rbp, %rbp
je 0x52c7
movq %r14, 0x10(%rbp)
movq (%rsp), %r15
movq %r12, %rdi
callq 0xa00d
movq %rax, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
cmpq %rbx, %r13
jae 0x5311
movl $0x2, %edi
movb (%r13), %cl
cmpb $0x2, %cl
jne 0x5304
leaq 0x1(%r13), %rdx
movzbl 0x1(%r13), %ecx
leal -0x1(%rcx), %esi
cmpb $0x2, %sil
cmovael %edi, %ecx
cmovbq %rdx, %r13
movb %cl, (%rax)
incq %rax
incq %r13
cmpq %rbx, %r13
jb 0x52e4
movb $0x0, (%rax)
cmpb $0x0, (%rbx)
jne 0x5274
jmp 0x5322
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa20d(%rip), %rdi      # 0xf548
leaq 0xa20c(%rip), %rsi      # 0xf54e
leaq 0xa210(%rip), %rcx      # 0xf559
movl $0xf2, %edx
callq 0x3140
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/footobar.c
// Function: parse_fn
extern Node *parse_fn(char *extdef) {
	Node *def;
	char *s, old[PRELEN];
	if ((s = strchr(extdef, '=')) == NULL)
		return NULL;
	memcpy(old, s -= (PRELEN-1), PRELEN);
	memcpy(s, PREFIX, PRELEN);
	def = parseline(s);
	memcpy(s, old, PRELEN);
	return (def == NULL || def->type != nNewfn) ? NULL : def->u[1].p;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl $0x3d, %esi
callq 0x3120
testq %rax, %rax
je 0x5391
movq %rax, %rbx
movq %rax, %rdi
addq $-0x3, %rdi
movl -0x3(%rax), %ebp
movl $0x78206e66, -0x3(%rax) # imm = 0x78206E66
callq 0x869d
movl %ebp, -0x3(%rbx)
testq %rax, %rax
je 0x5391
cmpl $0xe, (%rax)
jne 0x5391
movq 0x10(%rax), %rax
jmp 0x5393
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/footobar.c
// Function: initprint
void initprint(void) {
	fmtinstall('A', Aconv);
	fmtinstall('L', Lconv);
	fmtinstall('S', Sconv);
	fmtinstall('T', Tconv);
	fmtinstall('D', Dconv);
	fmtinstall('W', Wconv);
#if PROTECT_ENV
	fmtinstall('F', Fconv);
#else
	fmtinstall('F', fmtinstall('s', NULL));
#endif
}

// Assembly:
pushq %rax
leaq 0x71(%rip), %rsi        # 0x5413
movl $0x41, %edi
callq 0xac0c
leaq 0xd2(%rip), %rsi        # 0x5485
movl $0x4c, %edi
callq 0xac0c
leaq 0x1a5(%rip), %rsi       # 0x5569
movl $0x53, %edi
callq 0xac0c
leaq 0x2ef(%rip), %rsi       # 0x56c4
movl $0x54, %edi
callq 0xac0c
leaq 0x7e3(%rip), %rsi       # 0x5bc9
movl $0x44, %edi
callq 0xac0c
leaq 0x81d(%rip), %rsi       # 0x5c14
movl $0x57, %edi
callq 0xac0c
leaq 0x8ea(%rip), %rsi       # 0x5cf2
movl $0x46, %edi
popq %rax
jmp 0xac0c
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/footobar.c
// Function: Aconv
static bool Aconv(Format *f, int ignore) {
	char **a = va_arg(f->args, char **);
	if (*a != NULL) {
		fmtcat(f, *a);
		while (*++a != NULL)
			fmtprint(f, " %s", *a);
	}
	return FALSE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %ecx
cmpq $0x28, %rcx
ja 0x5431
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x543d
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %r15
movq (%r15), %rsi
testq %rsi, %rsi
je 0x547d
movq %rbx, %rdi
callq 0xae00
movq 0x8(%r15), %rdx
testq %rdx, %rdx
je 0x547d
addq $0x10, %r15
leaq 0xa10d(%rip), %r14      # 0xf571
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0xaeba
movq (%r15), %rdx
addq $0x8, %r15
testq %rdx, %rdx
jne 0x5464
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/footobar.c
// Function: Lconv
static bool Lconv(Format *f, int ignore) {
	bool plain;
	char *sep;
	List *l, *n;

	plain = f->flags & FMT_leftside;
	l = va_arg(f->args, List *);
	sep = va_arg(f->args, char *);
	if (l == NULL && (f->flags & FMT_leftside) == 0)
		fmtprint(f, "()");
	else {
		for (; l != NULL; l = n) {
			n = l->n;
			fmtprint(f, plain ? "%s" : "%-S", l->w);
			if (n != NULL) fmtputc(f, *sep);
		}
	}
	return FALSE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movl (%rdi), %esi
cmpq $0x29, %rsi
jae 0x54bd
movq 0x10(%rbx), %rcx
movq %rsi, %rdx
addq $0x8, %rdx
movl %edx, (%rbx)
movq (%rcx,%rsi), %rcx
cmpl $0x20, %esi
ja 0x54cc
addq 0x10(%rbx), %rdx
addl $0x10, %esi
movl %esi, (%rbx)
jmp 0x54d8
movq 0x8(%rbx), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rbx)
movq (%rcx), %rcx
movq 0x8(%rbx), %rdx
leaq 0x8(%rdx), %rsi
movq %rsi, 0x8(%rbx)
movl %eax, %esi
andl $0x20, %esi
orq %rcx, %rsi
jne 0x54f5
leaq 0xa08c(%rip), %rsi      # 0xf575
movq %rbx, %rdi
xorl %eax, %eax
callq 0xaeba
jmp 0x555b
testq %rcx, %rcx
je 0x555b
movq (%rdx), %r15
testb $0x20, %al
leaq 0xa072(%rip), %rax      # 0xf578
leaq 0xa065(%rip), %r14      # 0xf572
cmoveq %rax, %r14
movq (%rcx), %rdx
movq 0x10(%rcx), %r12
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0xaeba
testq %r12, %r12
je 0x555b
movq 0x30(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0x5543
movl $0x1, %esi
movq %rbx, %rdi
callq *0x50(%rbx)
movq 0x30(%rbx), %rax
movb (%r15), %cl
leaq 0x1(%rax), %rdx
movq %rdx, 0x30(%rbx)
movb %cl, (%rax)
movq (%r12), %rdx
movq 0x10(%r12), %r12
jmp 0x5518
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/footobar.c
// Function: Sconv
static bool Sconv(Format *f, int ignore) {
	int c;
	unsigned char *s = va_arg(f->args, unsigned char *), *t = s;
	bool quoted    = (f->flags & FMT_altform)  != 0;	/* '#' */
	bool metaquote = (f->flags & FMT_leftside) != 0;	/* '-' */
	if (*s == '\0') {
		fmtprint(f, "''");
		return FALSE;
	}
	if (!quoted) {
		while ((c = *t++) != '\0')
			if (nw[c] == 1 || (metaquote && ISMETA(c)))
				goto quoteit;
		fmtprint(f, "%s", s);
		return FALSE;
	}
quoteit:
	fmtputc(f, '\'');
	while ((c = *s++) != '\0') {
		fmtputc(f, c);
		if (c == '\'')
			fmtputc(f, '\'');

	}
	fmtputc(f, '\'');
	return FALSE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %ecx
cmpq $0x28, %rcx
ja 0x5586
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x5592
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %r14
movb (%r14), %dil
testb %dil, %dil
je 0x56ac
movq 0x18(%rbx), %rax
testb $0x40, %al
jne 0x55fe
leaq 0x1(%r14), %rcx
leaq 0xa40c(%rip), %rdx      # 0xf9c0
movabsq $0x2000000200001, %rsi  # imm = 0x2000000200001
movzbl %dil, %edi
cmpb $0x1, (%rdx,%rdi)
je 0x55fe
testb $0x20, %al
je 0x55da
addl $-0x2a, %edi
cmpl $0x31, %edi
ja 0x55da
btq %rdi, %rsi
jb 0x55fe
movb (%rcx), %dil
incq %rcx
testb %dil, %dil
jne 0x55be
leaq 0x9f86(%rip), %rsi      # 0xf572
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0xaeba
jmp 0x56bd
movq 0x30(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0x5617
movl $0x1, %esi
movq %rbx, %rdi
callq *0x50(%rbx)
movq 0x30(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rbx)
movb $0x27, (%rax)
movb (%r14), %bpl
testb %bpl, %bpl
je 0x5686
incq %r14
movq 0x30(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0x5646
movl $0x1, %esi
movq %rbx, %rdi
callq *0x50(%rbx)
movq 0x30(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rbx)
movb %bpl, (%rax)
cmpb $0x27, %bpl
jne 0x567b
movq 0x30(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0x5670
movl $0x1, %esi
movq %rbx, %rdi
callq *0x50(%rbx)
movq 0x30(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rbx)
movb $0x27, (%rax)
movb (%r14), %bpl
incq %r14
testb %bpl, %bpl
jne 0x562d
movq 0x30(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0x569f
movl $0x1, %esi
movq %rbx, %rdi
callq *0x50(%rbx)
movq 0x30(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rbx)
movb $0x27, (%rax)
jmp 0x56bd
leaq 0x9ec9(%rip), %rsi      # 0xf57c
movq %rbx, %rdi
xorl %eax, %eax
callq 0xaeba
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/footobar.c
// Function: Dconv
static bool Dconv(Format *f, int ignore) {
	const char *name = "?";
	int n = va_arg(f->args, int);
	switch (n) {
	case rCreate:		name = ">";	break;
	case rAppend:		name = ">>";	break;
	case rFrom:		name = "<";	break;
	case rHeredoc:		name = "<<";	break;
	case rHerestring:	name = "<<<";	break;
	}
	fmtcat(f, name);
	return FALSE;
}

// Assembly:
movl (%rdi), %ecx
cmpq $0x28, %rcx
ja 0x5bdf
movq %rcx, %rax
addq 0x10(%rdi), %rax
addl $0x8, %ecx
movl %ecx, (%rdi)
jmp 0x5beb
movq 0x8(%rdi), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rdi)
movl (%rax), %eax
cmpq $0x4, %rax
ja 0x5c03
leaq 0x993a(%rip), %rcx      # 0xf534
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
jmp 0x5c0a
leaq 0x9a70(%rip), %rsi      # 0xf67a
pushq %rax
callq 0xae00
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/footobar.c
// Function: Wconv
static bool Wconv(Format *f, int ignore) {
	List *l, *n;

	l = va_arg(f->args, List *);
	for (; l != NULL; l = n) {
		char c, *s;

		for (s = l->w; (c = *s) != '\0'; ++s) {
			if (c == ENV_SEP || c == ENV_ESC)
				fmtputc(f, ENV_ESC);
			fmtputc(f, c);
		}
		n = l->n;
		if (n != NULL) fmtputc(f, ENV_SEP);
	}
	return FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %ecx
cmpq $0x28, %rcx
ja 0x5c34
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x5c40
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %r14
testq %r14, %r14
je 0x5ce5
movq (%r14), %r15
movb (%r15), %bpl
testb %bpl, %bpl
je 0x5cb3
incq %r15
cmpb $0x2, %bpl
ja 0x5c84
movq 0x30(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0x5c79
movl $0x1, %esi
movq %rbx, %rdi
callq *0x50(%rbx)
movq 0x30(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rbx)
movb $0x2, (%rax)
movq 0x30(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0x5c9d
movl $0x1, %esi
movq %rbx, %rdi
callq *0x50(%rbx)
movq 0x30(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rbx)
movb %bpl, (%rax)
movb (%r15), %bpl
incq %r15
testb %bpl, %bpl
jne 0x5c5a
movq 0x10(%r14), %r14
testq %r14, %r14
je 0x5ce5
movq 0x30(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0x5cd5
movl $0x1, %esi
movq %rbx, %rdi
callq *0x50(%rbx)
movq 0x30(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rbx)
movb $0x1, (%rax)
jmp 0x5c4c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/footobar.c
// Function: Fconv
static bool Fconv(Format *f, int ignore) {
	unsigned const char *s = va_arg(f->args, unsigned const char *);
	int c;

	while ((c = *s++) != '\0')
		if (dnw[c] || c == '*' || (c == '_' && *s == '_'))
			fmtprint(f, "__%02x", c);
		else
			fmtputc(f, c);
	return FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %ecx
cmpq $0x28, %rcx
ja 0x5d13
movq %rcx, %rax
addq 0x10(%rbx), %rax
addl $0x8, %ecx
movl %ecx, (%rbx)
jmp 0x5d1f
movq 0x8(%rbx), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq (%rax), %r15
movb (%r15), %bpl
testb %bpl, %bpl
je 0x5d95
incq %r15
leaq 0x9d8c(%rip), %r12      # 0xfac0
leaq 0x9948(%rip), %r14      # 0xf683
movzbl %bpl, %edx
cmpb $0x2a, %dl
je 0x5d57
cmpb $0x0, (%r12,%rdx)
jne 0x5d57
cmpb $0x5f, %bpl
jne 0x5d66
cmpb $0x5f, (%r15)
jne 0x5d66
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0xaeba
jmp 0x5d8a
movq 0x30(%rbx), %rax
cmpq 0x40(%rbx), %rax
jb 0x5d7f
movl $0x1, %esi
movq %rbx, %rdi
callq *0x50(%rbx)
movq 0x30(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rbx)
movb %bpl, (%rax)
movb (%r15), %bpl
incq %r15
testb %bpl, %bpl
jne 0x5d3b
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/glob.c
// Function: lmatch
extern bool lmatch(List *s, List *p) {
	List *q;
	if (s == NULL) {
		if (p == NULL) /* null matches null */
			return TRUE;
		for (; p != NULL; p = p->n) /* one or more stars match null */
			if (strspn(p->w, "*") == strlen(p->w) &&
			    p->m != NULL && strlen(p->m) == strlen(p->w))
				return TRUE;
		return FALSE;
	}
	for (; s != NULL; s = s->n)
		for (q = p; q != NULL; q = q->n)
			if (match(q->w, q->m, s->w))
				return TRUE;
	return FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
testq %rdi, %rdi
je 0x5fe5
movq %rdi, %r14
testq %rbx, %rbx
je 0x5fd3
movq %rbx, %r15
movq (%r15), %rdi
movq 0x8(%r15), %rsi
movq (%r14), %rdx
callq 0x9cc8
testl %eax, %eax
jne 0x5fde
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x5fb7
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x5faf
jmp 0x6030
movl $0x1, %ebp
jmp 0x6032
movl $0x1, %ebp
testq %rbx, %rbx
je 0x6032
leaq 0x9066(%rip), %r14      # 0xf05c
movq (%rbx), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x3190
movq %rax, %r15
movq %r12, %rdi
callq 0x30f0
cmpq %rax, %r15
jne 0x6027
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x6027
callq 0x30f0
cmpq %r15, %rax
je 0x6032
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0x5ff6
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq