LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/rakitzis[P]rc/wait.c
// Function: waitfor
extern void waitfor(char **av) {
	int alive, count, i, stat;
	pid_t pid;
	for (i = 0; av[i] != NULL; i++)
		if ((pid = a2u(av[i])) < 0) {
			fprint(2, RC "`%s' is a bad number\n", av[i]);
			set(FALSE);
			return;
		} else if (markwaiting(pid, i == 0) == 0) {
			fprint(2, RC "`%s' is not a child\n", av[i]);
			set(FALSE);
			return;
		}
	alive = count = i;
	if (count >= MAX_PIPELINE) {
		fprint(2, RC "too many arguments to wait\n");
		set(FALSE);
		return;
	}
	setpipestatuslength(count);
	while (alive > 0) {
		pid = dowait(&stat, FALSE);
		if (pid > 0) {
			alive--;
			for (i = 0; av[i] != NULL; i++)
				if (a2u(av[i]) == pid) {
					setpipestatus(count - i - 1, pid, stat);
					break;
				}
		} else if (errno == EINTR) {
			set(FALSE);
			return;
		}
		sigchk();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x12ca5
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0xa, %esi
callq 0x11cf0
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
jge 0x12c4f
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movl $0x2, %edi
leaq 0x2645(%rip), %rsi      # 0x15281
movb $0x0, %al
callq 0xf3a0
xorl %edi, %edi
callq 0x107a0
jmp 0x12d7a
movl -0x1c(%rbp), %edi
cmpl $0x0, -0x14(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x12930
cmpl $0x0, %eax
jne 0x12c93
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movl $0x2, %edi
leaq 0x7c19(%rip), %rsi      # 0x1a899
movb $0x0, %al
callq 0xf3a0
xorl %edi, %edi
callq 0x107a0
jmp 0x12d7a
jmp 0x12c95
jmp 0x12c97
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x12bf3
movl -0x14(%rbp), %eax
movl %eax, -0x10(%rbp)
movl %eax, -0xc(%rbp)
cmpl $0x200, -0x10(%rbp)     # imm = 0x200
jl 0x12cd6
movl $0x2, %edi
leaq 0x7bef(%rip), %rsi      # 0x1a8b2
movb $0x0, %al
callq 0xf3a0
xorl %edi, %edi
callq 0x107a0
jmp 0x12d7a
movl -0x10(%rbp), %edi
callq 0x109b0
cmpl $0x0, -0xc(%rbp)
jle 0x12d7a
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x129b0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jle 0x12d5b
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x12d59
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0xa, %esi
callq 0x11cf0
cmpl -0x1c(%rbp), %eax
jne 0x12d4c
movl -0x10(%rbp), %edi
subl -0x14(%rbp), %edi
subl $0x1, %edi
movl -0x1c(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x109d0
jmp 0x12d59
jmp 0x12d4e
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x12d0c
jmp 0x12d70
callq 0x3040
cmpl $0x4, (%rax)
jne 0x12d6e
xorl %edi, %edi
callq 0x107a0
jmp 0x12d7a
jmp 0x12d70
callq 0x104a0
jmp 0x12cde
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/rakitzis[P]rc/walk.c
// Function: loop_body
static void loop_body(Node* nd)
{
	Node *volatile n = nd;
	Jbwrap cont_jb;
	Edata  cont_data;
	Estack cont_stack;

	if (sigsetjmp(cont_jb.j, 1) == 0) {
		cont_data.jb = &cont_jb;
		except(eContinue, cont_data, &cont_stack);
		walk(n, TRUE);
		unexcept(eContinue);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq -0xd8(%rbp), %rdi
movl $0x1, %esi
callq 0x3360
cmpl $0x0, %eax
jne 0x1393b
leaq -0xd8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rsi
movl $0x7, %edi
leaq -0xf8(%rbp), %rdx
callq 0x4da0
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x12d80
movl $0x7, %edi
callq 0x4e20
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rakitzis[P]rc/walk.c
// Function: dofork
static bool dofork(bool parent) {
	int pid, sp;
	struct termios t;

	if (interactive)
		tcgetattr(0, &t);
	if (!parent || (pid = rc_fork()) == 0)
		return TRUE;
	redirq = NULL; /* clear out the pre-redirection queue in the parent */
	rc_wait4(pid, &sp, TRUE);
	if (interactive && WIFSIGNALED(sp))
		tcsetattr(0, TCSANOW, &t);
	setstatus(-1, sp);
	sigchk();
	return FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x8(%rbp)
leaq 0xc302(%rip), %rax      # 0x1fc64
cmpl $0x0, (%rax)
je 0x13972
xorl %edi, %edi
leaq -0x4c(%rbp), %rsi
callq 0x32b0
cmpl $0x0, -0x8(%rbp)
je 0x13985
callq 0x127b0
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
jne 0x1398e
movl $0x1, -0x4(%rbp)
jmp 0x139f2
leaq 0xc1c3(%rip), %rax      # 0x1fb58
movq $0x0, (%rax)
movl -0xc(%rbp), %edi
leaq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x128c0
leaq 0xc2b0(%rip), %rax      # 0x1fc64
cmpl $0x0, (%rax)
je 0x139d9
movl -0x10(%rbp), %eax
andl $0x7f, %eax
addl $0x1, %eax
movsbl %al, %eax
sarl %eax
cmpl $0x0, %eax
jle 0x139d9
xorl %esi, %esi
leaq -0x4c(%rbp), %rdx
movl %esi, %edi
callq 0x32e0
movl -0x10(%rbp), %esi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x107d0
callq 0x104a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rakitzis[P]rc/walk.c
// Function: haspreredir
static bool haspreredir(Node *n) {
	while (n != NULL && n->type == nPre) {
		if (n->u[0].p->type == nDup || n->u[0].p->type == nRedir)
			return TRUE;
		n = n->u[1].p;
	}
	return FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x11(%rbp)
je 0x13cc1
movq -0x10(%rbp), %rax
cmpl $0x13, (%rax)
sete %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x13cca
jmp 0x13cfb
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0xc, (%rax)
je 0x13ce4
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x14, (%rax)
jne 0x13ced
movl $0x1, -0x4(%rbp)
jmp 0x13d02
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x13ca8
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rakitzis[P]rc/which.c
// Function: rc_access
bool rc_access(char *path, bool verbose, struct stat *stp) {
	int mask;
	if (stat(path, stp) != 0) {
		if (verbose) /* verbose flag only set for absolute pathname */
			uerror(path);
		return FALSE;
	}
	if (uid == 0)
		mask = X_ALL;
	else if (uid == stp->st_uid)
		mask = X_USR;
	else if (gid == stp->st_gid || ingidset(stp->st_gid))
		mask = X_GRP;
	else
		mask = X_OTH;
	if (((stp->st_mode & S_IFMT) == S_IFREG) && (stp->st_mode & mask))
		return TRUE;
	errno = EACCES;
	if (verbose)
		uerror(path);
	return FALSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3200
cmpl $0x0, %eax
je 0x13dd0
cmpl $0x0, -0x14(%rbp)
je 0x13dc4
movq -0x10(%rbp), %rdi
callq 0x11c10
movl $0x0, -0x4(%rbp)
jmp 0x13e7a
cmpl $0x0, 0xd299(%rip)      # 0x21070
jne 0x13de2
movl $0x49, -0x24(%rbp)
jmp 0x13e2e
movl 0xd288(%rip), %eax      # 0x21070
movq -0x20(%rbp), %rcx
cmpl 0x1c(%rcx), %eax
jne 0x13dfa
movl $0x40, -0x24(%rbp)
jmp 0x13e2c
movl 0xd274(%rip), %eax      # 0x21074
movq -0x20(%rbp), %rcx
cmpl 0x20(%rcx), %eax
je 0x13e1a
movq -0x20(%rbp), %rax
movl 0x20(%rax), %edi
callq 0x13e90
cmpl $0x0, %eax
je 0x13e23
movl $0x8, -0x24(%rbp)
jmp 0x13e2a
movl $0x1, -0x24(%rbp)
jmp 0x13e2c
jmp 0x13e2e
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x13e59
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
andl -0x24(%rbp), %eax
cmpl $0x0, %eax
je 0x13e59
movl $0x1, -0x4(%rbp)
jmp 0x13e7a
callq 0x3040
movl $0xd, (%rax)
cmpl $0x0, -0x14(%rbp)
je 0x13e73
movq -0x10(%rbp), %rdi
callq 0x11c10
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/rakitzis[P]rc/which.c
// Function: ingidset
static int ingidset(gid_t g) {
	int i;
	for (i = 0; i < ngroups; ++i)
		if (g == gidset[i])
			return 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0xd1e5(%rip), %eax      # 0x2108c
jge 0x13ed2
movl -0x8(%rbp), %eax
movq 0xd1dd(%rip), %rcx      # 0x21090
movslq -0xc(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jne 0x13ec5
movl $0x1, -0x4(%rbp)
jmp 0x13ed9
jmp 0x13ec7
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x13e9e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/chbarts[P]aa-tree/nuniq.c
// Function: comparator
static int comparator(void *left, void *right)
{
    char *cl, *cr;
    int r;

    cl = (char *) left;
    cr = (char *) right;

    r = strcmp(cl, cr);

    if (r > 0) {
        r = 1;
    } else if (r < 0) {
        r = -1;
    }

    return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x10b0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0x278f
movl $0x1, -0x24(%rbp)
jmp 0x279e
cmpl $0x0, -0x24(%rbp)
jge 0x279c
movl $0xffffffff, -0x24(%rbp) # imm = 0xFFFFFFFF
jmp 0x279e
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chbarts[P]aa-tree/nuniq.c
// Function: dofile
static void dofile(char *fname, FILE * fin, aa * tree)
{
    char *ln;

    while (fggets(&ln, fin) == 0) {
        switch (aa_add(tree, (void *) ln, duplicate)) {
        case 0:                /* No error */
            break;
        case 2:                /* Memory error */
            free(ln);
            error(tree);
            break;
        default:               /* Can't happen */
            fprintf(stderr, "Can't happen\n");
            free(ln);
            cleanup(tree);
            exit(EXIT_FAILURE);
            break;
        }

        if (1 == print) {
            puts(ln);
        } else {
            print = 1;
        }
    }

    if (ferror(fin) != 0)
        handle_ferr(fname, "nuniq");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x1250
cmpl $0x0, %eax
jne 0x2874
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq 0x1d7(%rip), %rdx       # 0x29c0
callq 0x1490
movl %eax, %ecx
movl %ecx, -0x24(%rbp)
testl %eax, %eax
je 0x2803
jmp 0x27f9
movl -0x24(%rbp), %eax
subl $0x2, %eax
je 0x2805
jmp 0x2819
jmp 0x284d
movq -0x20(%rbp), %rdi
callq 0x1030
movq -0x18(%rbp), %rdi
callq 0x2a20
jmp 0x284d
movq 0x27d8(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x8bb(%rip), %rsi       # 0x30e5
movb $0x0, %al
callq 0x10c0
movq -0x20(%rbp), %rdi
callq 0x1030
movq -0x18(%rbp), %rdi
callq 0x28a0
movl $0x1, %edi
callq 0x1130
movl $0x1, %eax
cmpl 0x2860(%rip), %eax      # 0x50b8
jne 0x2865
movq -0x20(%rbp), %rdi
callq 0x1040
jmp 0x286f
movl $0x1, 0x2849(%rip)      # 0x50b8
jmp 0x27c4
movq -0x10(%rbp), %rdi
callq 0x1050
cmpl $0x0, %eax
je 0x2892
movq -0x8(%rbp), %rdi
leaq 0x852(%rip), %rsi       # 0x30df
callq 0x13d0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chbarts[P]aa-tree/nuniq.c
// Function: usage
static void usage(char *pname)
{
    printf("Usage: %s [OPTION] [FILE...]\n", pname);
    puts("Print uniqified version of file(s) to standard output without sorting them.");
    puts("Only prints lines unique to all of the files, if multiple are specified, and doesn't separate by file");
    puts("With no files specified, uniqify standard input.");
    puts("");
    puts("  -h, --help        Print this help");
    puts("  -v, --version     Print version information");
    puts("  -d, --duplicates  Print duplicate lines to stderr (cannot print first duplicated line)");
    puts("");
    puts("Report bugs to <chbarts@gmail.com>.");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x81e(%rip), %rdi       # 0x3105
movb $0x0, %al
callq 0x1080
leaq 0x82e(%rip), %rdi       # 0x3123
callq 0x1040
leaq 0x86e(%rip), %rdi       # 0x316f
callq 0x1040
leaq 0x8c8(%rip), %rdi       # 0x31d5
callq 0x1040
leaq 0x774(%rip), %rdi       # 0x308d
callq 0x1040
leaq 0x8e1(%rip), %rdi       # 0x3206
callq 0x1040
leaq 0x8f9(%rip), %rdi       # 0x322a
callq 0x1040
leaq 0x91b(%rip), %rdi       # 0x3258
callq 0x1040
leaq 0x744(%rip), %rdi       # 0x308d
callq 0x1040
leaq 0x95c(%rip), %rdi       # 0x32b1
callq 0x1040
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/chbarts[P]aa-tree/nuniq.c
// Function: version
static void version(void)
{
    puts("nuniq version 0.1.0");
    puts("Copyright 2016 Chris Barts.");
    puts("nuniq comes with NO WARRANTY to the extent permitted by law.");
    puts("You may redistribute this software under the terms");
    puts("of the GNU General Public License.");
    puts("For more information, see the file named COPYING");
    puts("in this program's distribution file.");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x96a(%rip), %rdi       # 0x32d5
callq 0x1040
leaq 0x972(%rip), %rdi       # 0x32e9
callq 0x1040
leaq 0x982(%rip), %rdi       # 0x3305
callq 0x1040
leaq 0x9b3(%rip), %rdi       # 0x3342
callq 0x1040
leaq 0x9da(%rip), %rdi       # 0x3375
callq 0x1040
leaq 0x9f1(%rip), %rdi       # 0x3398
callq 0x1040
leaq 0xa16(%rip), %rdi       # 0x33c9
callq 0x1040
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/chbarts[P]aa-tree/nuniq.c
// Function: duplicate
static int duplicate(void *orig, void *new)
{
    char *ln = (char *) new;

    if (1 == d) {
       fprintf(stderr, "%s\n", ln);
    }

    free(ln);
    print = 0;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x1, %eax
cmpl 0x26dd(%rip), %eax      # 0x50c0
jne 0x2a01
movq 0x260c(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x6f9(%rip), %rsi       # 0x30f3
movb $0x0, %al
callq 0x10c0
movq -0x18(%rbp), %rdi
callq 0x1030
movl $0x0, 0x26a4(%rip)      # 0x50b8
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-cmd.c
// Function: our_msgfn
static void our_msgfn(deark *c, unsigned int flags, const char *s1)
{
	struct cmdctx *cc;
	const char *s;

	cc = de_get_userdata(c);

	if(!cc->have_initialized_output_stream) {
		initialize_output_stream(cc);
	}

	if(cc->to_ascii) {
		// Note - It doesn't seem quite right to have this functionality be separate
		// from the library's *to_printable* functions, but they don't quite have
		// the same purposes, and it would be tricky to combine them.
		// This is really just a quick and dirty way to deal with systems that don't
		// support Unicode, or don't support the Unicode characters we use.

		// TODO: It's inconsistent that the de_utf8_to_ascii() and de_utf8_to_oem()
		// code paths have a size limit, while the de_utf8_to_utf16_to_FILE() and
		// fputs() paths do not.
		de_utf8_to_ascii(s1, cc->msgbuf, sizeof(cc->msgbuf), 0);
		s = cc->msgbuf;
	}
#ifdef DE_WINDOWS
	else if(cc->to_oem) {
		de_utf8_to_oem(c, s1, cc->msgbuf, sizeof(cc->msgbuf));
		s = cc->msgbuf;
	}
#endif
	else {
		s = s1;
	}

	emit_sz(cc, s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x18ebc0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x19603
movq -0x20(%rbp), %rdi
callq 0x1a400
movq -0x20(%rbp), %rax
cmpl $0x0, 0x74(%rax)
je 0x19638
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x8c, %rsi
movl $0x3e8, %edx            # imm = 0x3E8
xorl %ecx, %ecx
callq 0x160f00
movq -0x20(%rbp), %rax
addq $0x8c, %rax
movq %rax, -0x28(%rbp)
jmp 0x19640
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1a4e0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-cmd.c
// Function: our_specialmsgfn
static void our_specialmsgfn(deark *c, unsigned int flags, unsigned int code,
	u32 param1)
{
	struct cmdctx *cc;

	cc = de_get_userdata(c);
	if(cc->color_method==CM_NOCOLOR) return;

	if(!cc->have_initialized_output_stream) {
		initialize_output_stream(cc);
	}

#ifdef DE_WINDOWS
	if(cc->color_method==CM_WINCONSOLE) {
		if(code==DE_MSGCODE_HL) {
			de_winconsole_highlight(cc->plctx, 1);
		}
		else if(code==DE_MSGCODE_UNHL) {
			de_winconsole_highlight(cc->plctx, 0);
		}
		else if(code==DE_MSGCODE_RGBSAMPLE) {
			// There's no way to get 24-bit color using Windows console
			// commands. Have to use ANSI24 instead.
			;
		}
		return;
	}
#endif

	// TODO: Maybe move the DE_COLOR_* macros to deark.h.
#define X_DE_COLOR_R(x)  (unsigned int)(((x)>>16)&0xff)
#define X_DE_COLOR_G(x)  (unsigned int)(((x)>>8)&0xff)
#define X_DE_COLOR_B(x)  (unsigned int)((x)&0xff)
	if(code==DE_MSGCODE_HL) {
		emit_sz(cc, "\x1b[7m");
	}
	else if(code==DE_MSGCODE_UNHL) {
		emit_sz(cc, "\x1b[27m");
	}
	else if(code==DE_MSGCODE_RGBSAMPLE && cc->color_method==CM_ANSI24) {
		char buf[64];

		de_snprintf(buf, sizeof(buf), "\x1b[48;2;%u;%u;%um  \x1b[0m",
			X_DE_COLOR_R(param1), X_DE_COLOR_G(param1), X_DE_COLOR_B(param1));
		emit_sz(cc, buf);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
callq 0x18ebc0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x88(%rax)
jne 0x19694
jmp 0x19741
movq -0x20(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x196a7
movq -0x20(%rbp), %rdi
callq 0x1a400
cmpl $0x1000, -0x10(%rbp)    # imm = 0x1000
jne 0x196c2
movq -0x20(%rbp), %rdi
leaq 0x182a6e(%rip), %rsi    # 0x19c129
callq 0x1a4e0
jmp 0x19741
cmpl $0x1100, -0x10(%rbp)    # imm = 0x1100
jne 0x196dd
movq -0x20(%rbp), %rdi
leaq 0x182a58(%rip), %rsi    # 0x19c12e
callq 0x1a4e0
jmp 0x1973f
cmpl $0x2000, -0x10(%rbp)    # imm = 0x2000
jne 0x1973d
movq -0x20(%rbp), %rax
cmpl $0x3, 0x88(%rax)
jne 0x1973d
leaq -0x60(%rbp), %rdi
movl -0x14(%rbp), %ecx
shrl $0x10, %ecx
andl $0xff, %ecx
movl -0x14(%rbp), %r8d
shrl $0x8, %r8d
andl $0xff, %r8d
movl -0x14(%rbp), %r9d
andl $0xff, %r9d
movl $0x40, %esi
leaq 0x182a0b(%rip), %rdx    # 0x19c134
movb $0x0, %al
callq 0x15a980
movq -0x20(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x1a4e0
jmp 0x1973f
jmp 0x19741
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-cmd.c
// Function: print_version
static void print_version(deark *c, int verbose)
{
	char vbuf[80];

	de_printf(c, DE_MSGTYPE_MESSAGE, "Deark version: %s\n",
		de_get_version_string(vbuf, sizeof(vbuf)));
	if(!verbose) return;
	de_printf(c, DE_MSGTYPE_MESSAGE, "platform API: %s\n",
#ifdef DE_WINDOWS
		"Windows"
#else
		"Unix-like"
#endif
		);
	de_printf(c, DE_MSGTYPE_MESSAGE, "platform bits: %u\n",
		(unsigned int)(8*sizeof(void*)));
#ifdef _DEBUG
	de_printf(c, DE_MSGTYPE_MESSAGE, "build type: debug\n");
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
movl $0x50, %esi
callq 0x15a910
movq -0x68(%rbp), %rdi
movq %rax, %rcx
xorl %esi, %esi
leaq 0x182402(%rip), %rdx    # 0x19c767
movb $0x0, %al
callq 0x15afe0
cmpl $0x0, -0xc(%rbp)
jne 0x1a374
jmp 0x1a3a8
movq -0x8(%rbp), %rdi
xorl %esi, %esi
leaq 0x1823f9(%rip), %rdx    # 0x19c77a
leaq 0x182404(%rip), %rcx    # 0x19c78c
movb $0x0, %al
callq 0x15afe0
movq -0x8(%rbp), %rdi
xorl %esi, %esi
leaq 0x1823fa(%rip), %rdx    # 0x19c796
movl $0x40, %ecx
movb $0x0, %al
callq 0x15afe0
addq $0x70, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-cmd.c
// Function: opt_string_to_opt_struct
static const struct opt_struct *opt_string_to_opt_struct(const char *s)
{
	int k;

	for(k=0; option_array[k].id!=DE_OPT_NULL; k++) {
		if(!strcmp(s, option_array[k].string)) {
			return &option_array[k];
		}
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x1f8582(%rip), %rax    # 0x212ae0
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
je 0x1a5b3
movq -0x10(%rbp), %rdi
movslq -0x14(%rbp), %rcx
leaq 0x1f8566(%rip), %rax    # 0x212ae0
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x191a0
cmpl $0x0, %eax
jne 0x1a5a6
movslq -0x14(%rbp), %rcx
leaq 0x1f8547(%rip), %rax    # 0x212ae0
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x1a5bb
jmp 0x1a5a8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1a553
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-cmd.c
// Function: colormode_opt
static void colormode_opt(struct cmdctx *cc, const char *modestr)
{
	if(!strcmp(modestr, "auto")) {
		cc->color_method_req = CM_AUTOCOLOR;
	}
	else if(!strcmp(modestr, "ansi")) {
		cc->color_method_req = CM_ANSI;
	}
	else if(!strcmp(modestr, "ansi24")) {
		cc->color_method_req = CM_ANSI24;
	}
	else if(!strcmp(modestr, "winconsole")) {
		cc->color_method_req = CM_WINCONSOLE;
	}
	else  if(!strcmp(modestr, "none")) {
		cc->color_method_req = CM_NOCOLOR;
	}
	else {
		de_printf(cc->c, DE_MSGTYPE_MESSAGE, "Invalid colormode: %s\n", modestr);
		cc->error_flag = 1;
		return;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x181f58(%rip), %rsi    # 0x19c573
callq 0x191a0
cmpl $0x0, %eax
jne 0x1a638
movq -0x8(%rbp), %rax
movl $0x1, 0x84(%rax)
jmp 0x1a6ff
movq -0x10(%rbp), %rdi
leaq 0x1820b3(%rip), %rsi    # 0x19c6f6
callq 0x191a0
cmpl $0x0, %eax
jne 0x1a660
movq -0x8(%rbp), %rax
movl $0x2, 0x84(%rax)
jmp 0x1a6fd
movq -0x10(%rbp), %rdi
leaq 0x182090(%rip), %rsi    # 0x19c6fb
callq 0x191a0
cmpl $0x0, %eax
jne 0x1a685
movq -0x8(%rbp), %rax
movl $0x3, 0x84(%rax)
jmp 0x1a6fb
movq -0x10(%rbp), %rdi
leaq 0x182072(%rip), %rsi    # 0x19c702
callq 0x191a0
cmpl $0x0, %eax
jne 0x1a6aa
movq -0x8(%rbp), %rax
movl $0x4, 0x84(%rax)
jmp 0x1a6f9
movq -0x10(%rbp), %rdi
leaq 0x182058(%rip), %rsi    # 0x19c70d
callq 0x191a0
cmpl $0x0, %eax
jne 0x1a6cf
movq -0x8(%rbp), %rax
movl $0x0, 0x84(%rax)
jmp 0x1a6f7
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rcx
xorl %esi, %esi
leaq 0x18202f(%rip), %rdx    # 0x19c712
movb $0x0, %al
callq 0x15afe0
movq -0x8(%rbp), %rax
movl $0x1, 0x18(%rax)
jmp 0x1a6ff
jmp 0x1a6f9
jmp 0x1a6fb
jmp 0x1a6fd
jmp 0x1a6ff
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-cmd.c
// Function: set_encoding_option
static void set_encoding_option(deark *c, struct cmdctx *cc, const char *s)
{
	if(!strcmp(s, "ascii")) {
		cc->to_ascii = 1;
	}
	else if(!strcmp(s, "oem")) {
		cc->to_oem = 1;
	}
	else if(!strcmp(s, "utf8") || !strcmp(s, "unicode")) {
		cc->to_ascii = 0;
		cc->to_oem = 0;
	}
	else {
		de_puts(c, DE_MSGTYPE_MESSAGE, "Error: Unknown encoding\n");
		cc->error_flag = 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x181ffa(%rip), %rsi    # 0x19c729
callq 0x191a0
cmpl $0x0, %eax
jne 0x1a749
movq -0x10(%rbp), %rax
movl $0x1, 0x74(%rax)
jmp 0x1a7ce
movq -0x18(%rbp), %rdi
leaq 0x181fdb(%rip), %rsi    # 0x19c72f
callq 0x191a0
cmpl $0x0, %eax
jne 0x1a76b
movq -0x10(%rbp), %rax
movl $0x1, 0x78(%rax)
jmp 0x1a7cc
movq -0x18(%rbp), %rdi
leaq 0x181fbd(%rip), %rsi    # 0x19c733
callq 0x191a0
cmpl $0x0, %eax
je 0x1a795
movq -0x18(%rbp), %rdi
leaq 0x1b529b(%rip), %rsi    # 0x1cfa26
callq 0x191a0
cmpl $0x0, %eax
jne 0x1a7ad
movq -0x10(%rbp), %rax
movl $0x0, 0x74(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x78(%rax)
jmp 0x1a7ca
movq -0x8(%rbp), %rdi
xorl %esi, %esi
leaq 0x181f7e(%rip), %rdx    # 0x19c738
callq 0x15ac20
movq -0x10(%rbp), %rax
movl $0x1, 0x18(%rax)
jmp 0x1a7cc
jmp 0x1a7ce
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-cmd.c
// Function: set_ext_option
static void set_ext_option(deark *c, struct cmdctx *cc, const char *optionstring)
{
	char *tmp;
	char *eqpos;

	tmp = de_strdup(c, optionstring);
	if(!tmp) return;

	eqpos = strchr(tmp, '=');
	if(eqpos) {
		*eqpos = '\0';
		de_set_ext_option(c, tmp, eqpos+1);
	}
	else {
		// No "=" symbol
		de_set_ext_option(c, tmp, "");
	}
	de_free(c, tmp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15c630
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1a80e
jmp 0x1a866
movq -0x20(%rbp), %rdi
movl $0x3d, %esi
callq 0x19100
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1a845
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
addq $0x1, %rdx
callq 0x18f6e0
jmp 0x1a859
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq 0x1b637c(%rip), %rdx    # 0x1d0bd0
callq 0x18f6e0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-cmd.c
// Function: handle_an_input_filename
static void handle_an_input_filename(struct cmdctx *cc, char *fn)
{
	if(!cc->input_filename) {
		cc->input_filename = fn;
		de_set_input_filename(cc->c, cc->input_filename, 0);
		return;
	}

	if(cc->mp_mode) {
		de_set_input_filename(cc->c, fn, 0x1);
		return;
	}

	cc->error_flag = 1;
	cc->show_usage_message = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x1a8af
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
xorl %edx, %edx
callq 0x18f260
jmp 0x1a8e9
movq -0x8(%rbp), %rax
cmpb $0x0, 0x80(%rax)
je 0x1a8d3
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x18f260
jmp 0x1a8e9
movq -0x8(%rbp), %rax
movl $0x1, 0x18(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x1c(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-cmd.c
// Function: set_output_basename
static void set_output_basename(struct cmdctx *cc)
{
	const char *outputbasefn = cc->base_output_filename; // default, could be NULL
	const char *outdirname;
	unsigned int flags = 0;

	if(cc->option_k_level && cc->input_filename) {
		if(cc->option_k_level==1) {
			// Use base input filename in output filenames.
			outputbasefn = cc->input_filename;
			flags |= 0x1;
		}
		else if(cc->option_k_level==2) {
			// Use full input filename path, but not as an actual path.
			outputbasefn = cc->input_filename;
			flags |= 0x2;
		}
		else if(cc->option_k_level==3) {
			// Use full input filename path, as-is.
			outputbasefn = cc->input_filename;
		}
	}

	if(cc->to_zip || cc->to_tar) {
		// In this case, -od refers to the archive filename, not to the base
		// filename that we're dealing with here.
		outdirname = NULL;
	}
	else if(cc->to_stdout) {
		// -od is incompatible with -tostdout
		outdirname = NULL;
	}
	else {
		outdirname = cc->output_dirname;
	}

	de_set_output_filename_pattern(cc->c, outdirname, outputbasefn, flags);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x58(%rax)
je 0x1a982
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1a982
movq -0x8(%rbp), %rax
cmpl $0x1, 0x58(%rax)
jne 0x1a945
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movl -0x1c(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1a980
movq -0x8(%rbp), %rax
cmpl $0x2, 0x58(%rax)
jne 0x1a966
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movl -0x1c(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1a97e
movq -0x8(%rbp), %rax
cmpl $0x3, 0x58(%rax)
jne 0x1a97c
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x1a97e
jmp 0x1a980
jmp 0x1a982
movq -0x8(%rbp), %rax
cmpl $0x0, 0x68(%rax)
jne 0x1a996
movq -0x8(%rbp), %rax
cmpl $0x0, 0x6c(%rax)
je 0x1a9a0
movq $0x0, -0x18(%rbp)
jmp 0x1a9c2
movq -0x8(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0x1a9b4
movq $0x0, -0x18(%rbp)
jmp 0x1a9c0
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x1a9c2
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x18ec40
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-cmd.c
// Function: set_output_archive_name
static void set_output_archive_name(struct cmdctx *cc)
{
	const char *arcfn = cc->archive_filename; // default, could be NULL
	unsigned int flags = 0;

	if(!cc->to_zip && !cc->to_tar) return;
	if(cc->to_stdout) return;

	if(cc->option_ka_level && cc->input_filename)
	{
		if(cc->option_ka_level==1) {
			// Use base input filename in output filenames.
			arcfn = cc->input_filename;
			flags |= 0x21;
		}
		else if(cc->option_ka_level==2) {
			// Use full input filename path, but not as an actual path.
			arcfn = cc->input_filename;
			flags |= 0x22;
		}
		else if(cc->option_ka_level==3) {
			// Use full input filename path, as-is.
			arcfn = cc->input_filename;
			flags |= 0x20;
		}
	}

	if(!arcfn) {
		arcfn = "output";
		flags |= 0x20;
	}

	de_set_output_archive_filename(cc->c, cc->output_dirname, arcfn, flags);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x68(%rax)
jne 0x1aa18
movq -0x8(%rbp), %rax
cmpl $0x0, 0x6c(%rax)
jne 0x1aa18
jmp 0x1aad9
movq -0x8(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0x1aa27
jmp 0x1aad9
movq -0x8(%rbp), %rax
cmpl $0x0, 0x5c(%rax)
je 0x1aaa3
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1aaa3
movq -0x8(%rbp), %rax
cmpl $0x1, 0x5c(%rax)
jne 0x1aa5d
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
orl $0x21, %eax
movl %eax, -0x14(%rbp)
jmp 0x1aaa1
movq -0x8(%rbp), %rax
cmpl $0x2, 0x5c(%rax)
jne 0x1aa7e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
orl $0x22, %eax
movl %eax, -0x14(%rbp)
jmp 0x1aa9f
movq -0x8(%rbp), %rax
cmpl $0x3, 0x5c(%rax)
jne 0x1aa9d
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
orl $0x20, %eax
movl %eax, -0x14(%rbp)
jmp 0x1aa9f
jmp 0x1aaa1
jmp 0x1aaa3
cmpq $0x0, -0x10(%rbp)
jne 0x1aabe
leaq 0x1bcb11(%rip), %rax    # 0x1d75c2
movq %rax, -0x10(%rbp)
movl -0x14(%rbp), %eax
orl $0x20, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
callq 0x18ef70
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-cmd.c
// Function: handle_special_1st_filename
static void handle_special_1st_filename(struct cmdctx *cc)
{
	if(!cc->output_special_1st_filename) return;
	de_set_output_special_1st_filename(cc->c,
		((cc->to_zip || cc->to_tar || cc->to_stdout) ? NULL : cc->output_dirname),
		cc->output_special_1st_filename);
	if(!cc->set_MAXFILES) {
		de_set_max_output_files(cc->c, 1);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x1aaf9
jmp 0x1ab66
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x68(%rax)
jne 0x1ab22
movq -0x8(%rbp), %rax
cmpl $0x0, 0x6c(%rax)
jne 0x1ab22
movq -0x8(%rbp), %rax
cmpl $0x0, 0x64(%rax)
je 0x1ab2a
xorl %eax, %eax
movq %rax, -0x18(%rbp)
jmp 0x1ab36
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdx
callq 0x18eed0
movq -0x8(%rbp), %rax
cmpb $0x0, 0x60(%rax)
jne 0x1ab66
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl $0x1, %esi
callq 0x18f530
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-modules.c
// Function: de_register_modules_internal
static void de_register_modules_internal(deark *c)
{
	static const de_module_getinfo_fn infofunc_list[] = {
#define DE_MODULE(x)      x,
#define DE_MODULE_LAST(x) x
#include "deark-modules.h"
#undef DE_MODULE
#undef DE_MODULE_LAST
	};
	size_t num_modules;
	size_t i;

	if(c->module_info) return; // Already done.

	num_modules = DE_ARRAYCOUNT(infofunc_list);

	c->module_info = de_mallocarray(c, num_modules, sizeof(struct deark_module_info));

	for(i=0; i<num_modules; i++) {
		register_a_module(c, infofunc_list[i]);
	}

	disable_modules_as_requested(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1b0(%rax)
je 0x1abbc
jmp 0x1ac25
movq $0x178, -0x10(%rbp)     # imm = 0x178
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x48, %edx
callq 0x15c450
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x1b0(%rax)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x1ac1c
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rcx
leaq 0x1f834b(%rip), %rax    # 0x212f50
movq (%rax,%rcx,8), %rsi
callq 0x1ac30
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x1abec
movq -0x8(%rbp), %rdi
callq 0x1ac80
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/src/deark-modules.c
// Function: module_list_string_to_set
static void module_list_string_to_set(deark *c, const char *s, u8 *mod_set)
{
	char tmpname[80];
	const char *ptr1, *ptr2;

	if(!s) return;

	ptr1 = s;
	while(1) {
		int idx;

		tmpname[0] = '\0';
		ptr2 = de_strchr(ptr1, ',');
		if(ptr2) {
			size_t len;
			len = (size_t)(ptr2-ptr1);
			if(len<sizeof(tmpname)) {
				de_memcpy(tmpname, ptr1, len);
				tmpname[len] = '\0';
			}
			ptr1 = ptr2 + 1;
		}
		else {
			de_strlcpy(tmpname, ptr1, sizeof(tmpname));
		}

		idx = de_get_module_idx_by_id(c, tmpname);
		if(idx>=0) {
			mod_set[idx] = 1;
		}

		if(!ptr2) break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1af53
jmp 0x1b00d
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movb $0x0, -0x70(%rbp)
movq -0x78(%rbp), %rdi
movl $0x2c, %esi
callq 0x15abe0
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
je 0x1afc2
movq -0x80(%rbp), %rax
movq -0x78(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x90(%rbp)
cmpq $0x50, -0x90(%rbp)
jae 0x1afb4
leaq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq -0x90(%rbp), %rdx
callq 0x191e0
movq -0x90(%rbp), %rax
movb $0x0, -0x70(%rbp,%rax)
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x1afd4
leaq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rsi
movl $0x50, %edx
callq 0x15aa30
movq -0x8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x15c680
movl %eax, -0x84(%rbp)
cmpl $0x0, -0x84(%rbp)
jl 0x1afff
movq -0x18(%rbp), %rax
movslq -0x84(%rbp), %rcx
movb $0x1, (%rax,%rcx)
cmpq $0x0, -0x80(%rbp)
jne 0x1b008
jmp 0x1b00d
jmp 0x1af5b
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/abk.c
// Function: de_module_abk
void de_module_abk(deark *c, struct deark_module_info *mi)
{
	mi->id = "abk";
	mi->desc = "AMOS resource (AmBk, sprite, icon, AmBs)";
	mi->run_fn = de_run_abk;
	mi->identify_fn = de_identify_abk;
	mi->help_fn = de_help_abk;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x182117(%rip), %rcx    # 0x19d17e
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x181cf4(%rip), %rcx    # 0x19cd69
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x2c(%rip), %rcx        # 0x1b0b0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1fd(%rip), %rcx       # 0x1b290
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rax
leaq 0x2ce(%rip), %rcx       # 0x1b370
movq %rcx, 0x28(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/abk.c
// Function: de_identify_abk
static int de_identify_abk(deark *c)
{
	int ext_bonus = 0;
	UI sig;

	if(de_input_file_has_ext(c, "abk")) ext_bonus=40;

	sig = (UI)de_getu32be(0);
	if(sig==CODE_AmBk)
		return 60+ext_bonus;
	if(sig==CODE_AmSp)
		return 60+ext_bonus;
	if(sig==CODE_AmIc)
		return 60+ext_bonus;
	if(sig==CODE_AmBs)
		return 60+ext_bonus;
	if(sig==AMOS_PIC_HDR_ID || is_scr_hdr_id(sig)) {
		if(is_amos_picture_file(c, sig)) {
			return 60+ext_bonus;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x181ed0(%rip), %rsi    # 0x19d17e
callq 0x15d180
cmpl $0x0, %eax
je 0x1b2bf
movl $0x28, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x165470
movl %eax, -0x18(%rbp)
cmpl $0x416d426b, -0x18(%rbp) # imm = 0x416D426B
jne 0x1b2e7
movl -0x14(%rbp), %eax
addl $0x3c, %eax
movl %eax, -0x4(%rbp)
jmp 0x1b35e
cmpl $0x416d5370, -0x18(%rbp) # imm = 0x416D5370
jne 0x1b2fb
movl -0x14(%rbp), %eax
addl $0x3c, %eax
movl %eax, -0x4(%rbp)
jmp 0x1b35e
cmpl $0x416d4963, -0x18(%rbp) # imm = 0x416D4963
jne 0x1b30f
movl -0x14(%rbp), %eax
addl $0x3c, %eax
movl %eax, -0x4(%rbp)
jmp 0x1b35e
cmpl $0x416d4273, -0x18(%rbp) # imm = 0x416D4273
jne 0x1b323
movl -0x14(%rbp), %eax
addl $0x3c, %eax
movl %eax, -0x4(%rbp)
jmp 0x1b35e
cmpl $0x6071963, -0x18(%rbp) # imm = 0x6071963
je 0x1b339
movl -0x18(%rbp), %edi
callq 0x1b640
cmpl $0x0, %eax
je 0x1b357
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x1d120
cmpl $0x0, %eax
je 0x1b355
movl -0x14(%rbp), %eax
addl $0x3c, %eax
movl %eax, -0x4(%rbp)
jmp 0x1b35e
jmp 0x1b357
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/abk.c
// Function: de_module_amos_source
void de_module_amos_source(deark *c, struct deark_module_info *mi)
{
	mi->id = "amos_source";
	mi->desc = "AMOS source code";
	mi->run_fn = de_run_amos_source;
	mi->identify_fn = de_identify_amos_source;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x1819db(%rip), %rcx    # 0x19cd92
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
leaq 0x1819d9(%rip), %rcx    # 0x19cd9e
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
leaq 0x1c(%rip), %rcx        # 0x1b3f0
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
leaq 0x1ad(%rip), %rcx       # 0x1b590
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/abk.c
// Function: de_run_amos_source
static void de_run_amos_source(deark *c, de_module_params *mparams)
{
	lctx *d = NULL;
	i64 basic_len;
	i64 pos;
	i64 nbanks;

	d = de_malloc(c, sizeof(lctx));

	pos = 16;
	basic_len = de_getu32be(pos);
	pos += 4;
	de_dbg(c, "BASIC code at %"I64_FMT", len=%"I64_FMT, pos, basic_len);
	pos += basic_len;
	if(pos >= c->infile->len) goto done;
	if(dbuf_memcmp(c->infile, pos, "AmBs", 4)) {
		de_err(c, "AmBs segment not found, expected at offset %"I64_FMT, pos);
		goto done;
	}

	de_dbg(c, "AmBs segment at %"I64_FMT, pos);
	nbanks = de_getu16be(pos+4);
	de_dbg_indent(c, 1);
	de_dbg(c, "number of banks: %d", (int)nbanks);
	if(nbanks>0 || c->extract_level>=2) {
		dbuf_create_file_from_slice(c->infile, pos, c->infile->len-pos, "AmBs.abk", NULL, 0);
	}
	else {
		de_dbg(c, "not extracting empty AmBs segment");
	}
	de_dbg_indent(c, -1);


done:
	de_free(c, d);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x8, %esi
callq 0x15b780
movq %rax, -0x18(%rbp)
movq $0x10, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x165470
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq 0x181dbc(%rip), %rsi    # 0x19d212
movb $0x0, %al
callq 0x15b0d0
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x1b480
jmp 0x1b578
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
leaq 0x181d9a(%rip), %rdx    # 0x19d22d
movl $0x4, %ecx
callq 0x166ab0
cmpl $0x0, %eax
je 0x1b4bd
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x181d81(%rip), %rsi    # 0x19d232
movb $0x0, %al
callq 0x15bfb0
jmp 0x1b578
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x181d95(%rip), %rsi    # 0x19d261
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
addq $0x4, %rsi
callq 0x1651d0
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movl %eax, %edx
leaq 0x181ca6(%rip), %rsi    # 0x19d1b1
movb $0x0, %al
callq 0x15b0d0
cmpq $0x0, -0x30(%rbp)
jg 0x1b526
movq -0x8(%rbp), %rax
cmpl $0x2, 0x90(%rax)
jl 0x1b558
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
subq -0x28(%rbp), %rdx
leaq 0x181d2c(%rip), %rcx    # 0x19d275
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x166be0
jmp 0x1b56a
movq -0x8(%rbp), %rdi
leaq 0x181d1b(%rip), %rsi    # 0x19d27e
movb $0x0, %al
callq 0x15b0d0
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x15b820
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/abk.c
// Function: de_identify_amos_source
static int de_identify_amos_source(deark *c)
{
	u8 b[10];
	int ext_bonus = 0;

	if(de_input_file_has_ext(c, "amos")) ext_bonus=20;

	de_read(b, 0, 10);
	if(!de_memcmp(b, "AMOS Basic", 10))
		return 80+ext_bonus;
	if(!de_memcmp(b, "AMOS Pro", 8))
		return 80+ext_bonus;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x181cf2(%rip), %rsi    # 0x19d2a0
callq 0x15d180
cmpl $0x0, %eax
je 0x1b5bf
movl $0x14, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x1a(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
movl $0xa, %ecx
callq 0x164d10
leaq -0x1a(%rbp), %rdi
leaq 0x181cc1(%rip), %rsi    # 0x19d2a5
movl $0xa, %edx
callq 0x19170
cmpl $0x0, %eax
jne 0x1b5fe
movl -0x20(%rbp), %eax
addl $0x50, %eax
movl %eax, -0x4(%rbp)
jmp 0x1b62f
leaq -0x1a(%rbp), %rax
movq (%rax), %rax
movabsq $0x6f725020534f4d41, %rcx # imm = 0x6F725020534F4D41
subq %rcx, %rax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1b628
movl -0x20(%rbp), %eax
addl $0x50, %eax
movl %eax, -0x4(%rbp)
jmp 0x1b62f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/abk.c
// Function: do_amos_picture_file
static void do_amos_picture_file(deark *c, lctx *d)
{
	struct amosbank *bk = NULL;

	bk = de_malloc(c, sizeof(struct amosbank));
	bk->f_offs = 0;
	bk->f = dbuf_open_input_subfile(c->infile, bk->f_offs, c->infile->len);
	// I don't think we need to set anything like bk->bank_len.
	do_picture_bank(c, d, bk, 0);
	destroy_amosbank(c, bk);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x4b8, %esi            # imm = 0x4B8
callq 0x15b780
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rax), %rdx
callq 0x1691b0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x1b9d0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1bb40
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/jsummers[P]deark/modules/abk.c
// Function: do_read_AmBs
static void do_read_AmBs(deark *c, lctx *d)
{
	i64 bytesused;
	i64 nbanks;
	i64 i;
	i64 pos;
	int ret;

	nbanks = de_getu16be(4);
	de_dbg(c, "number of banks: %d", (int)nbanks);

	pos = 6;
	for(i=0; i<nbanks; i++) {
		if(pos >= c->infile->len) break;
		de_dbg(c, "bank #%d at %"I64_FMT, (int)i, pos);
		bytesused = 0;
		de_dbg_indent(c, 1);
		ret = do_read_bank(c, d, pos, &bytesused);
		de_dbg_indent(c, -1);
		if(!ret || bytesused<1) break;
		pos += bytesused;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl $0x4, %esi
callq 0x1651d0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
leaq 0x1818aa(%rip), %rsi    # 0x19d1b1
movb $0x0, %al
callq 0x15b0d0
movq $0x6, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jge 0x1b9c7
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpq 0x18(%rcx), %rax
jl 0x1b943
jmp 0x1b9c7
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %edx
movq -0x30(%rbp), %rcx
leaq 0x18186d(%rip), %rsi    # 0x19d1c5
movb $0x0, %al
callq 0x15b0d0
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x15b560
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq -0x18(%rbp), %rcx
callq 0x1b710
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15b560
cmpl $0x0, -0x34(%rbp)
je 0x1b9a8
cmpq $0x1, -0x18(%rbp)
jge 0x1b9aa
jmp 0x1b9c7
movq -0x18(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x1b91e
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)