LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libvterm/src/vterm.c
// Function: vterm_free
void vterm_free(VTerm *vt)
{
  if(vt->screen)
    vterm_screen_free(vt->screen);

  if(vt->state)
    vterm_state_free(vt->state);

  vterm_allocator_free(vt, vt->outbuffer);
  vterm_allocator_free(vt, vt->tmpbuffer);

  vterm_allocator_free(vt, vt);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x130(%rdi), %rdi
testq %rdi, %rdi
je 0xace0
callq 0x47ec
movq 0x128(%rbx), %rdi
testq %rdi, %rdi
je 0xacf1
callq 0x7090
movq 0x100(%rbx), %rdi
movq (%rbx), %rax
movq 0x8(%rbx), %rsi
callq *0x8(%rax)
movq 0x118(%rbx), %rdi
movq (%rbx), %rax
movq 0x8(%rbx), %rsi
callq *0x8(%rax)
movq (%rbx), %rax
movq 0x8(%rbx), %rsi
movq 0x8(%rax), %rax
movq %rbx, %rdi
popq %rbx
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libvterm/src/vterm.c
// Function: vterm_get_size
void vterm_get_size(const VTerm *vt, int *rowsp, int *colsp)
{
  if(rowsp)
    *rowsp = vt->rows;
  if(colsp)
    *colsp = vt->cols;
}

// Assembly:
testq %rsi, %rsi
je 0xad41
movl 0x10(%rdi), %eax
movl %eax, (%rsi)
testq %rdx, %rdx
je 0xad4b
movl 0x14(%rdi), %eax
movl %eax, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libvterm/src/vterm.c
// Function: vterm_set_size
void vterm_set_size(VTerm *vt, int rows, int cols)
{
  if(rows < 1 || cols < 1)
    return;

  vt->rows = rows;
  vt->cols = cols;

  if(vt->parser.callbacks && vt->parser.callbacks->resize)
    (*vt->parser.callbacks->resize)(rows, cols, vt->parser.cbdata);
}

// Assembly:
testl %esi, %esi
setle %al
testl %edx, %edx
setle %cl
orb %al, %cl
jne 0xad85
movl %esi, 0x10(%rdi)
movl %edx, 0x14(%rdi)
movq 0xd8(%rdi), %rax
testq %rax, %rax
je 0xad85
movq 0x48(%rax), %rcx
testq %rcx, %rcx
je 0xad85
movq 0xe0(%rdi), %rax
movl %esi, %edi
movl %edx, %esi
movq %rax, %rdx
jmpq *%rcx
retq
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libvterm/src/vterm.c
// Function: vterm_push_output_sprintf_ctrl
INTERNAL void vterm_push_output_sprintf_ctrl(VTerm *vt, unsigned char ctrl, const char *fmt, ...)
{
  size_t cur;

  if(ctrl >= 0x80 && !vt->mode.ctrl8bit)
    cur = snprintf(vt->tmpbuffer, vt->tmpbuffer_len,
        ESC_S "%c", ctrl - 0x40);
  else
    cur = snprintf(vt->tmpbuffer, vt->tmpbuffer_len,
        "%c", ctrl);

  if(cur >= vt->tmpbuffer_len)
    return;

  va_list args;
  va_start(args, fmt);
  cur += vsnprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,
      fmt, args);
  va_end(args);

  if(cur >= vt->tmpbuffer_len)
    return;

  vterm_push_output_bytes(vt, vt->tmpbuffer, cur);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rcx, %r10
movq %rdx, %r14
movl %esi, %ecx
movq %rdi, %rbx
movq %r10, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0xaf72
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)
testb %cl, %cl
jns 0xaf96
testb $0x2, 0x18(%rbx)
jne 0xaf96
movq 0x118(%rbx), %rdi
movq 0x120(%rbx), %rsi
addl $-0x40, %ecx
leaq 0x131b(%rip), %rdx      # 0xc2af
jmp 0xafab
movq 0x118(%rbx), %rdi
movq 0x120(%rbx), %rsi
leaq 0x1305(%rip), %rdx      # 0xc2b0
xorl %eax, %eax
callq 0x20e0
movslq %eax, %r15
cmpq %r15, 0x120(%rbx)
jbe 0xb062
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rcx)
movq 0x118(%rbx), %rdi
addq %r15, %rdi
movq 0x120(%rbx), %rsi
subq %r15, %rsi
movq %r14, %rdx
callq 0x2080
movslq %eax, %r14
addq %r15, %r14
cmpq 0x120(%rbx), %r14
jae 0xb062
movq 0xf0(%rbx), %rax
movq 0x118(%rbx), %rsi
testq %rax, %rax
je 0xb036
movq 0xf8(%rbx), %rdx
movq %rsi, %rdi
movq %r14, %rsi
callq *%rax
jmp 0xb062
movq 0x108(%rbx), %rax
movq 0x110(%rbx), %rdi
subq %rdi, %rax
cmpq %r14, %rax
jb 0xb062
addq 0x100(%rbx), %rdi
movq %r14, %rdx
callq 0x2120
addq %r14, 0x110(%rbx)
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libvterm/src/vterm.c
// Function: vterm_push_output_sprintf_str
INTERNAL void vterm_push_output_sprintf_str(VTerm *vt, unsigned char ctrl, bool term, const char *fmt, ...)
{
  size_t cur = 0;

  if(ctrl) {
    if(ctrl >= 0x80 && !vt->mode.ctrl8bit)
      cur = snprintf(vt->tmpbuffer, vt->tmpbuffer_len,
          ESC_S "%c", ctrl - 0x40);
    else
      cur = snprintf(vt->tmpbuffer, vt->tmpbuffer_len,
          "%c", ctrl);

    if(cur >= vt->tmpbuffer_len)
      return;
  }

  va_list args;
  va_start(args, fmt);
  cur += vsnprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,
      fmt, args);
  va_end(args);

  if(cur >= vt->tmpbuffer_len)
    return;

  if(term) {
    cur += snprintf(vt->tmpbuffer + cur, vt->tmpbuffer_len - cur,
        vt->mode.ctrl8bit ? "\x9C" : ESC_S "\\"); // ST

    if(cur >= vt->tmpbuffer_len)
      return;
  }

  vterm_push_output_bytes(vt, vt->tmpbuffer, cur);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rcx, %r14
