LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/ioerror[P]csidh-reference-implementation/csidh_util.c
// Function: save_file
void save_file(char *file, void *buf, size_t len) {
  FILE *fhandle;
  if (file != NULL) {
    fhandle = fopen(file, "w");
    if (fhandle == NULL) {
      fprintf(stderr, "Unable to open %s\n", file);
      exit(1);
    }
    for (size_t i = 0; i < len; ++i)
      fprintf(fhandle, "%02hhx", ((uint8_t *)buf)[i]);
    fprintf(fhandle, "\n");
    fclose(fhandle);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x1330
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
leaq 0x3d3d(%rip), %rsi      # 0x501e
callq 0x10d0
testq %rax, %rax
je 0x133a
movq %rax, %r15
leaq 0x3d1b(%rip), %r12      # 0x5010
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0x1314
movzbl (%r14,%r13), %edx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x10a0
incq %r13
jmp 0x12f8
pushq $0xa
popq %rdi
movq %r15, %rsi
callq 0x1080
movq %r15, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1050
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x6cb7(%rip), %rax      # 0x7ff8
movq (%rax), %rdi
leaq 0x3cd5(%rip), %rsi      # 0x5020
movq %r12, %rdx
xorl %eax, %eax
callq 0x10a0
pushq $0x1
popq %rdi
callq 0x1100
// File: /workspace/github_c_makefile_star2_O2/ioerror[P]csidh-reference-implementation/csidh_util.c
// Function: read_file
uint64_t read_file(const char *file, uint8_t *buf, size_t len) {
  size_t c = 0;
  FILE *fhandle;
  fhandle = fopen(file, "r");
  if (fhandle == NULL) {
    fprintf(stderr, "Unable to open %s\n", file);
    exit(3);
  }
  for (uint64_t i = 0; i < len; ++i) {
    c += fscanf(fhandle, "%02hhx", &buf[i]);
  }
  fclose(fhandle);
  return c;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
leaq 0x4036(%rip), %rsi      # 0x53d0
callq 0x10d0
testq %rax, %rax
je 0x13e6
movq %rax, %r15
leaq 0x3c62(%rip), %r13      # 0x5010
xorl %r12d, %r12d
subq $0x1, %rbx
jb 0x13d1
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1040
cltq
addq %rax, %r12
incq %r14
jmp 0x13b1
movq %r15, %rdi
callq 0x1050
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x6c0b(%rip), %rax      # 0x7ff8
movq (%rax), %rdi
leaq 0x3c29(%rip), %rsi      # 0x5020
movq %r12, %rdx
xorl %eax, %eax
callq 0x10a0
pushq $0x3
popq %rdi
callq 0x1100
// File: /workspace/github_c_makefile_star2_O2/ioerror[P]csidh-reference-implementation/csidh_util.c
// Function: read_stdin
uint64_t read_stdin(uint8_t *buf, uint64_t len) {
  uint64_t c = 0;
  for (uint64_t i = 0; i < len; ++i) {
    c += fscanf(stdin, "%02hhx", &buf[i]);
  }
  return c;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x6bb1(%rip), %r13      # 0x7fd0
leaq 0x3bea(%rip), %r15      # 0x5010
xorl %r12d, %r12d
subq $0x1, %rbx
jb 0x144a
movq (%r13), %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1040
cltq
addq %rax, %r12
incq %r14
jmp 0x1429
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: fd_type
static bool
fd_type(int fd, mode_t type)
{
	struct stat sb;
	bool rv = false;

	if (fstat(fd, &sb) < 0)
		return rv;

	switch (type) {
	case FD_ISOPEN:
		rv = true;
		break;
	case FD_ISDIROK:
		if (S_ISDIR(sb.st_mode))
			rv = sb.st_nlink > 0;
		break;
	case FD_ISREGOK:
		if (S_ISREG(sb.st_mode))
			rv = sb.st_nlink > 0;
		break;
	case FD_ISDIR:
	case FD_ISREG:
		rv = (sb.st_mode & FD_TMASK) == type;
		break;
	}
	return rv;
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movl %esi, %ebx
movq %rsp, %rsi
callq 0x2390
testl %eax, %eax
js 0x2b24
cmpl $0x8000, %ebx           # imm = 0x8000
je 0x2ae9
cmpl $0x2, %ebx
je 0x2af9
cmpl $0x4, %ebx
je 0x2b14
cmpl $0x4000, %ebx           # imm = 0x4000
je 0x2ae9
cmpl $0x1, %ebx
jne 0x2b24
movb $0x1, %al
jmp 0x2b26
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rsp), %eax
cmpl %ebx, %eax
sete %al
jmp 0x2b26
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rsp), %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x2b24
cmpq $0x0, 0x10(%rsp)
setne %al
jmp 0x2b26
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rsp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
je 0x2b09
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: fd_free
static void
fd_free(void)
{
	long fd_max;
	int fd;

	fd_max = sysconf(_SC_OPEN_MAX);
	if (fd_max < FDFREEMIN || fd_max > FDFREEMAX)
		fd_max = FDFREEMIN;
	for (fd = (int)fd_max - 1; fd > DUPFD0; fd--)
		(void)close(fd);
	for (fd--; fd > FD2; fd--)
		(void)close(fd);
}

// Assembly:
pushq %rbx
pushq $0x4
popq %rdi
callq 0x2340
leaq -0x1001(%rax), %rcx
decl %eax
cmpq $-0xfed, %rcx           # imm = 0xF013
pushq $0x13
popq %rbx
cmovael %eax, %ebx
cmpl $0xa, %ebx
jle 0x2b86
movl %ebx, %edi
callq 0x21d0
decl %ebx
jmp 0x2b6d
decl %ebx
movl %ebx, %edi
callq 0x21d0
cmpl $0x4, %ebx
jge 0x2b7d
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: rc_init
static void
rc_init(int *rcflag)
{
	char path[PATHMAX];
	const char *file;

	while (*rcflag <= DO_INIT_DONE) {
		file = NULL;
		switch (*rcflag) {
		case DO_SYSTEM_LOGIN:
			file = PATH_SYSTEM_LOGIN;
			break;
		case DO_SYSTEM_OSHRC:
			if (!is_login)
				(*rcflag)++;
			file = PATH_SYSTEM_OSHRC;
			break;
		case DO_DOT_LOGIN:
			file = pn_build(path, FILE_DOT_LOGIN, sizeof(path));
			break;
		case DO_DOT_OSHRC:
			file = pn_build(path, FILE_DOT_OSHRC, sizeof(path));
			break;
		case DO_INIT_DONE:
			if (dup2(dupfd0, FD0) == -1)
				err(SH_ERR,FMT2S,getmyname(),strerror(errno));
			shtype &= ~ST_RCFILE;
			(*rcflag)++;
			return;
		default:
			shtype &= ~ST_RCFILE;
			return;
		}
		(*rcflag)++;
		if (rc_open(file))
			break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rdi, %rbx
leaq 0x59f8(%rip), %r13      # 0x85ab
leaq 0x554e(%rip), %rbp      # 0x8108
leaq 0x5a03(%rip), %r14      # 0x85c4
movq %rsp, %r15
leaq 0x5a0b(%rip), %r12      # 0x85d6
movl (%rbx), %eax
cmpl $0x5, %eax
jg 0x2c77
decl %eax
cmpl $0x4, %eax
ja 0x2c28
movslq (%rbp,%rax,4), %rax
addq %rbp, %rax
movq %r13, %rdi
jmpq *%rax
cmpb $0x0, 0x9657(%rip)      # 0xc248
movq %r14, %rdi
jne 0x2c1b
movl $0x3, (%rbx)
movq %r14, %rdi
jmp 0x2c1b
movq %r15, %rdi
leaq 0x59d2(%rip), %rsi      # 0x85dd
jmp 0x2c13
movq %r15, %rdi
movq %r12, %rsi
callq 0x60ab
movq %r15, %rdi
incl (%rbx)
callq 0x6137
testb %al, %al
je 0x2bcb
jmp 0x2c77
andb $-0x9, 0x960d(%rip)     # 0xc23c
jmp 0x2c77
movl 0xe745(%rip), %edi      # 0x1137c
xorl %esi, %esi
callq 0x2160
cmpl $-0x1, %eax
jne 0x2c6e
callq 0x6455
movq %rax, %r14
callq 0x2070
movl (%rax), %edi
callq 0x2380
leaq 0x56df(%rip), %rsi      # 0x833d
pushq $0x2
popq %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x6218
andb $-0x9, 0x95c7(%rip)     # 0xc23c
incl (%rbx)
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: cmd_loop
static void
cmd_loop(bool halt)
{
	bool gz;

	sh_magic();

	for (error_source = gz = false; ; ) {
		if (PROMPT)
			fd_print(FD2, "%s", (sheuid != 0) ? "% " : "# ");
		if (rpx_line() == EOF) {
			if (!gz)
				status = SH_TRUE;
			break;
		}
		if (halt && error_source)
			break;
		if (is_login && logout_now != 0)
			break;
		gz = true;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %edi, %edi
movl $0x8000, %esi           # imm = 0x8000
callq 0x2ab0
testb %al, %al
je 0x2fa4
pushq $0x1
popq %rdx
xorl %edi, %edi
xorl %esi, %esi
callq 0x21a0
testq %rax, %rax
jne 0x2fa4
callq 0x3218
cmpl $0x23, %eax
jne 0x2f99
callq 0x3218
cmpl $0x21, %eax
jne 0x2f99
movl $0x7fe, %r14d           # imm = 0x7FE
subq $0x1, %r14
jb 0x3039
callq 0x3218
cmpl $-0x1, %eax
je 0x2fa4
cmpl $0xa, %eax
jne 0x2f7e
jmp 0x2fa4
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21a0
movb $0x0, 0x92c5(%rip)      # 0xc270
xorl %r13d, %r13d
leaq 0x5299(%rip), %r15      # 0x824e
leaq 0x528f(%rip), %r12      # 0x824b
leaq 0x5628(%rip), %r14      # 0x85eb
pushq $0x2
popq %rbp
movl 0x9270(%rip), %eax      # 0xc23c
andl $0x1f, %eax
cmpl $0x4, %eax
jne 0x2fef
cmpl $0x0, 0x9291(%rip)      # 0xc26c
movq %r15, %rdx
je 0x2fe3
movq %r12, %rdx
movl %ebp, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x63c8
callq 0x2c89
cmpl $-0x1, %eax
je 0x301d
testb %bl, %bl
je 0x3006
cmpb $0x0, 0x926c(%rip)      # 0xc270
jne 0x302a
movb $0x1, %r13b
cmpb $0x1, 0x9238(%rip)      # 0xc248
jne 0x2fc6
cmpl $0x0, 0x9237(%rip)      # 0xc250
je 0x2fc6
jmp 0x302a
testb $0x1, %r13b
jne 0x302a
andl $0x0, 0x923e(%rip)      # 0xc268
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6455
leaq 0x52f8(%rip), %rsi      # 0x833d
leaq 0x5205(%rip), %rcx      # 0x8251
pushq $-0x1
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6218
jmp 0x2fa4
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: rc_logout
static void
rc_logout(int *rcflag)
{
	char path[PATHMAX];
	const char *file;

	if (!is_login) {
		shtype &= ~ST_RCFILE;
		return;
	}

	while (*rcflag <= DO_LOGOUT_DONE) {
		file = NULL;
		switch (*rcflag) {
		case DO_SYSTEM_LOGOUT:
			file = PATH_SYSTEM_LOGOUT;
			break;
		case DO_DOT_LOGOUT:
			file = pn_build(path, FILE_DOT_LOGOUT, sizeof(path));
			break;
		case DO_LOGOUT_DONE:
			shtype &= ~ST_RCFILE;
			(*rcflag)++;
			return;
		default:
			shtype &= ~ST_RCFILE;
			return;
		}
		(*rcflag)++;
		if (rc_open(file))
			break;
	}
}

// Assembly:
cmpb $0x1, 0x91e3(%rip)      # 0xc248
jne 0x30c2
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %rbx
leaq 0x557d(%rip), %r12      # 0x85fd
pushq $0x2
popq %rbp
leaq 0x558d(%rip), %r14      # 0x8617
movq %rsp, %r15
movl (%rbx), %eax
cmpl $0x3, %eax
jg 0x30e5
movl %ebp, %ecx
movq %r12, %rdi
cmpl $0x1, %eax
je 0x30b5
cmpl $0x2, %eax
jne 0x30ca
movq %r15, %rdi
movq %r14, %rsi
callq 0x60ab
movl (%rbx), %ecx
incl %ecx
movq %r15, %rdi
movl %ecx, (%rbx)
callq 0x6137
testb %al, %al
je 0x308d
jmp 0x30e5
andb $-0x9, 0x9173(%rip)     # 0xc23c
retq
cmpl $0x3, %eax
jne 0x30de
andb $-0x9, 0x9166(%rip)     # 0xc23c
movl $0x4, (%rbx)
jmp 0x30e5
andb $-0x9, 0x9157(%rip)     # 0xc23c
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: afree
static void
afree(const char *name)
{
	struct anode *a, *p;

	if (name != NULL) {
		a = anp;
		p = a;
		while (a != NULL) {
			if (EQUAL(name, a->name)) {
				if (a == anp)
					anp = a->next;
				else
					p->next = a->next;
				xfree(a->name);
				xfree(a->string);
				xfree(a);
				break;
			}
			p = a;
			a = a->next;
		}
	} else {
		a = anp;
		while (a != NULL) {
			p = a;
			xfree(a->name);
			xfree(a->string);
			a = a->next;
			xfree(p);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0xba03(%rip), %rbx      # 0xeb08
testq %rdi, %rdi
je 0x315f
movq %rdi, %r15
movq %rbx, %rax
movq %rbx, %r13
testq %rax, %rax
je 0x3164
movq %rax, %r14
movb (%r15), %al
movq 0x8(%r14), %r12
cmpb (%r12), %al
jne 0x3137
movq %r15, %rdi
movq %r12, %rsi
callq 0x2230
testl %eax, %eax
je 0x316e
movq (%r14), %rax
movq %r14, %r13
jmp 0x3113
movq 0x8(%rbx), %rdi
callq 0x2050
movq 0x10(%rbx), %rdi
callq 0x2050
movq (%rbx), %r14
movq %rbx, %rdi
callq 0x2050
movq %r14, %rbx
testq %rbx, %rbx
jne 0x313f
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
cmpq %rbx, %r14
movq (%r14), %rax
leaq 0xb98d(%rip), %rcx      # 0xeb08
cmoveq %rcx, %r13
movq %rax, (%r13)
movq %r12, %rdi
callq 0x2050
movq 0x10(%r14), %rdi
callq 0x2050
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: cmd_lookup
enum sbikey
cmd_lookup(const char *cmd)
{
	const struct sbicmd *lp, *mp, *rp;
	int d;

	for (lp = sbi, rp = &sbi[NSBICMD]; lp < rp; /* nothing */) {
		mp = lp + (rp - lp) / 2;
		if ((d = strcmp(cmd, mp->sbi_command)) == 0)
			return mp->sbi_key;
		if (d > 0)
			lp = mp + 1;
		else
			rp = mp;
	}

	return SBI_UNKNOWN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x8b86(%rip), %r15      # 0xbd40
leaq 0x8a3f(%rip), %r12      # 0xbc00
pushq $0x14
popq %rbx
pushq $0x2
popq %r13
cmpq %r15, %r12
jae 0x3207
movq %r15, %rax
subq %r12, %rax
sarq $0x4, %rax
cqto
idivq %r13
shlq $0x4, %rax
leaq (%r12,%rax), %rbp
movq (%r12,%rax), %rsi
movq %r14, %rdi
callq 0x2230
testl %eax, %eax
je 0x3204
leaq 0x10(%rbp), %rcx
testl %eax, %eax
cmovgq %rcx, %r12
cmovleq %rbp, %r15
jmp 0x31c8
movl 0x8(%rbp), %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: readc
static int
readc(void)
{
	UChar c;

	if (asp != NULL) {
		if (asp == (char *)-1)
			return EOF;
		if ((c = UCHAR(*asp++)) == EOS) {
			asp = (char *)-1;
			c = UCHAR(EOL);
		}
		return c;
	}
	if (argv2p != NULL) {
		if (argv2p == (char *)-1)
			return EOF;
		if ((c = UCHAR(*argv2p++)) == EOS) {
			argv2p = (char *)-1;
			c = UCHAR(EOL);
		}
		return c;
	}
	if (read(FD0, &c, (size_t)1) != 1)
		return EOF;

	return c;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq 0x9054(%rip), %rax      # 0xc278
pushq $-0x1
popq %rbx
cmpq $-0x1, %rax
je 0x32b3
testq %rax, %rax
jne 0x3264
movq 0x9003(%rip), %rax      # 0xc240
cmpq $-0x1, %rax
je 0x32b3
testq %rax, %rax
jne 0x3287
leaq 0xf(%rsp), %rsi
pushq $0x1
popq %rdx
xorl %edi, %edi
callq 0x2200
cmpq $0x1, %rax
jne 0x32b3
movzbl 0xf(%rsp), %ebx
jmp 0x32b3
leaq 0x1(%rax), %rcx
movq %rcx, 0x9009(%rip)      # 0xc278
movzbl (%rax), %eax
xorl %edx, %edx
cmpb $0x1, %al
sbbq %rdx, %rdx
orq %rcx, %rdx
testb %al, %al
movq %rdx, 0x8ff3(%rip)      # 0xc278
jmp 0x32aa
movq %rax, %rcx
incq %rcx
movq %rcx, 0x8fac(%rip)      # 0xc240
movzbl (%rax), %eax
xorl %edx, %edx
cmpb $0x1, %al
sbbq %rdx, %rdx
orq %rcx, %rdx
testb %al, %al
movq %rdx, 0x8f96(%rip)      # 0xc240
pushq $0xa
popq %rcx
cmovnel %eax, %ecx
movzbl %cl, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: tfree
static void
tfree(struct tnode *t)
{

	if (t == NULL)
		return;
	switch (t->ntype) {
	case TLIST:
	case TPIPE:
		tfree(t->nleft);
		tfree(t->nright);
		break;
	case TCOMMAND:
		xfree(t->nfin);
		xfree(t->nfout);
		vfree(t->nav);
		break;
	case TSUBSHELL:
		xfree(t->nfin);
		xfree(t->nfout);
		tfree(t->nsub);
		break;
	}
	xfree(t);
}

// Assembly:
testq %rdi, %rdi
je 0x4a04
pushq %rbx
movq %rdi, %rbx
movl 0x38(%rdi), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x4a05
cmpl $0x3, %eax
je 0x4a18
cmpl $0x4, %eax
jne 0x4a33
movq 0x18(%rbx), %rdi
callq 0x2050
movq 0x20(%rbx), %rdi
callq 0x2050
movq 0x10(%rbx), %rdi
jmp 0x4a11
retq
movq (%rbx), %rdi
callq 0x49ce
movq 0x8(%rbx), %rdi
callq 0x49ce
jmp 0x4a33
movq 0x18(%rbx), %rdi
callq 0x2050
movq 0x20(%rbx), %rdi
callq 0x2050
movq 0x28(%rbx), %rdi
callq 0x54a6
movq %rbx, %rdi
popq %rbx
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: asget
static const char *
asget(const char *name)
{
	struct anode *a;
	const char *as;

	as = NULL;
	a  = anp;
	while (a != NULL) {
		if (EQUAL(name, a->name)) {
			as = a->string;
			break;
		}
		a = a->next;
	}
	return as;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x97de(%rip), %r15      # 0xeb08
xorl %ebx, %ebx
movq (%r15), %r15
testq %r15, %r15
je 0x534f
movb (%r14), %al
movq 0x8(%r15), %rsi
cmpb (%rsi), %al
jne 0x532c
movq %r14, %rdi
callq 0x2230
testl %eax, %eax
jne 0x532c
movq 0x10(%r15), %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: rp_alias
static const char **
rp_alias(const char *string)
{
	struct tnode *t;
	sigset_t nmask, omask;
	char *wp;

	asp = string;
	linep  = aline;
	elinep = &aline[LINEMAX - 5];
	wordp  = aword;
	ewordp = &aword[WORDMAX - 5];
	error  = false;
	error_message = NULL;
	nul_count = 0;
	do {
		wp = linep;
		if (get_word() == EOF) {
			error_message = ERR_SYNTAX;/* same as: ([...] \) */
			asp = NULL;
			return NULL;
		}
	} while (*wp != EOL);
	*wordp = NULL;

	if (error) {
		asp = NULL;
		return NULL;
	}

	if (wordp - aword > 1) {
		if (any(**aword, ";&")) {
			error_message = ERR_SYNTAX;/* same as: (;) or (&) */
			asp = NULL;
			return NULL;
		}
		(void)sigfillset(&nmask);
		(void)sigprocmask(SIG_SETMASK, &nmask, &omask);
		t = NULL;
		t = syntax(aword, wordp);
		(void)sigprocmask(SIG_SETMASK, &omask, NULL);
		if (error) {
			tfree(t);
			t = NULL;
			asp = NULL;
			return NULL;
		}
		tfree(t);
		t = NULL;
		asp = NULL;
		return (const char **)aword;
	}
	error_message = ERR_SYNTAX;/* same as: () */
	asp = NULL;
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, 0x6f0a(%rip)      # 0xc278
leaq 0x979b(%rip), %rax      # 0xeb10
movq %rax, 0x7704(%rip)      # 0xca80
leaq 0x9f88(%rip), %rax      # 0xf30b
movq %rax, 0x76fe(%rip)      # 0xca88
leaq 0x9f7f(%rip), %rbx      # 0xf310
movq %rbx, 0x96f8(%rip)      # 0xea90
leaq 0xbf49(%rip), %rax      # 0x112e8
movq %rax, 0x96f2(%rip)      # 0xea98
andq $0x0, 0x96fa(%rip)      # 0xeaa8
movb $0x0, 0x96eb(%rip)      # 0xeaa0
andl $0x0, 0x96f4(%rip)      # 0xeab0
movq 0x76bd(%rip), %r14      # 0xca80
callq 0x32bb
cmpl $-0x1, %eax
je 0x540a
cmpb $0xa, (%r14)
jne 0x53bc
movq 0x96b6(%rip), %rax      # 0xea90
andq $0x0, (%rax)
cmpb $0x1, 0x96bb(%rip)      # 0xeaa0
je 0x5418
subq %rbx, %rax
cmpq $0x9, %rax
jl 0x540a
movq 0x9f19(%rip), %rax      # 0xf310
movsbl (%rax), %edi
leaq 0x2ef6(%rip), %rsi      # 0x82f7
callq 0x4d6a
testb %al, %al
je 0x5435
leaq 0x2e54(%rip), %rax      # 0x8265
movq %rax, 0x9690(%rip)      # 0xeaa8
andq $0x0, 0x6e58(%rip)      # 0xc278
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x80(%rsp), %r14
movq %r14, %rdi
callq 0x2290
pushq $0x2
popq %rbp
movq %rsp, %r15
movl %ebp, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2040
movq 0x9631(%rip), %rsi      # 0xea90
movq %rbx, %rdi
callq 0x350a
movq %rax, %r14
xorl %r12d, %r12d
movl %ebp, %edi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2040
cmpb $0x0, 0x9620(%rip)      # 0xeaa0
cmovneq %r12, %rbx
movq %r14, %rdi
callq 0x49ce
andq $0x0, 0x6de4(%rip)      # 0xc278
jmp 0x5422
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: vfree
static void
vfree(char **vp)
{
	char **p;

	if (vp != NULL) {
		for (p = vp; *p != NULL; p++) {
			free(*p);
			*p = NULL;
		}
		free(vp);
		vp = NULL;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x54db
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rdi, %r14
movq (%r14), %rdi
testq %rdi, %rdi
je 0x54cc
callq 0x2050
andq $0x0, (%r14)
addq $0x8, %r14
jmp 0x54b5
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: gchar
static char *
gchar(const char *ap)
{
	char c;
	const char *a;

	for (a = ap; *a != EOS; a++)
		switch (*a) {
		case DQUOT:
		case SQUOT:
			for (c = *a++; *a != c; a++)
				if (*a == EOS)
					return NULL;
			continue;
		case BQUOT:
			if (*++a == EOS)
				return NULL;
			continue;
		case ASTERISK:
		case QUESTION:
		case LBRACKET:
			return (char *)a;
		}
	return NULL;
}

// Assembly:
movq %rdi, %rax
pushq $0x21
popq %rcx
movabsq $0x200000020000100, %rdx # imm = 0x200000020000100
movb (%rax), %sil
movzbl %sil, %edi
leal -0x22(%rdi), %r8d
cmpl $0x3a, %r8d
ja 0x5b15
btq %r8, %rcx
jae 0x5afe
incq %rax
movb (%rax), %dil
cmpb %sil, %dil
je 0x5b19
incq %rax
testb %dil, %dil
jne 0x5aec
jmp 0x5b1e
cmpq $0x3a, %r8
jne 0x5b0f
cmpb $0x0, 0x1(%rax)
je 0x5b1e
incq %rax
jmp 0x5b19
btq %r8, %rdx
jb 0x5b20
testl %edi, %edi
je 0x5b1e
incq %rax
jmp 0x5ad2
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: gnew
static const char **
gnew(const char **gav)
{
	size_t siz;
	ptrdiff_t gidx;
	static unsigned mult = 1;

	if (gavp == gave) {
		mult *= GAVMULT;
		gidx  = (ptrdiff_t)(gavp - gav);
		siz   = (size_t)((gidx + (GAVNEW * mult)) * sizeof(char *));
		gav   = xrealloc(gav, siz);
		gavp  = gav + gidx;
		gave  = &gav[gidx + (GAVNEW * mult) - 1];
	}
	return gav;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xb7e6(%rip), %r14      # 0x11318
cmpq 0xb7e7(%rip), %r14      # 0x11320
jne 0x5bc8
movl 0x66b7(%rip), %eax      # 0xc1fc
leal (%rax,%rax), %r15d
movl %r15d, 0x66ac(%rip)     # 0xc1fc
subq %rbx, %r14
shll $0x8, %eax
leaq (%r14,%rax,8), %rsi
andq $-0x8, %rsi
movq %rbx, %rdi
callq 0x2310
movq %rax, %rbx
testq %rax, %rax
jne 0x5bab
callq 0x2100
movl %eax, %ebp
callq 0x646b
cmpl %eax, %ebp
pushq $0x2
popq %rax
pushq $0x7c
popq %rbp
cmovel %eax, %ebp
callq 0x6455
leaq 0x27ac(%rip), %rsi      # 0x833d
leaq 0x273c(%rip), %rcx      # 0x82d4
movl %ebp, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6218
movl 0x6651(%rip), %r15d     # 0xc1fc
addq %rbx, %r14
movq %r14, 0xb763(%rip)      # 0x11318
shll $0x7, %r15d
leaq (%r14,%r15,8), %rax
addq $-0x8, %rax
movq %rax, 0xb758(%rip)      # 0x11320
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: atrim
static char *
atrim(UChar *ap)
{
	size_t siz;
	UChar buf[LINEMAX], c;
	UChar *a, *b;

	*buf = UCHAR(EOS);
	for (a = ap, b = buf; b < &buf[LINEMAX]; a++, b++) {
		switch (*a) {
		case EOS:
			*b = UCHAR(EOS);
			siz = (b - buf) + 1;
			(void)memcpy(ap, buf, siz);
			return (char *)ap;
		case DQUOT:
		case SQUOT:
			c = *a++;
			while (*a != c && b < &buf[LINEMAX]) {
				if (*a == EOS)
					goto aterr;
				*b++ = *a++;
			}
			b--;
			continue;
		case BQUOT:
			if (*++a == EOS) {
				a--, b--;
				continue;
			}
			break;
		}
		*b = *a;
	}

aterr:
	err(ESTATUS, "%s: %s %s\n", getmyname(), ERR_TRIM, (const char *)ap);
	/*NOTREACHED*/
	return NULL;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x808, %rsp            # imm = 0x808
movq %rdi, %rbx
movb $0x0, (%rsp)
xorl %edx, %edx
movq %rdi, %rax
cmpq $0x7ff, %rdx            # imm = 0x7FF
jg 0x5c43
movzbl (%rax), %ecx
cmpl $0x22, %ecx
je 0x5c0c
cmpl $0x27, %ecx
je 0x5c0c
cmpl $0x5c, %ecx
je 0x5c2e
testl %ecx, %ecx
jne 0x5c38
jmp 0x5c8b
incq %rax
movb (%rax), %sil
cmpb %cl, %sil
je 0x5c3e
cmpq $0x7ff, %rdx            # imm = 0x7FF
jg 0x5c3e
testb %sil, %sil
je 0x5c43
movb %sil, (%rsp,%rdx)
incq %rdx
jmp 0x5c0c
movb 0x1(%rax), %cl
testb %cl, %cl
je 0x5c3e
incq %rax
movb %cl, (%rsp,%rdx)
incq %rdx
incq %rax
jmp 0x5beb
callq 0x2100
movl %eax, %ebp
callq 0x646b
cmpl %eax, %ebp
pushq $0x2
popq %rax
pushq $0x7c
popq %rbp
cmovel %eax, %ebp
callq 0x6455
leaq 0x2733(%rip), %rsi      # 0x8399
leaq 0x2737(%rip), %rcx      # 0x83a4
movl %ebp, %edi
movq %rax, %rdx
movq %rbx, %r8
xorl %eax, %eax
callq 0x6218
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %rbp
retq
movb $0x0, (%rsp,%rdx)
incq %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x22a0
jmp 0x5c7e
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: gcat
static char *
gcat(const char *src1, const char *src2, bool slash)
{
	size_t siz;
	char *b, buf[PATHMAX], c, *dst;
	const char *s;

	if (src1 == NULL || src2 == NULL) {
		/* never true, but appease splint(1) */
		err(-2, FMT2S, getmyname(), "gcat: Invalid argument");
		return NULL;
	}

	*buf = EOS, b = buf, s = src1;
	while ((c = *s++) != EOS) {
		if (b >= &buf[PATHMAX - 1]) {
			err(-2, FMT2S, getmyname(), strerror(ENAMETOOLONG));
			return NULL;
		}
		*b++ = c;
	}
	if (slash)
		*b++ = SLASH;
	s = src2;
	do {
		if (b >= &buf[PATHMAX]) {
			err(-2, FMT2S, getmyname(), strerror(ENAMETOOLONG));
			return NULL;
		}
		*b++ = c = *s++;
	} while (c != EOS);

	siz = b - buf;
	gavtot += siz;
	if (gavtot > GAVMAX) {
		err(-2, FMT2S, getmyname(), ERR_E2BIG);
		return NULL;
	}
	dst = xmalloc(siz);

	(void)memcpy(dst, buf, siz);
	return dst;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
testq %rdi, %rdi
setne %al
testq %rsi, %rsi
setne %cl
testb %cl, %al
jne 0x5cda
callq 0x6455
leaq 0x2678(%rip), %rsi      # 0x833d
leaq 0x26e4(%rip), %rcx      # 0x83b0
xorl %r14d, %r14d
pushq $-0x2
popq %rdi
movq %rax, %rdx
jmp 0x5d6c
movb $0x0, (%rsp)
xorl %ebx, %ebx
movb (%rdi,%rbx), %al
testb %al, %al
je 0x5cf8
cmpq $0xfff, %rbx            # imm = 0xFFF
je 0x5d49
movb %al, (%rsp,%rbx)
incq %rbx
jmp 0x5ce0
testb %dl, %dl
je 0x5d03
movb $0x2f, (%rsp,%rbx)
incq %rbx
cmpq $0x1000, %rbx           # imm = 0x1000
je 0x5d49
movb (%rsi), %al
incq %rsi
movb %al, (%rsp,%rbx)
incq %rbx
testb %al, %al
jne 0x5d03
movq 0xb5ee(%rip), %rax      # 0x11310
addq %rbx, %rax
movq %rax, 0xb5e4(%rip)      # 0x11310
cmpq $0x100001, %rax         # imm = 0x100001
jb 0x5d81
callq 0x6455
leaq 0x25fd(%rip), %rsi      # 0x833d
leaq 0x2680(%rip), %rcx      # 0x83c7
jmp 0x5ccc
callq 0x6455
movq %rax, %rbx
pushq $0x24
popq %rdi
callq 0x2380
leaq 0x25dd(%rip), %rsi      # 0x833d
xorl %r14d, %r14d
pushq $-0x2
popq %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x6218
movq %r14, %rax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x4f10
movq %rax, %r14
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x22a0
jmp 0x5d73
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: aalloc1
static struct anode *
aalloc1(const char *name, const char *string)
{
	struct anode *a;

	a = xmalloc(sizeof(struct anode));
	a->next   = NULL;
	a->name   = xstrdup(name);
	a->string = xstrdup(string);
	return a;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x18
popq %rdi
callq 0x4f10
movq %rax, %r15
andq $0x0, (%rax)
movq %r14, %rdi
callq 0x52ee
movq %rax, 0x8(%r15)
movq %rbx, %rdi
callq 0x52ee
movq %rax, 0x10(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: set_ss_flags
static void
set_ss_flags(int sig, action_type act)
{

	if (act == SIG_IGN) {
		if (sig == SIGINT)
			sig_state |= S_SIGINT;
		else if (sig == SIGQUIT)
			sig_state |= S_SIGQUIT;
		else if (sig == SIGTERM)
			sig_state |= S_SIGTERM;
	} else if (act == SIG_DFL) {
		if (sig == SIGINT)
			sig_state &= ~S_SIGINT;
		else if (sig == SIGQUIT)
			sig_state &= ~S_SIGQUIT;
		else if (sig == SIGTERM)
			sig_state &= ~S_SIGTERM;
	}
}

// Assembly:
testq %rsi, %rsi
je 0x5fbc
cmpq $0x1, %rsi
jne 0x6006
cmpl $0xf, %edi
je 0x5fec
cmpl $0x3, %edi
je 0x5fd6
cmpl $0x2, %edi
jne 0x6006
movl 0xb3bd(%rip), %eax      # 0x11374
orl $0x1, %eax
jmp 0x6000
cmpl $0xf, %edi
je 0x5ff7
cmpl $0x3, %edi
je 0x5fe1
cmpl $0x2, %edi
jne 0x6006
movl 0xb3a3(%rip), %eax      # 0x11374
andl $-0x2, %eax
jmp 0x6000
movl 0xb398(%rip), %eax      # 0x11374
orl $0x2, %eax
jmp 0x6000
movl 0xb38d(%rip), %eax      # 0x11374
andl $-0x3, %eax
jmp 0x6000
movl 0xb382(%rip), %eax      # 0x11374
orl $0x4, %eax
jmp 0x6000
movl 0xb377(%rip), %eax      # 0x11374
andl $-0x5, %eax
movl %eax, 0xb36e(%rip)      # 0x11374
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: sh_errexit
static void
sh_errexit(int es)
{

#ifdef	DEBUG
	fd_print(FD2, "sh_errexit: es == %d;\n", es);
#endif

	switch (es) {
	case -2:
		/* For compatibility, glob() errors are not fatal. */
		status = SH_ERR;
		return;
	case -1:
		status = SH_ERR;
		/*FALLTHROUGH*/
	case 0:
		if (SHTYPE(ST_SOURCE)) {
			(void)lseek(FD0, (off_t)0, SEEK_END);
			error_source = true;
			return;
		}
		if (SHTYPE(ST_RCFILE) && (status == 130 || status == 131)) {
			(void)lseek(FD0, (off_t)0, SEEK_END);
			return;
		}
		if (!SHTYPE(ST_INTERACTIVE)) {
			if (!SHTYPE(ST_ONELINE))
				(void)lseek(FD0, (off_t)0, SEEK_END);
			break;
		}
		return;
	default:
		status = es;
	}
	EXIT(status);
}

// Assembly:
pushq %rbx
testl %edi, %edi
je 0x602c
cmpl $-0x1, %edi
je 0x6022
cmpl $-0x2, %edi
jne 0x6073
movl $0x2, 0x6248(%rip)      # 0xc268
jmp 0x6071
movl $0x2, 0x623c(%rip)      # 0xc268
movl 0x620a(%rip), %eax      # 0xc23c
testb $0x10, %al
jne 0x6058
testb $0x8, %al
je 0x606d
movl 0x6228(%rip), %ecx      # 0xc268
andl $-0x2, %ecx
cmpl $0x82, %ecx
jne 0x606d
pushq $0x2
popq %rdx
xorl %edi, %edi
xorl %esi, %esi
popq %rbx
jmp 0x21a0
pushq $0x2
popq %rdx
xorl %edi, %edi
xorl %esi, %esi
callq 0x21a0
movb $0x1, 0x6205(%rip)      # 0xc270
jmp 0x6071
testb $0x4, %al
je 0x607b
popq %rbx
retq
movl %edi, 0x61ef(%rip)      # 0xc268
jmp 0x608b
testb $0x1, %al
jne 0x608b
pushq $0x2
popq %rdx
xorl %edi, %edi
xorl %esi, %esi
callq 0x21a0
callq 0x2100
movl %eax, %ebx
callq 0x646b
movl 0x61cb(%rip), %edi      # 0xc268
cmpl %eax, %ebx
jne 0x60a6
callq 0x2370
callq 0x2080
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: pn_build
static char *
pn_build(char *path, const char *file, size_t size)
{
	int len;
	const char *home;

	*path = EOS;
	home  = getenv("HOME");

	if (home != NULL && *home != EOS) {
		len = snprintf(path, size, "%s/%s", home, file);
		if (len < 0 || len >= (int)size) {
			err(-1, "%s: %s/%s: %s\n",
			    getmyname(), home, file, strerror(ENAMETOOLONG));
			*path = EOS;
		}
	}

	return path;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movb $0x0, (%rdi)
leaq 0x21ef(%rip), %rdi      # 0x82b2
callq 0x2030
testq %rax, %rax
je 0x6128
movq %rax, %r15
cmpb $0x0, (%rax)
je 0x6128
leaq 0x250c(%rip), %rdx      # 0x85e8
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdi
movq %r15, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x2170
cmpl $0x1000, %eax           # imm = 0x1000
jb 0x6128
callq 0x6455
movq %rax, %r12
pushq $0x24
popq %rdi
callq 0x2380
leaq 0x24df(%rip), %rsi      # 0x85ee
pushq $-0x1
popq %rdi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x6218
movb $0x0, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/osh.c
// Function: rc_open
static bool
rc_open(const char *file)
{
	int fd;

	if (file == NULL || *file == EOS)
		return false;

	if ((fd = open(file, O_RDONLY | O_NONBLOCK)) == -1)
		return false;

	if (!fd_type(fd, FD_ISREG)) {
		err(-1, FMT3S, getmyname(), file, ERR_EXEC);
		(void)close(fd);
		return false;
	}

	/* NOTE: A dup2(2) or fcntl(2) error here is fatal. */
	if (dup2(fd, FD0) == -1 ||
	    fcntl(FD0, F_SETFL, O_RDONLY & ~O_NONBLOCK) == -1)
		err(SH_ERR, FMT3S, getmyname(), file, strerror(errno));

	(void)close(fd);
	shtype |= ST_RCFILE;
	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x61db
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x61db
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x800, %esi            # imm = 0x800
xorl %eax, %eax
callq 0x2320
cmpl $-0x1, %eax
je 0x61de
movl %eax, %ebp
movl %eax, %edi
movl $0x8000, %esi           # imm = 0x8000
callq 0x2ab0
testb %al, %al
je 0x61e6
movl %ebp, %edi
xorl %esi, %esi
callq 0x2160
cmpl $-0x1, %eax
je 0x619a
pushq $0x4
popq %rsi
xorl %edi, %edi
xorl %edx, %edx
xorl %eax, %eax
callq 0x20d0
cmpl $-0x1, %eax
jne 0x61c8
callq 0x6455
movq %rax, %r14
callq 0x2070
movl (%rax), %edi
callq 0x2380
leaq 0x2184(%rip), %rsi      # 0x8339
pushq $0x2
popq %rdi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x6218
movl %ebp, %edi
callq 0x21d0
orb $0x8, 0x6066(%rip)      # 0xc23c
movb $0x1, %r14b
jmp 0x61de
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
callq 0x6455
leaq 0x2147(%rip), %rsi      # 0x8339
leaq 0x214c(%rip), %r8       # 0x8345
xorl %r14d, %r14d
pushq $-0x1
popq %rdi
movq %rax, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x6218
movl %ebp, %edi
callq 0x21d0
jmp 0x61de
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/util.c
// Function: uexec
int
uexec(enum sbikey key, int ac, char **av)
{
	int (*util)(int, char **);
	int r;
	static int cnt, cnt1, s;

	if (cnt == 0) setmyerrexit(&ut_errexit);

	switch (key) {
	case SBI_ECHO:	util = &sbi_echo;	break;
	case SBI_FD2:	util = &sbi_fd2;	break;
	case SBI_GOTO:	util = &sbi_goto;	break;
	case SBI_IF:	util = &sbi_if;		break;
	default:
		err(FC_ERR, FMT2S, getmyname(), "uexec: Invalid utility");
		/*NOTREACHED*/
		return FC_ERR;
	}

	cnt1 = cnt++;

	r = (*util)(ac, av);

	if (cnt-- > cnt1)
		s = r;

#ifdef	DEBUG
	if (cnt == 0) fd_print(FD2, "uexec: return %d;\n", s);
#endif

	return s;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r14d
cmpl $0x0, 0xae6d(%rip)      # 0x11390
jne 0x6531
leaq -0x42(%rip), %rdi       # 0x64ea
callq 0x647a
addl $-0x4, %r14d
cmpl $0x6, %r14d
jae 0x658c
pushq $0x39
popq %rax
btl %r14d, %eax
jae 0x658c
movl %r14d, %eax
leaq 0x5862(%rip), %rcx      # 0xbdb0
movl 0xae3c(%rip), %edx      # 0x11390
leal 0x1(%rdx), %esi
movl %esi, 0xae33(%rip)      # 0x11390
movl %edx, 0xae31(%rip)      # 0x11394
movl %ebp, %edi
movq %rbx, %rsi
callq *(%rcx,%rax,8)
movl %eax, %ebx
movl 0xae1d(%rip), %eax      # 0x11390
leal -0x1(%rax), %ecx
movl %ecx, 0xae14(%rip)      # 0x11390
cmpl 0xae12(%rip), %eax      # 0x11394
jle 0x65b5
movl %ebx, 0xae0e(%rip)      # 0x11398
jmp 0x65ae
callq 0x6455
leaq 0x1da5(%rip), %rsi      # 0x833d
leaq 0x20d5(%rip), %rcx      # 0x8674
pushq $0x7c
popq %rbx
movl %ebx, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6218
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl 0xaddd(%rip), %ebx      # 0x11398
jmp 0x65ae
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/util.c
// Function: sbi_echo
static int
sbi_echo(int argc, char **argv)
{
	bool nopt;
	char **avp, **ave;

	argc--, argv++;
	if (*argv != NULL && EQUAL(*argv, "-n")) {
		argc--, argv++;
		nopt = true;
	} else
		nopt = false;

	for (avp = argv, ave = &argv[argc]; avp < ave; avp++)
		fd_print(FD1, "%s%s", *avp, (avp + 1 < ave) ? " " : "");
	if (!nopt)
		fd_print(FD1, FMT1S, "");

	return SH_TRUE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leal -0x1(%rdi), %eax
leaq 0x8(%rsi), %r14
movq 0x8(%rsi), %rcx
testq %rcx, %rcx
je 0x65e9
cmpb $0x2d, (%rcx)
jne 0x65e9
cmpb $0x6e, 0x1(%rcx)
jne 0x65e9
cmpb $0x0, 0x2(%rcx)
je 0x6663
movl $0x0, 0x4(%rsp)
cltq
leaq (%r14,%rax,8), %r12
leaq 0x1c51(%rip), %r13      # 0x824f
leaq 0x1cce(%rip), %r15      # 0x82d3
leaq 0x1cbf(%rip), %rbx      # 0x82cb
pushq $0x1
popq %rbp
cmpq %r12, %r14
jae 0x6633
movq (%r14), %rdx
addq $0x8, %r14
cmpq %r12, %r14
movq %r15, %rcx
cmovbq %r13, %rcx
movl %ebp, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x63c8
jmp 0x660f
cmpb $0x0, 0x4(%rsp)
jne 0x6652
leaq 0x1d00(%rip), %rsi      # 0x8341
leaq 0x1c8b(%rip), %rdx      # 0x82d3
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x63c8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addl $-0x2, %edi
addq $0x10, %rsi
movb $0x1, %al
movl %eax, 0x4(%rsp)
movq %rsi, %r14
movl %edi, %eax
jmp 0x65f1
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/util.c
// Function: sbi_goto
static int
sbi_goto(int argc, char **argv)
{
	size_t siz;
	char label[LABELMAX];

	setmyname(argv[0]);

	if (argc < 2 || *argv[1] == EOS || isatty(FD0) != 0)
		err(FC_ERR, FMT2S, getmyname(), ERR_GENERIC);
	if ((siz = strlen(argv[1]) + 1) > sizeof(label))
		err(FC_ERR, FMT3S, getmyname(), argv[1], ERR_LABTOOLONG);
	if (lseek(FD0, (off_t)0, SEEK_SET) == -1)
		err(FC_ERR, FMT2S, getmyname(), ERR_SEEK);

	while (getlabel(label, *argv[1] & 0377, siz))
		if (strcmp(label, argv[1]) == 0) {
			(void)lseek(FD0, offset, SEEK_SET);
			return SH_TRUE;
		}

	fd_print(FD2, FMT3S, getmyname(), argv[1], ERR_LABNOTFOUND);
	return SH_FALSE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movq (%rsi), %rdi
callq 0x6487
cmpl $0x2, %ebp
jl 0x687c
movq 0x8(%rbx), %rax
cmpb $0x0, (%rax)
je 0x687c
xorl %edi, %edi
callq 0x20a0
testl %eax, %eax
je 0x689c
callq 0x6455
leaq 0x1ab5(%rip), %rsi      # 0x833d
leaq 0x1c18(%rip), %rcx      # 0x84a7
pushq $0x7c
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6218
movq 0x8(%rbx), %rdi
callq 0x2130
movq %rax, %r14
leaq 0x1(%rax), %r15
cmpq $0x42, %r15
jb 0x68d6
callq 0x6455
movq 0x8(%rbx), %rcx
leaq 0x1a77(%rip), %rsi      # 0x8339
leaq 0x1df8(%rip), %r8       # 0x86c1
pushq $0x7c
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6218
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21a0
cmpq $-0x1, %rax
jne 0x6907
callq 0x6455
leaq 0x1a4a(%rip), %rsi      # 0x833d
leaq 0x1dd6(%rip), %rcx      # 0x86d0
pushq $0x7c
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6218
leaq (%rsp,%r15), %r13
movq 0x8(%rbx), %r12
movabsq $0x200000c01, %rbp      # imm = 0x200000C01
movzbl (%r12), %r12d
callq 0x6a8c
cmpl $-0x1, %eax
je 0x69dc
cmpl $0x9, %eax
je 0x6936
cmpl $0x20, %eax
jne 0x693d
callq 0x6a8c
jmp 0x692c
cmpl $0x3a, %eax
jne 0x697c
callq 0x6a8c
cmpl $0x9, %eax
je 0x6942
cmpl $0x20, %eax
je 0x6942
cmpl %r12d, %eax
jne 0x691e
movl %r12d, %eax
movq %rsp, %r15
leal 0x1(%rax), %ecx
cmpl $0x21, %ecx
ja 0x696a
btq %rcx, %rbp
jb 0x698d
movb %al, (%r15)
callq 0x6a8c
incq %r15
cmpq %r13, %r15
jb 0x695c
jmp 0x6991
cmpl $-0x1, %eax
je 0x691e
cmpl $0xa, %eax
je 0x691e
callq 0x6a8c
jmp 0x697c
movb $0x0, (%r15)
cmpl $-0x1, %eax
je 0x69dc
cmpl $0xa, %eax
je 0x69a2
callq 0x6a8c
jmp 0x6991
movq %rsp, %rax
subq %rax, %r15
cmpq %r14, %r15
jne 0x691e
movq 0x8(%rbx), %r12
movq %rsp, %rdi
movq %r12, %rsi
callq 0x2230
testl %eax, %eax
jne 0x6919
movq 0xa9d1(%rip), %rsi      # 0x113a0
xorl %ebx, %ebx
xorl %edi, %edi
xorl %edx, %edx
callq 0x21a0
jmp 0x6a07
movb $0x0, (%rsp)
callq 0x6455
movq 0x8(%rbx), %rcx
leaq 0x1949(%rip), %rsi      # 0x8339
leaq 0x1ce5(%rip), %r8       # 0x86dc
pushq $0x2
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x63c8
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/util.c
// Function: sbi_if
static int
sbi_if(int argc, char **argv)
{
	bool re;		/* return value of expr() */

	setmyname(argv[0]);

	if (argc > 1) {
		iac = argc;
		iav = argv;
		iap = 1;
		re  = expr();
		if (re && iap < iac)
			doex(!FORKED);
	} else
		re = false;

	return re ? SH_TRUE : SH_FALSE;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %ebp
movq (%rsi), %rdi
callq 0x6487
pushq $0x1
popq %rbx
cmpl $0x2, %ebp
jl 0x6a6a
movl %ebp, 0xa971(%rip)      # 0x113a8
movq %r14, 0xa972(%rip)      # 0x113b0
movl $0x1, 0xa970(%rip)      # 0x113b8
callq 0x6aa4
testb %al, %al
je 0x6a6a
movl 0xa961(%rip), %eax      # 0x113b8
xorl %ebx, %ebx
cmpl 0xa949(%rip), %eax      # 0x113a8
jge 0x6a6a
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x6b48
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/util.c
// Function: expr
static bool
expr(void)
{
	bool re;

	re = e1();
	if (equal(nxtarg(RETERR), "-o"))
		return re | expr();
	iap--;
	return re;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
pushq $0x1
popq %rbp
leaq 0x172e(%rip), %r14      # 0x81e9
leaq 0x1c2d(%rip), %r15      # 0x86ef
leaq 0x1c23(%rip), %r12      # 0x86ec
movb $0x1, %r13b
movl %ebp, %edi
callq 0x6d38
movq %rax, %rdi
movq %r14, %rsi
callq 0x6d0f
testb %al, %al
je 0x6aeb
callq 0x6de6
xorb $0x1, %al
jmp 0x6af6
decl 0xa8c7(%rip)            # 0x113b8
callq 0x6de6
andb %al, %r13b
movl %ebp, %edi
callq 0x6d38
movq %rax, %rdi
movq %r15, %rsi
callq 0x6d0f
testb %al, %al
jne 0x6acc
decl 0xa8a3(%rip)            # 0x113b8
movl %ebp, %edi
callq 0x6d38
movq %rax, %rdi
movq %r12, %rsi
callq 0x6d0f
orb %r13b, %bl
testb %al, %al
jne 0x6ac9
decl 0xa884(%rip)            # 0x113b8
andb $0x1, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/util.c
// Function: nxtarg
static char *
nxtarg(bool reterr)
{
	char *nap;

	if (iap < 1 || iap > iac)	/* should never (but can) be true */
		err(FC_ERR, FMT2S, getmyname(), ERR_AVIINVAL);

	if (iap == iac) {
		if (reterr) {
			iap++;
			return NULL;
		}
		err(FC_ERR, FMT3S, getmyname(), iav[iap - 1], ERR_ARGUMENT);
	}
	nap = iav[iap];
	iap++;
	return nap;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
movl 0xa677(%rip), %edx      # 0x113b8
testl %edx, %edx
setle %al
movl 0xa65c(%rip), %ecx      # 0x113a8
cmpl %ecx, %edx
setg %sil
orb %al, %sil
cmpb $0x1, %sil
jne 0x6d87
callq 0x6455
leaq 0x15d6(%rip), %rsi      # 0x833d
leaq 0x1a11(%rip), %rcx      # 0x877f
pushq $0x7c
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6218
movl 0xa637(%rip), %edx      # 0x113b8
movl 0xa621(%rip), %ecx      # 0x113a8
cmpl %ecx, %edx
jne 0x6dcc
testb %bl, %bl
je 0x6d93
xorl %eax, %eax
jmp 0x6ddc
callq 0x6455
movq 0xa611(%rip), %rcx      # 0x113b0
movslq 0xa612(%rip), %rdx      # 0x113b8
movq -0x8(%rcx,%rdx,8), %rcx
leaq 0x1587(%rip), %rsi      # 0x8339
leaq 0x19d9(%rip), %r8       # 0x8792
pushq $0x7c
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6218
movl 0xa5ec(%rip), %edx      # 0x113b8
movq 0xa5dd(%rip), %rax      # 0x113b0
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
movl %edx, %ecx
incl %ecx
movl %ecx, 0xa5d4(%rip)      # 0x113b8
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/util.c
// Function: ifaccess
static bool
ifaccess(const char *file, int mode)
{
	struct stat sb;
	bool ra;

	if (file == NULL || *file == EOS)
		return false;

	ra = access(file, mode) == 0;

	if (ra && mode == X_OK && sheuid == 0) {
		if (stat(file, &sb) < 0)
			ra = false;
		else if (S_ISDIR(sb.st_mode))
			ra = true;
		else
			ra = (sb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)) != 0;
	}

	return ra;
}

// Assembly:
testq %rdi, %rdi
je 0x728c
pushq %rbp
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x728f
movl %esi, %ebp
movq %rbx, %rdi
callq 0x2330
movl %eax, %ecx
testl %eax, %eax
sete %al
cmpl $0x1, %ebp
jne 0x7291
testl %ecx, %ecx
jne 0x7291
leaq 0x5014(%rip), %rcx      # 0xc26c
cmpl $0x0, (%rcx)
jne 0x7291
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x2270
testl %eax, %eax
js 0x728f
movl 0x20(%rsp), %ecx
movl %ecx, %edx
andl $0xf000, %edx           # imm = 0xF000
movb $0x1, %al
cmpl $0x4000, %edx           # imm = 0x4000
je 0x7291
testb $0x49, %cl
setne %al
jmp 0x7291
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/util.c
// Function: ifstat1
static bool
ifstat1(const char *file, mode_t type)
{
	struct stat sb;
	bool rs;

	if (file == NULL || *file == EOS)
		return false;

	if (type == S_IFLNK) {
		if (lstat(file, &sb) < 0)
			rs = false;
		else
			rs = (sb.st_mode & S_IFMT) == type;
	} else if (stat(file, &sb) < 0)
		rs = false;
	else if (type == S_IFDIR || type == S_IFREG)
		rs = (sb.st_mode & S_IFMT) == type;
	else if (type == F_GZ)
		rs = sb.st_size > (off_t)0;
	else
		rs = false;

	return rs;
}

// Assembly:
testq %rdi, %rdi
je 0x72d3
cmpb $0x0, (%rdi)
je 0x72d3
pushq %rbx
subq $0x90, %rsp
movl %esi, %ebx
movq %rsp, %rsi
cmpl $0xa000, %ebx           # imm = 0xA000
jne 0x72d6
callq 0x2210
testl %eax, %eax
js 0x7304
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rsp), %eax
cmpl $0xa000, %eax           # imm = 0xA000
jmp 0x72ff
xorl %eax, %eax
retq
callq 0x2270
testl %eax, %eax
js 0x7304
cmpl $0x1, %ebx
je 0x730f
cmpl $0x8000, %ebx           # imm = 0x8000
je 0x72f4
cmpl $0x4000, %ebx           # imm = 0x4000
jne 0x7304
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rsp), %eax
cmpl %ebx, %eax
sete %al
jmp 0x7306
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
retq
cmpq $0x0, 0x30(%rsp)
setg %al
jmp 0x7306
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/util.c
// Function: ifstat2
static bool
ifstat2(const char *file1, const char *file2, int act)
{
	struct stat sb1, sb2;
	bool rs;

	if (file1 == NULL || *file1 == EOS)
		return false;
	if (file2 == NULL || *file2 == EOS)
		return false;

	if (stat(file1, &sb1) < 0)
		return false;
	if (stat(file2, &sb2) < 0)
		return false;

	if (act == F_OT)
		rs = sb1.st_mtime < sb2.st_mtime;
	else if (act == F_NT)
		rs = sb1.st_mtime > sb2.st_mtime;
	else if (act == F_EF)
		rs = sb1.st_dev == sb2.st_dev && sb1.st_ino == sb2.st_ino;
	else
		rs = false;

	return rs;
}

// Assembly:
testq %rdi, %rdi
je 0x737e
pushq %r14
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %r14
xorl %eax, %eax
testq %rsi, %rsi
je 0x7383
cmpb $0x0, (%rdi)
je 0x7383
cmpb $0x0, (%r14)
je 0x7381
movl %edx, %ebx
leaq 0x98(%rsp), %rsi
callq 0x2270
testl %eax, %eax
js 0x7381
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x2270
testl %eax, %eax
js 0x7381
cmpl $0x3, %ebx
je 0x738e
cmpl $0x2, %ebx
jne 0x73a0
movq 0xf0(%rsp), %rax
cmpq 0x60(%rsp), %rax
setl %al
jmp 0x7383
xorl %eax, %eax
retq
xorl %eax, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r14
retq
movq 0xf0(%rsp), %rax
cmpq 0x60(%rsp), %rax
setg %al
jmp 0x7383
movq 0x98(%rsp), %rax
xorq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
xorq 0xa0(%rsp), %rcx
orq %rax, %rcx
sete %al
jmp 0x7383
nop
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/memory.c
// Function: smalloc
void* smalloc(size_t size, const char* fmt, ...)
{
    if (size <= 0)
        return NULL;

    void*   buf = NULL;

    va_list args;

    if ((buf = malloc(size)) == NULL) {
        if (fmt != NULL) {
            va_start(args, fmt);
            vfprintf(stderr, fmt, args);
            va_end(args);
        } else {
            fprintf(stderr, "%s: %d: neo_malloc(): %s\n",
                    __FILE__, __LINE__, strerror(errno));
        }

        return NULL;
    }
    memset(buf, '\0', size);

    return buf;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x11c5
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
testq %rdi, %rdi
je 0x121b
movq %rsi, %r14
movq %rdi, %rsi
pushq $0x1
popq %rdi
callq 0x1050
movq %rax, %rbx
testq %rax, %rax
jne 0x121d
testq %r14, %r14
jne 0x122b
movq 0x2e0c(%rip), %rax      # 0x3ff8
movq (%rax), %r14
callq 0x1040
movl (%rax), %edi
callq 0x1090
leaq 0xdfe(%rip), %rsi       # 0x2000
leaq 0xe11(%rip), %rdx       # 0x201a
pushq $0x24
popq %rcx
movq %r14, %rdi
movq %rax, %r8
xorl %eax, %eax
callq 0x1060
jmp 0x121d
xorl %ebx, %ebx
movq %rbx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq 0x2da1(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq %r14, %rsi
callq 0x1080
jmp 0x121d