movl %edx, %ebp
movq %rdi, %rbx
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0xb0c9
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)
testl %esi, %esi
je 0xb122
movzbl %sil, %ecx
testb %cl, %cl
jns 0xb0f5
testb $0x2, 0x18(%rbx)
jne 0xb0f5
movq 0x118(%rbx), %rdi
movq 0x120(%rbx), %rsi
addl $-0x40, %ecx
leaq 0x11bc(%rip), %rdx      # 0xc2af
jmp 0xb10a
movq 0x118(%rbx), %rdi
movq 0x120(%rbx), %rsi
leaq 0x11a6(%rip), %rdx      # 0xc2b0
xorl %eax, %eax
callq 0x20e0
movslq %eax, %r15
cmpq %r15, 0x120(%rbx)
ja 0xb125
jmp 0xb206
xorl %r15d, %r15d
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000020, %rax     # imm = 0x3000000020
movq %rax, (%rcx)
movq 0x118(%rbx), %rdi
addq %r15, %rdi
movq 0x120(%rbx), %rsi
subq %r15, %rsi
movq %r14, %rdx
callq 0x2080
movslq %eax, %r14
addq %r15, %r14
movq 0x120(%rbx), %rsi
subq %r14, %rsi
jbe 0xb206
testb %bpl, %bpl
je 0xb1b6
movq 0x118(%rbx), %rdi
addq %r14, %rdi
testb $0x2, 0x18(%rbx)
leaq 0x18c4(%rip), %rax      # 0xca5a
leaq 0x18ba(%rip), %rdx      # 0xca57
cmoveq %rax, %rdx
xorl %eax, %eax
callq 0x20e0
cltq
addq %rax, %r14
cmpq 0x120(%rbx), %r14
jae 0xb206
movq 0xf0(%rbx), %rax
movq 0x118(%rbx), %rsi
testq %rax, %rax
je 0xb1da
movq 0xf8(%rbx), %rdx
movq %rsi, %rdi
movq %r14, %rsi
callq *%rax
jmp 0xb206
movq 0x108(%rbx), %rax
movq 0x110(%rbx), %rdi
subq %rdi, %rax
cmpq %r14, %rax
jb 0xb206
addq 0x100(%rbx), %rdi
movq %r14, %rdx
callq 0x2120
addq %r14, 0x110(%rbx)
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/neovim[P]libvterm/src/vterm.c
// Function: vterm_copy_cells
void vterm_copy_cells(VTermRect dest,
    VTermRect src,
    void (*copycell)(VTermPos dest, VTermPos src, void *user),
    void *user)
{
  int downward  = src.start_row - dest.start_row;
  int rightward = src.start_col - dest.start_col;

  int init_row, test_row, init_col, test_col;
  int inc_row, inc_col;

  if(downward < 0) {
    init_row = dest.end_row - 1;
    test_row = dest.start_row - 1;
    inc_row = -1;
  }
  else /* downward >= 0 */ {
    init_row = dest.start_row;
    test_row = dest.end_row;
    inc_row = +1;
  }

  if(rightward < 0) {
    init_col = dest.end_col - 1;
    test_col = dest.start_col - 1;
    inc_col = -1;
  }
  else /* rightward >= 0 */ {
    init_col = dest.start_col;
    test_col = dest.end_col;
    inc_col = +1;
  }

  VTermPos pos;
  for(pos.row = init_row; pos.row != test_row; pos.row += inc_row)
    for(pos.col = init_col; pos.col != test_col; pos.col += inc_col) {
      VTermPos srcpos = { pos.row + downward, pos.col + rightward };
      (*copycell)(pos, srcpos, user);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r12
movq %rdi, %rax
shrq $0x20, %rax
movq %rsi, %r10
shrq $0x20, %r10
subl %edi, %edx
subl %esi, %r12d
leal -0x1(%rax), %ebx
leal -0x1(%rdi), %ebp
movq %rdx, 0x20(%rsp)
testl %edx, %edx
cmovnsl %eax, %ebp
cmovnsl %edi, %ebx
leal -0x1(%r10), %eax
testl %r12d, %r12d
cmovnsl %esi, %eax
movl %eax, 0xc(%rsp)
leal -0x1(%rsi), %r13d
cmovnsl %r10d, %r13d
movq %rbx, 0x10(%rsp)
movl %ebp, 0x1c(%rsp)
cmpl %ebp, %ebx
je 0xb4f8
movq %r9, %r15
movq 0x20(%rsp), %rax
sarl $0x1f, %eax
orl $0x1, %eax
movl %eax, 0x18(%rsp)
movl %r12d, %ebx
sarl $0x1f, %ebx
orl $0x1, %ebx
cmpl %r13d, 0xc(%rsp)
je 0xb4e4
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rdx
addl %edx, %eax
movq %rax, 0x30(%rsp)
movl %edx, %eax
movq %rax, 0x28(%rsp)
movl 0xc(%rsp), %eax
movl %eax, %r14d
leal (%r12,%r14), %esi
movq %r14, %rdi
shlq $0x20, %rdi
addq 0x28(%rsp), %rdi
shlq $0x20, %rsi
addq 0x30(%rsp), %rsi
movq %r15, %rdx
movq %r8, %rbp
callq *%r8
movq %rbp, %r8
addl %ebx, %r14d
cmpl %r14d, %r13d
jne 0xb4b7
movq 0x10(%rsp), %rax
addl 0x18(%rsp), %eax
movq %rax, 0x10(%rsp)
cmpl 0x1c(%rsp), %eax
jne 0xb491
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movl $0x4, %edi
callq 0x2340
leaq -0x1001(%rax), %rcx
leal -0x1(%rax), %r14d
cmpq $-0xfed, %rcx           # imm = 0xF013
movl $0x13, %ebx
cmovael %r14d, %ebx
cmpl $0xb, %ebx
jl 0x2ba2
movl %ebx, %edi
callq 0x21d0
leal -0x1(%rbx), %eax
cmpl $0xb, %ebx
movl %eax, %ebx
ja 0x2b89
movl $0xa, %r14d
jmp 0x2ba7
cmpl $0x4, %eax
jle 0x2bbc
incl %r14d
leal -0x2(%r14), %edi
callq 0x21d0
decl %r14d
cmpl $0x4, %r14d
ja 0x2baa
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x69bb(%rip), %r13      # 0x95a5
leaq 0x6517(%rip), %rbp      # 0x9108
leaq 0x69c6(%rip), %r14      # 0x95be
movq %rsp, %r15
leaq 0x69ce(%rip), %r12      # 0x95d0
movl (%rbx), %eax
cmpl $0x5, %eax
jg 0x2cb0
decl %eax
cmpl $0x4, %eax
ja 0x2c5f
movslq (%rbp,%rax,4), %rax
addq %rbp, %rax
movq %r13, %rdi
jmpq *%rax
cmpb $0x0, 0x9620(%rip)      # 0xc248
movq %r14, %rdi
jne 0x2c52
movl $0x3, (%rbx)
movq %r14, %rdi
jmp 0x2c52
movq %r15, %rdi
leaq 0x6995(%rip), %rsi      # 0x95d7
jmp 0x2c4a
movq %r15, %rdi
movq %r12, %rsi
callq 0x66ab
movq %r15, %rdi
incl (%rbx)
callq 0x673b
testb %al, %al
je 0x2c02
jmp 0x2cb0
andb $-0x9, 0x95d6(%rip)     # 0xc23c
jmp 0x2cb0
movl 0xe70e(%rip), %edi      # 0x1137c
xorl %esi, %esi
callq 0x2160
cmpl $-0x1, %eax
jne 0x2ca7
callq 0x6a87
movq %rax, %r14
callq 0x2070
movl (%rax), %edi
callq 0x2380
leaq 0x66a2(%rip), %rsi      # 0x9337
movl $0x2, %edi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x6840
andb $-0x9, 0x958e(%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_O3/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 %r12
pushq %rbx
subq $0x90, %rsp
movl %edi, %ebx
movq %rsp, %rsi
xorl %edi, %edi
callq 0x2390
testl %eax, %eax
js 0x3068
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rsp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x3068
xorl %edi, %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x21a0
testq %rax, %rax
jne 0x3068
callq 0x32da
cmpl $0x23, %eax
jne 0x305d
callq 0x32da
cmpl $0x21, %eax
jne 0x305d
movl $0x7fe, %r14d           # imm = 0x7FE
callq 0x32da
cmpl $-0x1, %eax
je 0x3068
cmpl $0xa, %eax
je 0x3068
decq %r14
jne 0x3025
callq 0x6a87
leaq 0x62f2(%rip), %rsi      # 0x9337
leaq 0x6205(%rip), %rcx      # 0x9251
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq %rax, %rdx
xorl %eax, %eax
callq 0x6840
jmp 0x3068
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21a0
movb $0x0, 0x9201(%rip)      # 0xc270
xorl %ebp, %ebp
leaq 0x61d6(%rip), %r15      # 0x924e
leaq 0x61cc(%rip), %r12      # 0x924b
leaq 0x655f(%rip), %r14      # 0x95e5
movl 0x91b0(%rip), %eax      # 0xc23c
andl $0x1f, %eax
cmpl $0x4, %eax
jne 0x30b2
cmpl $0x0, 0x91d1(%rip)      # 0xc26c
movq %r15, %rdx
je 0x30a3
movq %r12, %rdx
movl $0x2, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x69fa
callq 0x2cc2
cmpl $-0x1, %eax
je 0x30e0
testb %bl, %bl
je 0x30c9
cmpb $0x0, 0x91a9(%rip)      # 0xc270
jne 0x30f0
movb $0x1, %bpl
cmpb $0x1, 0x9175(%rip)      # 0xc248
jne 0x3086
cmpl $0x0, 0x9174(%rip)      # 0xc250
je 0x3086
jmp 0x30f0
testb $0x1, %bpl
jne 0x30f0
movl $0x0, 0x9178(%rip)      # 0xc268
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x9141(%rip)      # 0xc248
jne 0x3163
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rdi, %rbx
leaq 0x64d6(%rip), %r12      # 0x95f7
leaq 0x64e9(%rip), %r14      # 0x9611
movq %rsp, %r15
movl (%rbx), %eax
cmpl $0x3, %eax
jg 0x3186
movl $0x2, %ecx
movq %r12, %rdi
cmpl $0x1, %eax
je 0x3156
cmpl $0x2, %eax
jne 0x316b
movq %r15, %rdi
movq %r14, %rsi
callq 0x66ab
movl (%rbx), %ecx
incl %ecx
movq %r15, %rdi
movl %ecx, (%rbx)
callq 0x673b
testb %al, %al
je 0x312b
jmp 0x3186
andb $-0x9, 0x90d2(%rip)     # 0xc23c
retq
cmpl $0x3, %eax
jne 0x317f
andb $-0x9, 0x90c5(%rip)     # 0xc23c
movl $0x4, (%rbx)
jmp 0x3186
andb $-0x9, 0x90b6(%rip)     # 0xc23c
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0xb961(%rip), %rbx      # 0xeb08
testq %rdi, %rdi
je 0x31e6
testq %rbx, %rbx
je 0x321a
movq %rdi, %r15
movb (%rdi), %bpl
movq %rbx, %r13
movq %rbx, %r14
movq 0x8(%r14), %r12
cmpb (%r12), %bpl
jne 0x31d6
movq %r15, %rdi
movq %r12, %rsi
callq 0x2230
testl %eax, %eax
je 0x3229
movq %r14, %r13
movq (%r14), %rax
movq %rax, %r14
testq %rax, %rax
jne 0x31bd
jmp 0x321a
testq %rbx, %rbx
je 0x321a
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x31f9
callq 0x2050
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x3207
callq 0x2050
movq (%rbx), %r14
movq %rbx, %rdi
callq 0x2050
movq %r14, %rbx
testq %r14, %r14
jne 0x31eb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq %rbx, %r14
movq (%r14), %rax
leaq 0xb8d2(%rip), %rcx      # 0xeb08
cmoveq %rcx, %r13
movq %rax, (%r13)
movq %r12, %rdi
callq 0x2050
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x3254
callq 0x2050
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8984(%rip), %r14      # 0xbc00
leaq 0x8abd(%rip), %r15      # 0xbd40
movq %r15, %rax
subq %r14, %rax
movq %rax, %rcx
sarq $0x4, %rcx
shrq $0x3f, %rax
addq %rcx, %rax
andq $-0x2, %rax
leaq (%r14,%rax,8), %r12
movq (%r12), %rsi
movq %rbx, %rdi
callq 0x2230
testl %eax, %eax
je 0x32c9
jg 0x32b6
movq %r12, %r15
jmp 0x32bd
addq $0x10, %r12
movq %r12, %r14
cmpq %r15, %r14
jb 0x3283
movl $0x14, %eax
jmp 0x32ce
movl 0x8(%r12), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x8f92(%rip), %rax      # 0xc278
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpq $-0x1, %rax
je 0x337b
testq %rax, %rax
jne 0x332a
movq 0x8f3f(%rip), %rax      # 0xc240
cmpq $-0x1, %rax
je 0x337b
testq %rax, %rax
jne 0x334d
leaq 0xf(%rsp), %rsi
movl $0x1, %edx
xorl %edi, %edi
callq 0x2200
cmpq $0x1, %rax
jne 0x337b
movzbl 0xf(%rsp), %ebx
jmp 0x337b
leaq 0x1(%rax), %rcx
movq %rcx, 0x8f43(%rip)      # 0xc278
movzbl (%rax), %eax
xorl %edx, %edx
cmpb $0x1, %al
sbbq %rdx, %rdx
orq %rcx, %rdx
testb %al, %al
movq %rdx, 0x8f2d(%rip)      # 0xc278
jmp 0x3370
movq %rax, %rcx
incq %rcx
movq %rcx, 0x8ee6(%rip)      # 0xc240
movzbl (%rax), %eax
xorl %edx, %edx
cmpb $0x1, %al
sbbq %rdx, %rdx
orq %rcx, %rdx
testb %al, %al
movq %rdx, 0x8ed0(%rip)      # 0xc240
movl $0xa, %ecx
cmovnel %eax, %ecx
movzbl %cl, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3d6c
pushq %rbx
movq %rdi, %rbx
movl 0x38(%rdi), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x3d6d
cmpl $0x3, %eax
je 0x3d80
cmpl $0x4, %eax
jne 0x3da5
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x3d58
callq 0x2050
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x3d66
callq 0x2050
movq 0x10(%rbx), %rdi
jmp 0x3d79
retq
movq (%rbx), %rdi
callq 0x3d2c
movq 0x8(%rbx), %rdi
callq 0x3d2c
jmp 0x3da5
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x3d8e
callq 0x2050
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x3d9c
callq 0x2050
movq 0x28(%rbx), %rdi
callq 0x4a67
movq %rbx, %rdi
popq %rbx
jmp 0x2050
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0xa22d(%rip), %r15      # 0xeb08
testq %r15, %r15
je 0x4907
movq %rdi, %r14
movb (%rdi), %bpl
xorl %ebx, %ebx
movq 0x8(%r15), %rsi
cmpb (%rsi), %bpl
jne 0x48fd
movq %r14, %rdi
callq 0x2230
testl %eax, %eax
je 0x490b
movq (%r15), %r15
testq %r15, %r15
jne 0x48e8
jmp 0x490f
xorl %ebx, %ebx
jmp 0x490f
movq 0x10(%r15), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, 0x7946(%rip)      # 0xc278
leaq 0xa1d7(%rip), %rax      # 0xeb10
movq %rax, 0x8140(%rip)      # 0xca80
leaq 0xa9c4(%rip), %rax      # 0xf30b
movq %rax, 0x813a(%rip)      # 0xca88
leaq 0xa9bb(%rip), %rbx      # 0xf310
movq %rbx, 0xa134(%rip)      # 0xea90
leaq 0xc985(%rip), %rax      # 0x112e8
movq %rax, 0xa12e(%rip)      # 0xea98
movb $0x0, 0xa12f(%rip)      # 0xeaa0
movq $0x0, 0xa12c(%rip) # 0xeaa8
movl $0x0, 0xa12a(%rip)      # 0xeab0
movq 0x80f3(%rip), %r14      # 0xca80
callq 0x3383
cmpl $-0x1, %eax
je 0x49d1
cmpb $0xa, (%r14)
jne 0x4986
movq 0xa0ec(%rip), %rax      # 0xea90
movq $0x0, (%rax)
cmpb $0x1, 0xa0ee(%rip)      # 0xeaa0
je 0x49df
subq %rbx, %rax
cmpq $0x9, %rax
jl 0x49d1
movq 0xa94c(%rip), %rax      # 0xf310
movzbl (%rax), %eax
cmpl $0x26, %eax
je 0x49d1
cmpl $0x3b, %eax
jne 0x49fe
leaq 0x488d(%rip), %rax      # 0x9265
movq %rax, 0xa0c9(%rip)      # 0xeaa8
movq $0x0, 0x788e(%rip) # 0xc278
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x88(%rsp), %r14
movq %r14, %rdi
callq 0x2290
leaq 0x8(%rsp), %r15
movl $0x2, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2040
movq 0xa066(%rip), %rsi      # 0xea90
movq %rbx, %rdi
callq 0x35ef
movq %rax, %r14
xorl %r12d, %r12d
movl $0x2, %edi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2040
cmpb $0x0, 0xa052(%rip)      # 0xeaa0
cmovneq %r12, %rbx
movq %r14, %rdi
callq 0x3d2c
movq $0x0, 0x7813(%rip) # 0xc278
jmp 0x49ec
// File: /workspace/github_c_makefile_star2_O3/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 0x4aa7
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x4a98
leaq 0x8(%rbx), %r14
callq 0x2050
movq $0x0, -0x8(%r14)
movq (%r14), %rdi
addq $0x8, %r14
testq %rdi, %rdi
jne 0x4a7f
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x21, %ecx
movabsq $0x200000020000100, %rdx # imm = 0x200000020000100
movb (%rax), %sil
movzbl %sil, %edi
leal -0x22(%rdi), %r8d
cmpl $0x3a, %r8d
ja 0x5c33
btq %r8, %rcx
jae 0x5c1c
incq %rax
movb (%rax), %dil
cmpb %sil, %dil
je 0x5c37
incq %rax
testb %dil, %dil
jne 0x5c0a
jmp 0x5c3c
cmpq $0x3a, %r8
jne 0x5c2d
cmpb $0x0, 0x1(%rax)
je 0x5c3c
incq %rax
jmp 0x5c37
btq %r8, %rdx
jb 0x5c3e
testl %edi, %edi
je 0x5c3c
incq %rax
jmp 0x5bf0
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xb6c8(%rip), %r14      # 0x11318
cmpq 0xb6c9(%rip), %r14      # 0x11320
jne 0x5cea
movl 0x6599(%rip), %eax      # 0xc1fc
leal (%rax,%rax), %r15d
movl %r15d, 0x658e(%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 0x5ccd
callq 0x2100
movl %eax, %ebp
callq 0x6a9d
cmpl %eax, %ebp
movl $0x2, %eax
movl $0x7c, %ebp
cmovel %eax, %ebp
callq 0x6a87
leaq 0x3684(%rip), %rsi      # 0x9337
leaq 0x3617(%rip), %rcx      # 0x92d1
movl %ebp, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6840
movl 0x652f(%rip), %r15d     # 0xc1fc
addq %rbx, %r14
movq %r14, 0xb641(%rip)      # 0x11318
shll $0x7, %r15d
leaq (%r14,%r15,8), %rax
addq $-0x8, %rax
movq %rax, 0xb636(%rip)      # 0x11320
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movb (%rax), %cl
movzbl %cl, %esi
cmpl $0x26, %esi
jle 0x5d2d
cmpl $0x27, %esi
je 0x5d32
cmpl $0x5c, %esi
jne 0x5d69
movb 0x1(%rax), %cl
testb %cl, %cl
je 0x5d6f
incq %rax
jmp 0x5d69
cmpl $0x22, %esi
jne 0x5d65
movb 0x1(%rax), %sil
incq %rax
cmpb %cl, %sil
je 0x5d6f
testb %sil, %sil
je 0x5d81
leaq 0x1(%rdx), %rdi
movb %sil, (%rsp,%rdx)
movb 0x1(%rax), %sil
incq %rax
cmpb %cl, %sil
je 0x5d72
cmpq $0x7ff, %rdx            # imm = 0x7FF
movq %rdi, %rdx
jl 0x5d3e
jmp 0x5d72
testl %esi, %esi
je 0x5dcd
movb %cl, (%rsp,%rdx)
incq %rdx
movq %rdx, %rdi
incq %rax
movq %rdi, %rdx
cmpq $0x800, %rdi            # imm = 0x800
jl 0x5d0d
callq 0x2100
movl %eax, %ebp
callq 0x6a9d
cmpl %eax, %ebp
movl $0x2, %eax
movl $0x7c, %ebp
cmovel %eax, %ebp
callq 0x6a87
leaq 0x35eb(%rip), %rsi      # 0x9393
leaq 0x35ef(%rip), %rcx      # 0x939e
movl %ebp, %edi
movq %rax, %rdx
movq %rbx, %r8
xorl %eax, %eax
callq 0x6840
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 0x5dc0
// File: /workspace/github_c_makefile_star2_O3/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 0x5e1e
callq 0x6a87
leaq 0x3530(%rip), %rsi      # 0x9337
leaq 0x359c(%rip), %rcx      # 0x93aa
xorl %r14d, %r14d
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
movq %rax, %rdx
jmp 0x5eca
movb $0x0, (%rsp)
movb (%rdi), %al
testb %al, %al
je 0x5e4b
xorl %ecx, %ecx
cmpq $0xfff, %rcx            # imm = 0xFFF
je 0x5ea3
leaq 0x1(%rcx), %rbx
movb %al, (%rsp,%rcx)
movb 0x1(%rdi,%rcx), %al
movq %rbx, %rcx
testb %al, %al
jne 0x5e2a
leaq (%rsp,%rbx), %rax
jmp 0x5e50
movq %rsp, %rax
xorl %ebx, %ebx
testb %dl, %dl
je 0x5e5a
incq %rbx
movb $0x2f, (%rax)
cmpq $0x1000, %rbx           # imm = 0x1000
jae 0x5ea3
movb (%rsi), %al
incq %rsi
movb %al, (%rsp,%rbx)
incq %rbx
testb %al, %al
jne 0x5e5a
movq 0xb497(%rip), %rax      # 0x11310
addq %rbx, %rax
movq %rax, 0xb48d(%rip)      # 0x11310
cmpq $0x100001, %rax         # imm = 0x100001
jb 0x5edf
callq 0x6a87
leaq 0x34a0(%rip), %rsi      # 0x9337
leaq 0x3523(%rip), %rcx      # 0x93c1
jmp 0x5e0e
callq 0x6a87
movq %rax, %rbx
movl $0x24, %edi
callq 0x2380
leaq 0x347b(%rip), %rsi      # 0x9337
xorl %r14d, %r14d
movl $0xfffffffe, %edi       # imm = 0xFFFFFFFE
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x6840
movq %r14, %rax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x42b3
movq %rax, %r14
movq %rsp, %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x22a0
jmp 0x5ed1
// File: /workspace/github_c_makefile_star2_O3/s3lase[P]v6shell/osh.c
// Function: aalloc
static void
aalloc(const char *name, const char *string)
{
	struct anode *a, *n, *p;
	int d;

	if (name == NULL || *name == EOS || string == NULL || *string == EOS)
		return;

	a = anp;
	if (a == NULL) { /* First */
		anp = aalloc1(name, string);
		return;
	}
	p = a;
	/* ascending ASCII sort */
	while (a != NULL) {
		if ((d = strcmp(name, a->name)) == 0) {
			if (!EQUAL(string, a->string)) {
				/* Replace old string w/ new string. */
				xfree(a->string);
				a->string = xstrdup(string);
			}
			return;
		}
		if (d < 0)
			break;
		p = a;
		a = a->next;
	}
	if (a == NULL) { /* Last */
		p->next = aalloc1(name, string);
		return;
	}

	/* Insert new alias between p and a (ascending ASCII insert). */
	if (a == anp) { /* New Head */
		n = aalloc1(name, string);
		n->next = anp;
		anp = n;
		return;
	}
	n = aalloc1(name, string);
	n->next = p->next;
	p->next = n;
}

// Assembly:
testq %rdi, %rdi
je 0x61c8
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rsi, %rsi
je 0x61ba
movq %rdi, %r14
cmpb $0x0, (%rdi)
je 0x61ba
movb (%rbx), %bpl
testb %bpl, %bpl
je 0x61ba
movq 0x8a07(%rip), %r15      # 0xeb08
testq %r15, %r15
je 0x613e
movq %r15, %rax
movq %r15, %r13
movq %rax, %r12
movq 0x8(%rax), %rsi
movq %r14, %rdi
callq 0x2230
testl %eax, %eax
je 0x6152
js 0x619f
movq (%r12), %rax
movq %r12, %r13
testq %rax, %rax
jne 0x610c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x650f
movq %rax, (%r12)
jmp 0x61ba
movq %r14, %rdi
movq %rbx, %rsi
callq 0x650f
movq %rax, 0x89b8(%rip)      # 0xeb08
jmp 0x61ba
movq 0x10(%r12), %r14
cmpb (%r14), %bpl
jne 0x616b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2230
testl %eax, %eax
je 0x61ba
movq %r14, %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2130
leaq 0x1(%rax), %r14
movq %r14, %rdi
callq 0x42b3
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x22a0
movq %r15, 0x10(%r12)
jmp 0x61ba
movq %r14, %rdi
movq %rbx, %rsi
callq 0x650f
cmpq %r15, %r12
je 0x61c9
movq (%r13), %rcx
movq %rcx, (%rax)
movq %rax, (%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8938(%rip), %rcx      # 0xeb08
movq %rcx, (%rax)
jmp 0x6149
// File: /workspace/github_c_makefile_star2_O3/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 0x65b6
cmpq $0x1, %rsi
jne 0x6600
cmpl $0xf, %edi
je 0x65e6
cmpl $0x3, %edi
je 0x65d0
cmpl $0x2, %edi
jne 0x6600
movl 0xadc3(%rip), %eax      # 0x11374
orl $0x1, %eax
jmp 0x65fa
cmpl $0xf, %edi
je 0x65f1
cmpl $0x3, %edi
je 0x65db
cmpl $0x2, %edi
jne 0x6600
movl 0xada9(%rip), %eax      # 0x11374
andl $-0x2, %eax
jmp 0x65fa
movl 0xad9e(%rip), %eax      # 0x11374
orl $0x2, %eax
jmp 0x65fa
movl 0xad93(%rip), %eax      # 0x11374
andl $-0x3, %eax
jmp 0x65fa
movl 0xad88(%rip), %eax      # 0x11374
orl $0x4, %eax
jmp 0x65fa
movl 0xad7d(%rip), %eax      # 0x11374
andl $-0x5, %eax
movl %eax, 0xad74(%rip)      # 0x11374
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x6626
cmpl $-0x1, %edi
je 0x661c
cmpl $-0x2, %edi
jne 0x6671
movl $0x2, 0x5c4e(%rip)      # 0xc268
jmp 0x666f
movl $0x2, 0x5c42(%rip)      # 0xc268
movl 0x5c10(%rip), %eax      # 0xc23c
testb $0x10, %al
jne 0x6654
testb $0x8, %al
je 0x666b
movl 0x5c2e(%rip), %ecx      # 0xc268
andl $-0x2, %ecx
cmpl $0x82, %ecx
jne 0x666b
xorl %edi, %edi
xorl %esi, %esi
movl $0x2, %edx
popq %rbx
jmp 0x21a0
xorl %edi, %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0x21a0
movb $0x1, 0x5c07(%rip)      # 0xc270
jmp 0x666f
testb $0x4, %al
je 0x6679
popq %rbx
retq
movl %edi, 0x5bf1(%rip)      # 0xc268
jmp 0x668b
testb $0x1, %al
jne 0x668b
xorl %edi, %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0x21a0
callq 0x2100
movl %eax, %ebx
callq 0x6a9d
movl 0x5bcb(%rip), %edi      # 0xc268
cmpl %eax, %ebx
jne 0x66a6
callq 0x2370
callq 0x2080
// File: /workspace/github_c_makefile_star2_O3/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 0x2bec(%rip), %rdi      # 0x92af
callq 0x2030
testq %rax, %rax
je 0x672c
movq %rax, %r15
cmpb $0x0, (%rax)
je 0x672c
leaq 0x2f06(%rip), %rdx      # 0x95e2
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 0x672c
callq 0x6a87
movq %rax, %r12
movl $0x24, %edi
callq 0x2380
leaq 0x2ed7(%rip), %rsi      # 0x95e8
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x6840
movb $0x0, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
subq $0x90, %rsp
testq %rdi, %rdi
je 0x67fc
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x67fc
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x800, %esi            # imm = 0x800
xorl %eax, %eax
callq 0x2320
cmpl $-0x1, %eax
je 0x6830
movl %eax, %ebp
movq %rsp, %rsi
movl %eax, %edi
callq 0x2390
testl %eax, %eax
js 0x6801
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rsp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x6801
movl %ebp, %edi
xorl %esi, %esi
callq 0x2160
cmpl $-0x1, %eax
je 0x67b9
xorl %edi, %edi
movl $0x4, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x20d0
cmpl $-0x1, %eax
jne 0x67e9
callq 0x6a87
movq %rax, %r14
callq 0x2070
movl (%rax), %edi
callq 0x2380
leaq 0x2b5f(%rip), %rsi      # 0x9333
movl $0x2, %edi
movq %r14, %rdx
movq %rbx, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x6840
movl %ebp, %edi
callq 0x21d0
orb $0x8, 0x5a45(%rip)      # 0xc23c
movb $0x1, %r14b
jmp 0x6830
xorl %r14d, %r14d
jmp 0x6830
callq 0x6a87
leaq 0x2b26(%rip), %rsi      # 0x9333
leaq 0x2b2b(%rip), %r8       # 0x933f
xorl %r14d, %r14d
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq %rax, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x6840
movl %ebp, %edi
callq 0x21d0
movl %r14d, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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, 0xa839(%rip)      # 0x11390
jne 0x6b65
leaq -0x42(%rip), %rdi       # 0x6b1e
callq 0x6aac
addl $-0x4, %r14d
cmpl $0x6, %r14d
jae 0x6bc2
movl $0x39, %eax
btl %r14d, %eax
jae 0x6bc2
movl %r14d, %eax
leaq 0x522c(%rip), %rcx      # 0xbdb0
movl 0xa806(%rip), %edx      # 0x11390
leal 0x1(%rdx), %esi
movl %esi, 0xa7fd(%rip)      # 0x11390
movl %edx, 0xa7fb(%rip)      # 0x11394
movl %ebp, %edi
movq %rbx, %rsi
callq *(%rcx,%rax,8)
movl %eax, %ebx
movl 0xa7e7(%rip), %eax      # 0x11390
leal -0x1(%rax), %ecx
movl %ecx, 0xa7de(%rip)      # 0x11390
cmpl 0xa7dc(%rip), %eax      # 0x11394
jle 0x6bf0
movl %ebx, 0xa7d8(%rip)      # 0x11398
jmp 0x6be9
callq 0x6a87
leaq 0x2769(%rip), %rsi      # 0x9337
leaq 0x2aef(%rip), %rcx      # 0x96c4
movl $0x7c, %ebx
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6840
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl 0xa7a2(%rip), %ebx      # 0x11398
jmp 0x6be9
// File: /workspace/github_c_makefile_star2_O3/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 0x6c24
cmpb $0x2d, (%rcx)
jne 0x6c24
cmpb $0x6e, 0x1(%rcx)
jne 0x6c24
cmpb $0x0, 0x2(%rcx)
je 0x6c9a
xorl %ebp, %ebp
testl %eax, %eax
jle 0x6c6a
cltq
leaq (%r14,%rax,8), %r15
leaq 0x2699(%rip), %r12      # 0x92d0
leaq 0x2611(%rip), %r13      # 0x924f
leaq 0x2683(%rip), %rbx      # 0x92c8
movq (%r14), %rdx
addq $0x8, %r14
cmpq %r15, %r14
movq %r12, %rcx
cmovbq %r13, %rcx
movl $0x1, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x69fa
cmpq %r15, %r14
jb 0x6c45
testb %bpl, %bpl
jne 0x6c89
leaq 0x26c5(%rip), %rsi      # 0x933b
leaq 0x2653(%rip), %rdx      # 0x92d0
movl $0x1, %edi
xorl %eax, %eax
callq 0x69fa
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, %bpl
movq %rsi, %r14
movl %edi, %eax
jmp 0x6c26
// File: /workspace/github_c_makefile_star2_O3/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 0x6ab9
movl $0x1, %ebx
cmpl $0x2, %ebp
jl 0x7155
movl %ebp, 0xa286(%rip)      # 0x113a8
movq %r14, 0xa287(%rip)      # 0x113b0
movl $0x1, 0xa285(%rip)      # 0x113b8
callq 0x715c
testb %al, %al
je 0x7155
movl 0xa276(%rip), %eax      # 0x113b8
xorl %ebx, %ebx
cmpl 0xa25e(%rip), %eax      # 0x113a8
jge 0x7155
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x71b4
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
pushq %rax
callq 0x73a5
movl %eax, %ebx
movl $0x1, %edi
callq 0x7415
xorl %ebp, %ebp
testq %rax, %rax
je 0x719e
cmpb $0x2d, (%rax)
jne 0x719e
cmpb $0x6f, 0x1(%rax)
jne 0x719e
cmpb $0x0, 0x2(%rax)
jne 0x719e
orb %bl, %bpl
callq 0x73a5
movl %eax, %ebx
movl $0x1, %edi
callq 0x7415
jmp 0x7172
decl 0xa214(%rip)            # 0x113b8
orb %bl, %bpl
andb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/s3lase[P]v6shell/util.c
// Function: e1
static bool
e1(void)
{
	bool re;

	re = e2();
	if (equal(nxtarg(RETERR), "-a"))
		return re & e1();
	iap--;
	return re;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movb $0x1, %bl
movl $0x1, %edi
callq 0x7415
testq %rax, %rax
je 0x73c4
cmpb $0x21, (%rax)
jne 0x73c4
cmpb $0x0, 0x1(%rax)
je 0x73f6
decl 0x9fee(%rip)            # 0x113b8
callq 0x74c7
movl %eax, %ebp
movl $0x1, %edi
callq 0x7415
testq %rax, %rax
je 0x7403
cmpb $0x2d, (%rax)
jne 0x7403
cmpb $0x61, 0x1(%rax)
jne 0x7403
cmpb $0x0, 0x2(%rax)
jne 0x7403
andb %bpl, %bl
jmp 0x73aa
callq 0x74c7
movl %eax, %ebp
xorb $0x1, %bpl
jmp 0x73d1
decl 0x9faf(%rip)            # 0x113b8
andb %bpl, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x9f9a(%rip), %edx      # 0x113b8
testl %edx, %edx
setle %al
movl 0x9f7f(%rip), %ecx      # 0x113a8
cmpl %ecx, %edx
setg %sil
orb %al, %sil
cmpb $0x1, %sil
jne 0x7466
callq 0x6a87
leaq 0x1ef3(%rip), %rsi      # 0x9337
leaq 0x235a(%rip), %rcx      # 0x97a5
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6840
movl 0x9f58(%rip), %edx      # 0x113b8
movl 0x9f42(%rip), %ecx      # 0x113a8
cmpl %ecx, %edx
jne 0x74ad
testb %bl, %bl
je 0x7472
xorl %eax, %eax
jmp 0x74bd
callq 0x6a87
movq 0x9f32(%rip), %rcx      # 0x113b0
movslq 0x9f33(%rip), %rdx      # 0x113b8
movq -0x8(%rcx,%rdx,8), %rcx
leaq 0x1ea2(%rip), %rsi      # 0x9333
leaq 0x2320(%rip), %r8       # 0x97b8
movl $0x7c, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x6840
movl 0x9f0b(%rip), %edx      # 0x113b8
movq 0x9efc(%rip), %rax      # 0x113b0
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
movl %edx, %ecx
incl %ecx
movl %ecx, 0x9ef3(%rip)      # 0x113b8
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x7a37
cmpb $0x0, (%rdi)
je 0x7a37
pushq %rbx
subq $0x90, %rsp
movl %esi, %ebx
movq %rsp, %rsi
cmpl $0xa000, %ebx           # imm = 0xA000
jne 0x7a3a
callq 0x2210
testl %eax, %eax
js 0x7a68
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rsp), %eax
cmpl $0xa000, %eax           # imm = 0xA000
jmp 0x7a63
xorl %eax, %eax
retq
callq 0x2270
testl %eax, %eax
js 0x7a68
cmpl $0x1, %ebx
je 0x7a73
cmpl $0x8000, %ebx           # imm = 0x8000
je 0x7a58
cmpl $0x4000, %ebx           # imm = 0x4000
jne 0x7a68
movl $0xf000, %eax           # imm = 0xF000
andl 0x18(%rsp), %eax
cmpl %ebx, %eax
sete %al
jmp 0x7a6a
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
retq
cmpq $0x0, 0x30(%rsp)
setg %al
jmp 0x7a6a