LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/orangeduck[P]mpc/tests/ptest.c
// Function: pt_title_case
static void pt_title_case(char* output, const char* input) {

  int space = 1;
  unsigned int i;

  strcpy(output, input);

  for(i = 0; i < strlen(output); i++) {

    if (output[i] == '_' || output[i] == ' ') {
      space = 1;
      output[i] = ' ';
      continue;
    }

    if (space && output[i] >= 'a' && output[i] <= 'z') {
      space = 0;
      output[i] = output[i] - 32;
      continue;
    }

    space = 0;

  }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1060
xorl %r14d, %r14d
pushq $0x1
popq %rbp
movl %ebp, %r15d
movl %r14d, %r14d
movq %rbx, %rdi
callq 0x10b0
cmpq %r14, %rax
jbe 0x41fb
movzbl (%rbx,%r14), %ecx
movb $0x20, %dl
movl %ebp, %eax
cmpl $0x20, %ecx
je 0x41ef
cmpl $0x5f, %ecx
je 0x41ef
xorl %eax, %eax
testl %r15d, %r15d
je 0x41f3
leal -0x61(%rcx), %edx
cmpb $0x19, %dl
ja 0x41f3
addb $-0x20, %cl
xorl %eax, %eax
movl %ecx, %edx
movb %dl, (%rbx,%r14)
incl %r14d
movl %eax, %r15d
jmp 0x41b6
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/orangeduck[P]mpc/tests/ptest.c
// Function: ptest_signal
static void ptest_signal(int sig) {

  test_passing = 0;

  switch( sig ) {
    case SIGFPE:  sprintf(assert_err_buff,
      "        %i. Division by Zero\n", assert_err_num+1);
    break;
    case SIGILL:  sprintf(assert_err_buff,
      "        %i. Illegal Instruction\n", assert_err_num+1);
    break;
    case SIGSEGV: sprintf(assert_err_buff,
      "        %i. Segmentation Fault\n", assert_err_num+1);
    break;
    default: break;
  }

  assert_err_num++;
  strcat(assert_err, assert_err_buff);

  pt_color(RED);
  printf("Failed! \n\n%s\n", assert_err);
  pt_color(DEFAULT);

  puts("    | Stopping Execution.");
  fflush(stdout);
  exit(0);

}

// Assembly:
pushq %rbx
andl $0x0, 0x11b86(%rip)     # 0x161f4
cmpl $0xb, %edi
je 0x468f
cmpl $0x8, %edi
je 0x4686
cmpl $0x4, %edi
jne 0x46ac
leaq 0xab98(%rip), %rsi      # 0xf21c
jmp 0x4696
leaq 0xab71(%rip), %rsi      # 0xf1fe
jmp 0x4696
leaq 0xaba7(%rip), %rsi      # 0xf23d
movl 0x12364(%rip), %edx     # 0x16a00
incl %edx
leaq 0x11b5b(%rip), %rdi     # 0x16200
xorl %eax, %eax
callq 0x1220
incl 0x1234e(%rip)           # 0x16a00
leaq 0x12357(%rip), %rbx     # 0x16a10
leaq 0x11b40(%rip), %rsi     # 0x16200
movq %rbx, %rdi
callq 0x1210
pushq $0x4
popq %rdi
callq 0x470b
leaq 0xa9fb(%rip), %rdi      # 0xf0d2
movq %rbx, %rsi
xorl %eax, %eax
callq 0x10d0
pushq $0x10
popq %rdi
callq 0x470b
leaq 0xab6d(%rip), %rdi      # 0xf25d
callq 0x1070
movq 0x118e4(%rip), %rax     # 0x15fe0
movq (%rax), %rdi
callq 0x11a0
xorl %edi, %edi
callq 0x1230
// File: /workspace/github_c_makefile_star2_O2/orangeduck[P]mpc/tests/regex.c
// Function: test_regex_range
void test_regex_range(void) {

  mpc_parser_t *re0, *re1, *re2, *re3;

  re0 = mpc_re("abg[abcdef]");
  re1 = mpc_re("y*[a-z]");
  re2 = mpc_re("zz(p+)?[A-Z_0\\]123]*");
  re3 = mpc_re("^[^56hy].*$");

  /* TODO: Testing */

  mpc_delete(re0);
  mpc_delete(re1);
  mpc_delete(re2);
  mpc_delete(re3);

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0xaae3(%rip), %rdi      # 0xf718
callq 0x837c
movq %rax, %rbx
leaq 0xaae0(%rip), %rdi      # 0xf724
callq 0x837c
movq %rax, %r14
leaq 0xaad9(%rip), %rdi      # 0xf72c
callq 0x837c
movq %rax, %r15
leaq 0xaadf(%rip), %rdi      # 0xf741
callq 0x837c
movq %rax, %r12
movq %rbx, %rdi
callq 0x68f0
movq %r14, %rdi
callq 0x68f0
movq %r15, %rdi
callq 0x68f0
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x68f0
// File: /workspace/github_c_makefile_star2_O2/orangeduck[P]mpc/tests/regex.c
// Function: test_regex_string
void test_regex_string(void) {

  mpc_parser_t *re0 = mpc_re("\"(\\\\.|[^\"])*\"");

  PT_ASSERT(regex_test_pass(re0, "\"there\"", "\"there\""));
  PT_ASSERT(regex_test_pass(re0, "\"hello\"", "\"hello\""));
  PT_ASSERT(regex_test_pass(re0, "\"i am dan\"", "\"i am dan\""));
  PT_ASSERT(regex_test_pass(re0, "\"i a\\\"m dan\"", "\"i a\\\"m dan\""));

  mpc_delete(re0);

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xaaad(%rip), %rdi      # 0xf74d
callq 0x837c
movq %rax, %rbx
leaq 0xaaac(%rip), %rdx      # 0xf75b
movq %rax, %rdi
movq %rdx, %rsi
callq 0x472c
leaq 0xaaa2(%rip), %rsi      # 0xf763
leaq 0xa691(%rip), %r14      # 0xf359
pushq $0x67
popq %rcx
movl %eax, %edi
movq %r14, %rdx
callq 0x4040
leaq 0xaab6(%rip), %rdx      # 0xf792
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x472c
leaq 0xaaac(%rip), %rsi      # 0xf79a
pushq $0x68
popq %rcx
movl %eax, %edi
movq %r14, %rdx
callq 0x4040
leaq 0xaac7(%rip), %rdx      # 0xf7c9
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x472c
leaq 0xaac0(%rip), %rsi      # 0xf7d4
pushq $0x69
popq %rcx
movl %eax, %edi
movq %r14, %rdx
callq 0x4040
leaq 0xaae1(%rip), %rdx      # 0xf809
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x472c
leaq 0xaadc(%rip), %rsi      # 0xf816
pushq $0x6a
popq %rcx
movl %eax, %edi
movq %r14, %rdx
callq 0x4040
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x68f0
// File: /workspace/github_c_makefile_star2_O2/orangeduck[P]mpc/tests/regex.c
// Function: test_regex_lisp_comment
void test_regex_lisp_comment(void) {

  mpc_parser_t *re0 = mpc_re(";[^\\n\\r]*");

  PT_ASSERT(regex_test_pass(re0, ";comment", ";comment"));
  PT_ASSERT(regex_test_pass(re0, ";i am the\nman", ";i am the"));

  mpc_delete(re0);

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xaaf2(%rip), %rdi      # 0xf853
callq 0x837c
movq %rax, %rbx
leaq 0xaaed(%rip), %rdx      # 0xf85d
movq %rax, %rdi
movq %rdx, %rsi
callq 0x472c
leaq 0xaae4(%rip), %rsi      # 0xf866
leaq 0xa5d0(%rip), %r14      # 0xf359
pushq $0x74
popq %rcx
movl %eax, %edi
movq %r14, %rdx
callq 0x4040
leaq 0xaaf6(%rip), %rsi      # 0xf893
leaq 0xaafd(%rip), %rdx      # 0xf8a1
movq %rbx, %rdi
callq 0x472c
leaq 0xaaf8(%rip), %rsi      # 0xf8ab
pushq $0x75
popq %rcx
movl %eax, %edi
movq %r14, %rdx
callq 0x4040
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x68f0
// File: /workspace/github_c_makefile_star2_O2/orangeduck[P]mpc/tests/regex.c
// Function: test_regex_newline
void test_regex_newline(void) {

  mpc_parser_t *re0 = mpc_re("[a-z]*");

  PT_ASSERT(regex_test_pass(re0, "hi", "hi"));
  PT_ASSERT(regex_test_pass(re0, "hi\nk", "hi"));
  PT_ASSERT(regex_test_fail(re0, "hi\nk", "hi\nk"));

  mpc_delete(re0);

}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0xab01(%rip), %rdi      # 0xf8df
callq 0x837c
movq %rax, %rbx
leaq 0xaaf9(%rip), %r15      # 0xf8e6
movq %rax, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x472c
leaq 0xaae7(%rip), %rsi      # 0xf8e9
leaq 0xa550(%rip), %r14      # 0xf359
pushq $0x7f
popq %rcx
movl %eax, %edi
movq %r14, %rdx
callq 0x4040
leaq 0xaaed(%rip), %r12      # 0xf90a
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x472c
leaq 0xaadd(%rip), %rsi      # 0xf90f
movl %eax, %edi
movq %r14, %rdx
movl $0x80, %ecx
callq 0x4040
movq %rbx, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0x4768
leaq 0xaadd(%rip), %rsi      # 0xf933
movl %eax, %edi
movq %r14, %rdx
movl $0x81, %ecx
callq 0x4040
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x68f0
// File: /workspace/github_c_makefile_star2_O2/orangeduck[P]mpc/tests/regex.c
// Function: test_regex_multiline
void test_regex_multiline(void) {

  mpc_parser_t *re0 = mpc_re_mode("(^[a-z]*$)*", MPC_RE_MULTILINE);

  PT_ASSERT(regex_test_pass(re0, "hello\nhello", "hello\nhello"));
  PT_ASSERT(regex_test_pass(re0, "hello\nhello\n", "hello\nhello\n"));
  PT_ASSERT(regex_test_pass(re0, "\nblah\n\nblah\n", "\nblah\n\nblah\n"));
  PT_ASSERT(regex_test_fail(re0, "45234", "45234"));
  PT_ASSERT(regex_test_fail(re0, "\n45234", "\n45234"));
  PT_ASSERT(regex_test_pass(re0, "\n45234", "\n"));

  mpc_delete(re0);

}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0xaad6(%rip), %rdi      # 0xf95a
pushq $0x1
popq %rsi
callq 0x8383
movq %rax, %rbx
leaq 0xaad0(%rip), %rdx      # 0xf966
movq %rax, %rdi
movq %rdx, %rsi
callq 0x472c
leaq 0xaaca(%rip), %rsi      # 0xf972
leaq 0xa4aa(%rip), %r14      # 0xf359
movl %eax, %edi
movq %r14, %rdx
movl $0x8b, %ecx
callq 0x4040
leaq 0xaae2(%rip), %rdx      # 0xf9a7
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x472c
leaq 0xaadd(%rip), %rsi      # 0xf9b4
movl %eax, %edi
movq %r14, %rdx
movl $0x8c, %ecx
callq 0x4040
leaq 0xab00(%rip), %rdx      # 0xf9ed
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x472c
leaq 0xaafb(%rip), %rsi      # 0xf9fa
movl %eax, %edi
movq %r14, %rdx
movl $0x8d, %ecx
callq 0x4040
leaq 0xab4a(%rip), %rdx      # 0xfa5f
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x4768
leaq 0xab10(%rip), %rsi      # 0xfa37
movl %eax, %edi
movq %r14, %rdx
movl $0x8e, %ecx
callq 0x4040
leaq 0xab21(%rip), %r15      # 0xfa5e
movq %rbx, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x4768
leaq 0xab13(%rip), %rsi      # 0xfa65
movl %eax, %edi
movq %r14, %rdx
movl $0x8f, %ecx
callq 0x4040
leaq 0xa152(%rip), %rdx      # 0xf0ba
movq %rbx, %rdi
movq %r15, %rsi
callq 0x472c
leaq 0xab16(%rip), %rsi      # 0xfa90
movl %eax, %edi
movq %r14, %rdx
movl $0x90, %ecx
callq 0x4040
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x68f0
// File: /workspace/github_c_makefile_star2_O2/orangeduck[P]mpc/tests/regex.c
// Function: suite_regex
void suite_regex(void) {
  pt_add_test(test_regex_basic, "Test Regex Basic", "Suite Regex");
  pt_add_test(test_regex_range, "Test Regex Range", "Suite Regex");
  pt_add_test(test_regex_string, "Test Regex String", "Suite Regex");
  pt_add_test(test_regex_lisp_comment, "Test Regex Lisp Comment", "Suite Regex");
  pt_add_test(test_regex_boundary, "Test Regex Boundary", "Suite Regex");
  pt_add_test(test_regex_newline, "Test Regex Newline", "Suite Regex");
  pt_add_test(test_regex_multiline, "Test Regex Multiline", "Suite Regex");
  pt_add_test(test_regex_dotall, "Test Regex Dotall", "Suite Regex");
}

// Assembly:
pushq %rbx
leaq -0xa03(%rip), %rdi      # 0x4782
leaq 0xab3c(%rip), %rsi      # 0xfcc8
leaq 0xab46(%rip), %rbx      # 0xfcd9
movq %rbx, %rdx
callq 0x40b7
leaq -0x57c(%rip), %rdi      # 0x4c26
leaq 0xab3c(%rip), %rsi      # 0xfce5
movq %rbx, %rdx
callq 0x40b7
leaq -0x523(%rip), %rdi      # 0x4c95
leaq 0xab37(%rip), %rsi      # 0xfcf6
movq %rbx, %rdx
callq 0x40b7
leaq -0x478(%rip), %rdi      # 0x4d56
leaq 0xab33(%rip), %rsi      # 0xfd08
movq %rbx, %rdx
callq 0x40b7
leaq -0x855(%rip), %rdi      # 0x498f
leaq 0xab35(%rip), %rsi      # 0xfd20
movq %rbx, %rdx
callq 0x40b7
leaq -0x42b(%rip), %rdi      # 0x4dcf
leaq 0xab33(%rip), %rsi      # 0xfd34
movq %rbx, %rdx
callq 0x40b7
leaq -0x398(%rip), %rdi      # 0x4e78
leaq 0xab30(%rip), %rsi      # 0xfd47
movq %rbx, %rdx
callq 0x40b7
leaq -0x290(%rip), %rdi      # 0x4f96
leaq 0xab2f(%rip), %rsi      # 0xfd5c
movq %rbx, %rdx
popq %rbx
jmp 0x40b7
nop
// File: /workspace/github_c_makefile_star2_O2/orangeduck[P]mpc/tests/test.c
// Function: main
int main(int argc, char** argv) {
  (void) argc; (void) argv;
  pt_add_suite(suite_core);
  pt_add_suite(suite_regex);
  pt_add_suite(suite_grammar);
  pt_add_suite(suite_combinators);
  return pt_run();
}

// Assembly:
pushq %rax
leaq -0x2888(%rip), %rdi     # 0x29b8
callq 0x4206
leaq -0xcf(%rip), %rdi       # 0x517d
callq 0x4206
leaq -0x12ea(%rip), %rdi     # 0x3f6e
callq 0x4206
leaq -0x3963(%rip), %rdi     # 0x1901
callq 0x4206
popq %rax
jmp 0x420e
nop
// File: /workspace/github_c_makefile_star2_O2/randyrossi[P]fisher-modem/fifi/src/fifi.C
// Function: giveup(char*)
static void giveup(char* msg) {
  fprintf(stderr, "fifi: ");
  fprintf(stderr, "%s", msg);
  putc('\n', stderr);
  exit(1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2931(%rip), %r14      # 0x3fe0
movq (%r14), %rcx
leaq 0xaec(%rip), %rdi       # 0x21a5
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
callq 0x1160
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x10d0
movq (%r14), %rsi
pushq $0xa
popq %rdi
callq 0x1150
pushq $0x1
popq %rdi
callq 0x1100
// File: /workspace/github_c_makefile_star2_O2/randyrossi[P]fisher-modem/fifi/src/fifi.C
// Function: openfile(char*, char*)
static FILE* openfile(char* fn, char* rw) {
  FILE* fi = fopen(fn, rw);
  if (fi == NULL) {
    // const char *ops = (rw[0] == 'r') ? "open" : "create";
    giveup("can't open or create file");
  }
  return fi;
}

// Assembly:
pushq %rax
callq 0x10f0
testq %rax, %rax
je 0x16ef
popq %rcx
retq
leaq 0x943(%rip), %rdi       # 0x2039
callq 0x16a1
// File: /workspace/github_c_makefile_star2_O2/randyrossi[P]fisher-modem/fifi/src/fifi.C
// Function: readline(_IO_FILE*)
static bool readline(FILE* fi) {
  linenum++;
  int n = 0, ch = getc(fi);
  until(n >= MAXSTR || ch == '\n' || ch < 0) {
    line[n++] = ch;
    ch = getc(fi);
  }
  unless(ch == '\n' || ch < 0) giveup("line too long!");
  line[n] = '\0';
  return !(ch < 0 && n == 0);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
incl 0x29c7(%rip)            # 0x40e8
movq %rdi, %rbx
xorl %r14d, %r14d
leaq 0x29c2(%rip), %r15      # 0x40f0
movq %rbx, %rdi
callq 0x1060
cmpl $0xa, %eax
je 0x1751
cmpq $0xff, %r14
ja 0x1751
testl %eax, %eax
js 0x1751
movb %al, (%r14,%r15)
incq %r14
jmp 0x172e
testl %eax, %eax
sets %cl
cmpl $0xa, %eax
sete %dl
orb %cl, %dl
je 0x1778
testl %eax, %eax
setns %cl
movb $0x0, (%r14,%r15)
testq %r14, %r14
setne %al
orb %cl, %al
popq %rbx
popq %r14
popq %r15
retq
leaq 0x930(%rip), %rdi       # 0x20af
callq 0x16a1
// File: /workspace/github_c_makefile_star2_O2/randyrossi[P]fisher-modem/fifi/src/fifi.C
// Function: getsubst(char*, int, int)
static char* getsubst(
    char* line,
    int start,
    int end) {  // char *s1 = re -> startp[ns], *s2 = re -> endp[ns];
  // unless (s1 != NULL && s2 != NULL && s2 >= s1) giveup("bad regexp subst!");
  int len = end - start;
  char* s = new char[len + 1];
  memcpy(s, line + start, len);
  s[len] = '\0';
  return s;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
subl %edi, %ebx
leal 0x1(%rbx), %eax
movslq %eax, %rdi
callq 0x1030
movq %rax, %r14
movslq %ebp, %rax
leaq 0x294a(%rip), %rsi      # 0x40f0
addq %rax, %rsi
movslq %ebx, %rbx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x1090
movb $0x0, (%r14,%rbx)
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/cmd.c
// Function: add_cmdline_t
cmd_t* add_cmdline_t(cmd_t** cmd)
{
    if (((*cmd)->next = (cmd_t*)
                malloc(sizeof(cmd_t))) == NULL)
        return NULL;

    (*cmd)->next->prev = *cmd;
    *cmd = (*cmd)->next;
    (*cmd)->next = NULL;
    (*cmd)->io = NULL;

    return *cmd;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x28
popq %rdi
callq 0x20e0
movq (%rbx), %rcx
movq %rax, 0x18(%rcx)
testq %rax, %rax
je 0x2ac3
movq (%rbx), %rax
movq 0x18(%rax), %rcx
movq %rax, 0x20(%rcx)
movq %rcx, (%rbx)
andq $0x0, 0x18(%rcx)
movq (%rbx), %rax
andq $0x0, 0x10(%rax)
movq (%rbx), %rax
jmp 0x2ac5
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/cmd.c
// Function: release_cmd_t
void release_cmd_t(cmd_t* cmd)
{
    int     i   = 0;

    cmd_t*  tmp = NULL;

    while (cmd != NULL) {
        tmp = cmd->next;
        if (cmd->io != NULL) {
            if (cmd->io->io_name != NULL)
                free(cmd->io->io_name);
            free(cmd->io);
        }
        i = 0;
        while (cmd->args[i] != NULL) {
            free(cmd->args[i]);
            i++;
        }
        free(cmd->args);
        free(cmd);
        cmd = tmp;
    }

    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rbx, %rbx
je 0x2d40
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %r14
testq %rax, %rax
je 0x2d10
movq 0x8(%rax), %rdi
callq 0x21a0
movq 0x10(%rbx), %rdi
callq 0x21a0
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
movq (%rdi,%r15), %rax
testq %rax, %rax
je 0x2d2e
movq %rax, %rdi
callq 0x21a0
addq $0x8, %r15
jmp 0x2d13
callq 0x21a0
movq %rbx, %rdi
callq 0x21a0
movq %r14, %rbx
jmp 0x2cec
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/cmd.c
// Function: file_redirect
int file_redirect(cmd_t* cmd)
{
    int fd  = 0;
    
    switch (cmd->io->io_flag) {
        case    IOREAD:
        case    IOHERE:
            if (check_file_stat(cmd, 1, S_IREAD) < 0)
                return -1;
            if ((fd = open(cmd->io->io_name,
                            O_RDONLY)) < 0) {
                perror("ysh: fopen");
                close(fd);

                return -1;
            }
            close(0);
            dup2(fd, 0);
            break;
        case    IOWRITE:
            if (check_file_stat(cmd, 1, S_IWRITE) < 0)
                return -1;
            if ((fd = open(cmd->io->io_name,
                            O_WRONLY    |
                            O_CREAT     |
                            O_TRUNC, 0666)) < 0) {
                perror("ysh: fopen");
                close(fd);

                return -1;
            }
            close(cmd->io->io_unit);
            dup2(fd, cmd->io->io_unit);
            break;
        case    IOCAT:
            if (check_file_stat(cmd, 1, S_IWRITE) < 0)
                return -1;
            if ((fd = open(cmd->io->io_name,
                            O_WRONLY    |
                            O_CREAT     |
                            O_APPEND, 0666)) < 0) {
                perror("ysh: fopen");
                close(fd);

                return -1;
            }
            close(cmd->io->io_unit);
            dup2(fd, cmd->io->io_unit);
            break;
    }
    close(fd);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rax
movzwl 0x2(%rax), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x2d9b
cmpl $0x3, %eax
je 0x2dd5
xorl %ebp, %ebp
movl $0x0, %ebx
cmpl $0x4, %eax
jne 0x2e24
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x80, %edx
callq 0x2e48
testl %eax, %eax
js 0x2e2d
movq 0x10(%r14), %rax
movq 0x8(%rax), %rdi
xorl %ebx, %ebx
movl $0x441, %esi            # imm = 0x441
jmp 0x2df8
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x2e48
testl %eax, %eax
js 0x2e2d
movq 0x10(%r14), %rax
movq 0x8(%rax), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
xorl %eax, %eax
callq 0x2480
movl %eax, %ebp
testl %eax, %eax
js 0x2e37
xorl %edi, %edi
callq 0x2060
movl %ebp, %edi
xorl %esi, %esi
jmp 0x2e1f
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x80, %edx
callq 0x2e48
testl %eax, %eax
js 0x2e2d
movq 0x10(%r14), %rax
movq 0x8(%rax), %rdi
xorl %ebx, %ebx
movl $0x241, %esi            # imm = 0x241
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x2480
movl %eax, %ebp
testl %eax, %eax
js 0x2e37
movq 0x10(%r14), %rax
movswl (%rax), %edi
callq 0x2060
movq 0x10(%r14), %rax
movswl (%rax), %esi
movl %ebp, %edi
callq 0x2040
movl %ebp, %edi
callq 0x2060
jmp 0x2e30
pushq $-0x1
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x81d8(%rip), %rdi      # 0xb016
callq 0x2440
pushq $-0x1
popq %rbx
jmp 0x2e24
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/cmd.c
// Function: check_file_stat
int check_file_stat(cmd_t* cmd, int is_redirect, mode_t chk)
{
    char*   path    = NULL;

    struct stat st;

    if (is_redirect == 1)
        path = cmd->io->io_name;
    else
        path = cmd->args[0];

    if (stat(path, &st) < 0) {
        switch (errno) {
            case    ENOENT:
                if (is_redirect == 1)
                    return 0;

                fprintf(stderr, "no such file or directory: %s\n",
                        path);

                return -1;
            case    EACCES:
                fprintf(stderr, "permission denied: %s\n",
                        path);

                return -2;
        }
    }

    if ((st.st_mode & S_IFMT) == S_IFDIR) {
        fprintf(stderr, "permission denied: %s\n",
                path);

        return -3;
    }
    if ((st.st_mode & chk) == 0) {
        fprintf(stderr, "permission denied: %s\n",
                path);

        return -4;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movl %edx, %ebp
movl %esi, %r14d
cmpl $0x1, %esi
jne 0x2e67
movq 0x10(%rdi), %rax
addq $0x8, %rax
jmp 0x2e6b
movq 0x8(%rdi), %rax
movq (%rax), %rbx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2460
testl %eax, %eax
jns 0x2e8e
callq 0x2390
movl (%rax), %eax
cmpl $0x2, %eax
je 0x2ebd
cmpl $0xd, %eax
je 0x2eec
movl 0x18(%rsp), %eax
movl %eax, %ecx
andl $0xf000, %ecx           # imm = 0xF000
leaq 0x819f(%rip), %rsi      # 0xb040
cmpl $0x4000, %ecx           # imm = 0x4000
je 0x2ecf
testl %ebp, %eax
je 0x2ed3
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0x1, %r14d
je 0x2ead
pushq $-0x1
popq %rbp
leaq 0x8154(%rip), %rsi      # 0xb021
jmp 0x2ed6
pushq $-0x3
jmp 0x2ed5
pushq $-0x4
popq %rbp
movq 0xe103(%rip), %rax      # 0x10fe0
movq (%rax), %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2450
jmp 0x2eaf
pushq $-0x2
popq %rbp
leaq 0x814a(%rip), %rsi      # 0xb040
jmp 0x2ed6
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/cmd.c
// Function: redirect
void redirect(int oldfd, int newfd)
{
    if (oldfd != newfd) {
        if (dup2(oldfd, newfd) == -1)
            close(oldfd);
    }

    return;
}

// Assembly:
pushq %rbx
cmpl %esi, %edi
je 0x32f5
movl %edi, %ebx
callq 0x2040
cmpl $-0x1, %eax
je 0x32f7
popq %rbx
retq
movl %ebx, %edi
popq %rbx
jmp 0x2060
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/cmd.c
// Function: mwait
int mwait(void)
{
    int     status  = 0;

    pid_t   pid     = 0;

    while (1) {
        if ((pid = wait(&status)) == -1) {
            if (errno == ECHILD)
                break;
            else if (errno == EINTR)
                continue;
        }
    }

    return status;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rbx
andl $0x0, (%rbx)
movq %rbx, %rdi
callq 0x2070
cmpl $-0x1, %eax
jne 0x330c
callq 0x2390
cmpl $0xa, (%rax)
jne 0x330c
movl 0xc(%rsp), %eax
addq $0x10, %rsp
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/hash.c
// Function: init_shash
int init_shash(SHASH** shash)
{
    int     status  = 0;

    SHASH*  shs     = NULL;

    if ((shs = (SHASH*)
                malloc(sizeof(SHASH))) == NULL) {
        status = -1; goto ERR;
    } else {
        shs->elemc      = 0;
        shs->put        = put_shash;
        shs->get        = get_shash;
        shs->getv       = getv_shash;
        shs->keys       = keys_shash;
        shs->values     = values_shash;
        shs->is_empty   = is_empty_shash;
        shs->size       = size_shash;
        shs->exists     = key_exists_shash;
        shs->remove     = remove_shash;
        shs->clear      = clear_shash;
        shs->release    = release_shash;
        shs->elem_size  = DEFAULT_ELEM_SIZE;
    }
    if (allocate_elem(&shs) < 0) {
        status = -2; goto ERR;
    }
    *shash = shs;

    return 0;

ERR:
    switch (status) {
        case    -1:
            break;
        case    -2:
            if (shs != NULL) {
                free(shs);
                shs = NULL;
            }
            break;
    }

    return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x70
popq %rdi
callq 0x20e0
testq %rax, %rax
je 0x3a70
movq %rax, %rbx
andl $0x0, (%rax)
leaq 0x105(%rip), %rax       # 0x3a9d
movq %rax, 0x10(%rbx)
leaq 0x31c(%rip), %rax       # 0x3cbf
movq %rax, 0x18(%rbx)
leaq 0x330(%rip), %rax       # 0x3cde
movq %rax, 0x20(%rbx)
leaq 0x384(%rip), %rax       # 0x3d3d
movq %rax, 0x28(%rbx)
leaq 0x3cf(%rip), %rax       # 0x3d93
movq %rax, 0x30(%rbx)
leaq 0x41b(%rip), %rax       # 0x3dea
movq %rax, 0x38(%rbx)
leaq 0x419(%rip), %rax       # 0x3df3
movq %rax, 0x40(%rbx)
leaq 0x411(%rip), %rax       # 0x3df6
movq %rax, 0x48(%rbx)
leaq 0x47a(%rip), %rax       # 0x3e6a
movq %rax, 0x50(%rbx)
leaq 0x4d3(%rip), %rax       # 0x3ece
movq %rax, 0x58(%rbx)
leaq 0x58d(%rip), %rax       # 0x3f93
movq %rax, 0x60(%rbx)
movq $0x20, 0x68(%rbx)
movl $0x100, %edi            # imm = 0x100
callq 0x20e0
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x3a83
movq %rax, %r15
xorl %ebp, %ebp
pushq $0x1
popq %r12
pushq $0x10
popq %r13
cmpq $0x20, %rbp
je 0x3a74
movq %r12, %rdi
movq %r13, %rsi
callq 0x23d0
movq %rax, (%r15,%rbp,8)
incq %rbp
testq %rax, %rax
jne 0x3a32
xorl %r14d, %r14d
cmpq $0x1f, %r14
ja 0x3a7b
movq (%r15,%r14,8), %rdi
testq %rdi, %rdi
je 0x3a7b
callq 0x21a0
andq $0x0, (%r15,%r14,8)
incq %r14
jmp 0x3a52
pushq $-0x1
jmp 0x3a8d
movq %rbx, (%r14)
xorl %eax, %eax
jmp 0x3a8e
movq %r15, %rdi
callq 0x21a0
movq %rbx, %rdi
callq 0x21a0
pushq $-0x2
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/hash.c
// Function: getv_shash
static
int getv_shash(SHASH* shash, const char* key, char** ptr)
{
    size_t  len     = 0;

    char*   value   = NULL;

    if ((value = shash->get(shash, key)) == NULL)
        return -1;

    len = strlen(value);
    if ((*ptr = (char*)
                malloc(sizeof(char) * (len + 1))) == NULL)
        return -2;
    memcpy(*ptr, value, len);
    *(*(ptr) + len) = '\0';

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
callq *0x18(%rdi)
testq %rax, %rax
je 0x3d2a
movq %rax, %rbx
movq %rax, %rdi
callq 0x21b0
movq %rax, %r15
leaq 0x1(%rax), %rdi
callq 0x20e0
movq %rax, (%r14)
testq %rax, %rax
je 0x3d2e
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2470
movb $0x0, (%r12,%r15)
xorl %eax, %eax
jmp 0x3d31
pushq $-0x1
jmp 0x3d30
pushq $-0x2
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/hash.c
// Function: keys_shash
static
char** keys_shash(SHASH* shash)
{
    int     i       = 0;

    char**  keys    = NULL;

    if ((keys = (char**)
                malloc(sizeof(char*) * shash->size(shash))) != NULL) {
        while (i < shash->size(shash) &&
                (*(keys + i) = *(*(shash->elem + i))))
            i++;
        *(keys + i) = NULL;
    }

    return keys;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq *0x40(%rdi)
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x20e0
movq %rax, %r14
testq %rax, %rax
je 0x3d8a
xorl %r15d, %r15d
movq %rbx, %rdi
callq *0x40(%rbx)
cltq
cmpq %rax, %r15
jge 0x3d85
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rax
movq (%rax), %rax
movq %rax, (%r14,%r15,8)
testq %rax, %rax
je 0x3d85
incq %r15
jmp 0x3d5f
andq $0x0, (%r14,%r15,8)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/hash.c
// Function: values_shash
static
char** values_shash(SHASH* shash)
{
    int     i       = 0;

    char**  values  = NULL;

    if ((values = (char**)
                malloc(sizeof(char*) * shash->size(shash))) != NULL) {
        while (i < shash->size(shash) &&
                (*(values + i) = *(*(shash->elem + i) + 1)))
            i++;
        *(values + i) = NULL;
    }

    return values;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq *0x40(%rdi)
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x20e0
movq %rax, %r14
testq %rax, %rax
je 0x3de1
xorl %r15d, %r15d
movq %rbx, %rdi
callq *0x40(%rbx)
cltq
cmpq %rax, %r15
jge 0x3ddc
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x8(%rax), %rax
movq %rax, (%r14,%r15,8)
testq %rax, %rax
je 0x3ddc
incq %r15
jmp 0x3db5
andq $0x0, (%r14,%r15,8)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/hash.c
// Function: key_exists_shash
static
int key_exists_shash(SHASH* shash, const char* key)
{
    int     i       = 0,
            j       = 0;

    j = shash->elemc - 1;
    while (i < shash->elemc && i <= j) {
        if (strcmp_lite(*(*(shash->elem + i)), key) == 0)
            return i;
        if (strcmp_lite(*(*(shash->elem + j)), key) == 0)
            return j;
        i++;
        j--;
    }

    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movslq (%rdi), %r13
xorl %r12d, %r12d
movq %r13, %rbp
cmpq %r13, %r12
jge 0x3e4d
cmpq %rbp, %r12
jge 0x3e4d
movq 0x8(%r15), %rbx
movq (%rbx,%r12,8), %rax
movq (%rax), %rdi
movq %r14, %rsi
callq 0x41fa
testl %eax, %eax
je 0x3e58
movq -0x8(%rbx,%rbp,8), %rax
movq (%rax), %rdi
movq %r14, %rsi
callq 0x41fa
testl %eax, %eax
je 0x3e52
incq %r12
decq %rbp
jmp 0x3e10
pushq $-0x1
popq %rax
jmp 0x3e5b
notl %r12d
addl %r13d, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/hash.c
// Function: remove_shash
static
void remove_shash(SHASH** shash, const char* key)
{
    int     pos     = 0;

    if ((pos = (*shash)->exists(*shash, key)) < 0)
        return;

    remove_key_elem(*shash, pos);
    remove_value_elem(*shash, pos);
    while (pos < (*shash)->elemc &&
            (*((*shash)->elem + pos) = *((*shash)->elem + (pos + 1))))
        pos++;
    (*shash)->elemc--;
    *((*shash)->elem + (*shash)->elemc) = NULL;

    return;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq *0x48(%rdi)
testl %eax, %eax
js 0x3ec7
movl %eax, %ebp
movq (%rbx), %rdi
movl %eax, %esi
callq 0x41c7
movq (%rbx), %rdi
movl %ebp, %esi
callq 0x425c
movl %ebp, %ecx
movq (%rbx), %rax
movl (%rax), %edx
cmpl %ecx, %edx
jle 0x3eb5
movq 0x8(%rax), %rax
movq 0x8(%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
incq %rcx
testq %rdx, %rdx
jne 0x3e92
movq (%rbx), %rax
movl (%rax), %edx
leal -0x1(%rdx), %ecx
movl %ecx, (%rax)
movq 0x8(%rax), %rax
movslq %edx, %rcx
andq $0x0, -0x8(%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/hash.c
// Function: clear_shash
static
void clear_shash(SHASH** shash)
{
    int     i       = 0,
            j       = 0;

    j = (*shash)->elemc - 1;
    while (i < (*shash)->elemc && i <= j) {
        if (*((*shash)->elem + i) != NULL) {
            remove_key_elem(*shash, i);
            remove_value_elem(*shash, i);
            free(*((*shash)->elem + i));
            *((*shash)->elem + i) = NULL;
        }
        if (*((*shash)->elem + j) != NULL) {
            remove_key_elem(*shash, j);
            remove_value_elem(*shash, j);
            free(*((*shash)->elem + j));
            *((*shash)->elem + j) = NULL;
        }
        i++;
        j--;
    }
    (*shash)->elemc = 0;

    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
movl (%rdi), %eax
movslq %eax, %r15
leal -0x1(%r15), %ebp
xorl %r14d, %r14d
cltq
cmpq %rax, %r14
jge 0x3f85
cmpq %r15, %r14
jge 0x3f85
movq 0x8(%rdi), %rax
cmpq $0x0, (%rax,%r14,8)
je 0x3f3c
movl %r14d, %esi
callq 0x41c7
movq (%rbx), %rdi
movl %r14d, %esi
callq 0x425c
movq (%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax,%r14,8), %rdi
callq 0x21a0
movq (%rbx), %rax
movq 0x8(%rax), %rax
andq $0x0, (%rax,%r14,8)
movq (%rbx), %rdi
movq 0x8(%rdi), %rax
cmpq $0x0, -0x8(%rax,%r15,8)
je 0x3f76
movl %ebp, %esi
callq 0x41c7
movq (%rbx), %rdi
movl %ebp, %esi
callq 0x425c
movq (%rbx), %rax
movq 0x8(%rax), %rax
movq -0x8(%rax,%r15,8), %rdi
callq 0x21a0
movq (%rbx), %rax
movq 0x8(%rax), %rax
andq $0x0, -0x8(%rax,%r15,8)
movq (%rbx), %rdi
incq %r14
movl (%rdi), %eax
decl %ebp
decq %r15
jmp 0x3ee7
andl $0x0, (%rdi)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/hash.c
// Function: release_shash
static
void release_shash(SHASH* shash)
{
    int     i       = 0,
            j       = 0;

    if (shash != NULL) {
        if (shash->elem != NULL) {
            j = shash->elemc - 1;
            while (i < shash->elemc && i <= j) {
                if (*(shash->elem + i) != NULL) {
                    remove_key_elem(shash, i);
                    *(*(shash->elem + i)) = NULL;
                    remove_value_elem(shash, i);
                    *(*(shash->elem + i) + 1) = NULL;
                    free(*(shash->elem + i));
                    *(shash->elem + i) = NULL;
                }
                if (*(shash->elem + j) != NULL) {
                    remove_key_elem(shash, j);
                    *(*(shash->elem + j)) = NULL;
                    remove_value_elem(shash, j);
                    *(*(shash->elem + j) + 1) = NULL;
                    free(*(shash->elem + j));
                    *(shash->elem + j) = NULL;
                }
                i++;
                j--;
            }
            free(shash->elem);
            shash->elem = NULL;
        }
        free(shash);
        shash = NULL;
    }

    return;
}

// Assembly:
testq %rdi, %rdi
je 0x40c5
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x40af
movl (%rbx), %eax
movslq %eax, %r15
leal -0x1(%r15), %ecx
movq %rcx, (%rsp)
leaq -0x8(,%r15,8), %r13
xorl %r12d, %r12d
xorl %r14d, %r14d
cltq
movq 0x8(%rbx), %rdi
cmpq %rax, %r14
jge 0x40aa
leaq (%r15,%r12), %rax
cmpq %rax, %r14
jge 0x40aa
cmpq $0x0, (%rdi,%r14,8)
je 0x403c
movq %rbx, %rdi
movl %r14d, %esi
callq 0x41c7
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rax
andq $0x0, (%rax)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x425c
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rax
andq $0x0, 0x8(%rax)
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x21a0
movq 0x8(%rbx), %rax
andq $0x0, (%rax,%r14,8)
movq 0x8(%rbx), %rdi
addq %r13, %rdi
cmpq $0x0, (%rdi,%r12,8)
je 0x409d
movq (%rsp), %rax
leal (%rax,%r12), %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x41c7
movq 0x8(%rbx), %rax
addq %r13, %rax
movq (%rax,%r12,8), %rax
andq $0x0, (%rax)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x425c
movq 0x8(%rbx), %rax
addq %r13, %rax
movq (%rax,%r12,8), %rax
andq $0x0, 0x8(%rax)
movq 0x8(%rbx), %rax
addq %r13, %rax
movq (%rax,%r12,8), %rdi
callq 0x21a0
movq 0x8(%rbx), %rax
addq %r13, %rax
andq $0x0, (%rax,%r12,8)
incq %r14
movl (%rbx), %eax
decq %r12
jmp 0x3fd0
callq 0x21a0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21a0
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/hash.c
// Function: clone_shash
SHASH* clone_shash(SHASH* shash)
{
    int     i       = 0;

    SHASH*  shs     = NULL;

    if (init_shash(&shs) < 0)
        return NULL;

    while (i < shash->size(shash)) {
        if (shs->put(&shs, *(*(shash->elem + i)), *(*(shash->elem + i) + 1)) < 0)
            goto ERR;
        i++;
    }

    return shs;

ERR:
    shs->release(shs);

    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
andq $0x0, (%rdi)
callq 0x396c
testl %eax, %eax
js 0x4142
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
callq *0x40(%rbx)
movslq %eax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %r15
jge 0x4144
movq 0x8(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movq (%rcx), %rsi
movq 0x8(%rcx), %rdx
movq %r14, %rdi
callq *0x10(%rax)
incq %r15
testl %eax, %eax
jns 0x410b
movq 0x8(%rsp), %rdi
callq *0x60(%rdi)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/hash.c
// Function: put_value_elem
static
int put_value_elem(SHASH** shash, const char* value, int pos)
{
    size_t  len     = 0;

    len = strlen(value);
    if ((*(*(((*shash)->elem + pos)) + 1) = (char*)
                malloc(sizeof(char) * (len + 1))) == NULL)
        return -1;

    memcpy(*(*((*shash)->elem + pos) + 1), value, len);
    *(*(*((*shash)->elem + pos) + 1) + len) = '\0';

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x21b0
movq %rax, %r14
leaq 0x1(%rax), %rdi
callq 0x20e0
movq (%rbx), %rcx
movq 0x8(%rcx), %rcx
movslq %ebp, %r12
movq (%rcx,%r12,8), %rcx
movq %rax, 0x8(%rcx)
testq %rax, %rax
je 0x41bb
movq (%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2470
movq (%rbx), %rax
movq 0x8(%rax), %rax
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rax
movb $0x0, (%rax,%r14)
xorl %eax, %eax
jmp 0x41be
pushq $-0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/hash.c
// Function: remove_key_elem
static
void remove_key_elem(SHASH* shash, int pos)
{
    if (*(*(shash->elem + pos)) != NULL) {
        free(*(*(shash->elem + pos)));
        *(*(shash->elem + pos)) = NULL;
    }

    return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movslq %esi, %r14
movq (%rax,%r14,8), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x41f2
callq 0x21a0
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rax
andq $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/hash.c
// Function: remove_value_elem
static
void remove_value_elem(SHASH* shash, int pos)
{
    if (*(*(shash->elem + pos) + 1) != NULL) {
        free(*(*(shash->elem + pos) + 1));
        *(*(shash->elem + pos) + 1) = NULL;
    }

    return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movslq %esi, %r14
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x4289
callq 0x21a0
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rax
andq $0x0, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/proc.c
// Function: init_proc
int init_proc(PROC** proc)
{
    PROC*   prc     = NULL;
    
    if ((prc = (PROC*)
                malloc(sizeof(PROC))) == NULL) {
        return -1;
    } else {
        prc->pid        = 0;
        prc->argc       = 0;
        prc->argv       = NULL;
        prc->envp       = NULL;
        prc->set        = set_cmd_proc;
        prc->setv       = set_cmd_argv_proc;
#ifdef  _GNU_SOURCE
        prc->set_env    = set_env_proc;
        prc->unset_env  = unset_env_proc;
        prc->rfork      = rfork_proc;
/* _GNU_SOURCE */
#endif
        prc->fork       = fork_proc;
        prc->wait       = wait_proc;
        prc->exec       = exec_proc;
        prc->ready      = exec_ready_proc;
        prc->kill       = kill_proc;
        prc->release    = release_proc;
        prc->status     = 0;
    }
    *proc = prc;

    return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x78
popq %rdi
callq 0x20e0
testq %rax, %rax
je 0x4584
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x82(%rip), %rcx        # 0x4589
movq %rcx, 0x18(%rax)
leaq 0x1b2(%rip), %rcx       # 0x46c4
movq %rcx, 0x20(%rax)
leaq 0x29d(%rip), %rcx       # 0x47ba
movq %rcx, 0x28(%rax)
leaq 0x376(%rip), %rcx       # 0x489e
movq %rcx, 0x30(%rax)
leaq 0x388(%rip), %rcx       # 0x48bb
movq %rcx, 0x38(%rax)
leaq 0x39c(%rip), %rcx       # 0x48da
movq %rcx, 0x40(%rax)
leaq 0x3a1(%rip), %rcx       # 0x48ea
movq %rcx, 0x48(%rax)
leaq 0x3ba(%rip), %rcx       # 0x490e
movq %rcx, 0x50(%rax)
leaq 0x3db(%rip), %rcx       # 0x493a
movq %rcx, 0x58(%rax)
leaq 0x3e4(%rip), %rcx       # 0x494e
movq %rcx, 0x60(%rax)
leaq 0x3e7(%rip), %rcx       # 0x495c
movq %rcx, 0x68(%rax)
andl $0x0, 0x70(%rax)
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x4587
pushq $-0x1
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/proc.c
// Function: set_cmd_proc
static
int set_cmd_proc(PROC** proc, const char* cmd)
{
    int     status  = 0;

    size_t  len     = 0;

    char*   tok     = NULL,
        *   cmd2    = NULL;

    if ((*proc)->argv != NULL) {
        release_argv_proc(*proc);
        (*proc)->argc = 0;
        (*proc)->argv = NULL;
    }
    if ((len = strlen(cmd)) == 0) {
        status = -1; goto ERR;
    }
    if ((cmd2 = (char*)
                malloc(sizeof(char) * (len + 1))) == NULL) {
        status = -2; goto ERR;
    } else {
        memcpy(cmd2, cmd, len);
        *(cmd2 + len) = '\0';
    }
    if (((*proc)->argv = (char**)
                malloc(sizeof(char*) * sysconf(_SC_ARG_MAX))) == NULL) {
        status = -2; goto ERR;
    }

    tok = mbstrtok(cmd2, SP);
    while (tok != NULL) {
        if ((len = strlen(tok)) > 0) {
            if ((*((*proc)->argv + (*proc)->argc) = (char*)
                        malloc(sizeof(char) * (len + 1))) == NULL) {
                status = -3; goto ERR;
            }
            memcpy(*((*proc)->argv + (*proc)->argc), tok, len);
            *(*((*proc)->argv + (*proc)->argc) + len) = '\0';
            (*proc)->argc++;
        }
        tok = mbstrtok(NULL, SP);
    }
    *((*proc)->argv + (*proc)->argc) = NULL;

    return 0;

ERR:
    switch (status) {
        case    -1:
        case    -2:
            break;
        case    -3:
            release_argv_proc(*proc);
            (*proc)->argc = 0;
            (*proc)->argv = NULL;
            break;
    }

    return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
cmpq $0x0, 0x8(%rdi)
je 0x45b2
callq 0x4ce5
movq (%rbx), %rax
andl $0x0, 0x4(%rax)
andq $0x0, 0x8(%rax)
movq %r14, %rdi
callq 0x21b0
testq %rax, %rax
je 0x468a
movq %rax, %r12
leaq 0x1(%rax), %rdi
callq 0x20e0
pushq $-0x2
popq %rbp
testq %rax, %rax
je 0x46b9
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2470
movb $0x0, (%r15,%r12)
xorl %edi, %edi
callq 0x2120
leaq (,%rax,8), %rdi
callq 0x20e0
movq (%rbx), %rcx
movq %rax, 0x8(%rcx)
testq %rax, %rax
je 0x46b9
movq %r15, %rdi
callq 0x4d2b
movq %rax, %r14
testq %rax, %rax
je 0x468f
movq %r14, %rdi
callq 0x21b0
testq %rax, %rax
je 0x4686
movq %rax, %r15
leaq 0x1(%rax), %rdi
callq 0x20e0
movq (%rbx), %rcx
movq 0x8(%rcx), %rdx
movslq 0x4(%rcx), %rcx
movq %rax, (%rdx,%rcx,8)
movq (%rbx), %rdi
testq %rax, %rax
je 0x46a2
movq 0x8(%rdi), %rax
movslq 0x4(%rdi), %rcx
movq (%rax,%rcx,8), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2470
movq (%rbx), %rax
movq 0x8(%rax), %rcx
movslq 0x4(%rax), %rax
movq (%rcx,%rax,8), %rax
movb $0x0, (%rax,%r15)
movq (%rbx), %rax
incl 0x4(%rax)
xorl %edi, %edi
jmp 0x4618
pushq $-0x1
popq %rbp
jmp 0x46b9
movq (%rbx), %rcx
movslq 0x4(%rcx), %rax
shlq $0x3, %rax
addq 0x8(%rcx), %rax
xorl %ebp, %ebp
jmp 0x46b5
callq 0x4ce5
movq (%rbx), %rax
andl $0x0, 0x4(%rax)
addq $0x8, %rax
pushq $-0x3
popq %rbp
andq $0x0, (%rax)
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/proc.c
// Function: set_cmd_argv_proc
static
int set_cmd_argv_proc(PROC** proc, char* const argv[])
{
    int     i       = 0,
            status  = 0;

    size_t  len     = 0;

    if ((*proc)->argv != NULL) {
        release_argv_proc(*proc);
        (*proc)->argc = 0;
        (*proc)->argv = NULL;
    }

    while (*(argv + (*proc)->argc) != NULL)
        (*proc)->argc++;

    if (((*proc)->argv = (char**)
            malloc(sizeof(char*) * ((*proc)->argc + 1))) == NULL) {
        status = -1; goto ERR;
    }
    while (i < (*proc)->argc) {
        len = strlen(*(argv + i));
        if ((*((*proc)->argv + i) = (char*)
                    malloc(sizeof(char) * (len + 1))) == NULL) {
            status = -2; goto ERR;
        }
        memcpy(*((*proc)->argv + i), *(argv + i), len);
        *(*((*proc)->argv + i) + len) = '\0';
        i++;
    }
    *((*proc)->argv + (*proc)->argc) = NULL;

    return 0;

ERR:
    switch (status) {
        case    -1:
        case    -2:
            break;
        case    -3:
            release_argv_proc(*proc);
            (*proc)->argc = 0;
            (*proc)->argv = NULL;
            break;
    }

    return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r15
cmpq $0x0, 0x8(%r15)
je 0x46f6
movq %r15, %rdi
callq 0x4ce5
movq (%r14), %rax
andl $0x0, 0x4(%rax)
andq $0x0, 0x8(%rax)
movq (%r14), %r15
movabsq $0x100000000, %rax      # imm = 0x100000000
movslq 0x4(%r15), %rdi
leaq (%rbx,%rdi,8), %rcx
leal 0x1(%rdi), %edx
shlq $0x20, %rdi
addq %rax, %rdi
cmpq $0x0, (%rcx)
je 0x4727
movl %edx, 0x4(%r15)
addq %rax, %rdi
addq $0x8, %rcx
incl %edx
jmp 0x4712
sarq $0x1d, %rdi
callq 0x20e0
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0x4799
xorl %r12d, %r12d
pushq $-0x2
popq %rbp
movq (%r14), %r13
movslq 0x4(%r13), %rax
cmpq %rax, %r12
jge 0x479e
movq (%rbx,%r12,8), %rdi
callq 0x21b0
movq %rax, %r15
leaq 0x1(%rax), %rdi
callq 0x20e0
movq 0x8(%r13), %rcx
movq %rax, (%rcx,%r12,8)
testq %rax, %rax
je 0x47a9
movq (%r14), %rax
movq 0x8(%rax), %rax
movq (%rax,%r12,8), %rdi
movq (%rbx,%r12,8), %rsi
movq %r15, %rdx
callq 0x2470
movq (%r14), %rax
movq 0x8(%rax), %rax
movq (%rax,%r12,8), %rax
movb $0x0, (%rax,%r15)
incq %r12
jmp 0x473f
pushq $-0x1
popq %rbp
jmp 0x47a9
movq 0x8(%r13), %rcx
andq $0x0, (%rcx,%rax,8)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/proc.c
// Function: set_env_proc
static
int set_env_proc(PROC** proc, char* const env[])
{
    int     status  = 0;

    size_t  i       = 0,
            envc    = 0,
            len     = 0;

    if ((*proc)->envp != NULL) {
        release_env_proc(*proc);
        (*proc)->envp = NULL;
    }

    while (*(env + envc) != NULL)
        envc++;
    if (((*proc)->envp = (char**)
                malloc(sizeof(char*) * envc)) == NULL) {
        status = -1; goto ERR;
    }
    while (i < envc) {
        len = strlen(*(env + i));
        if ((*((*proc)->envp + i) = (char*)
                malloc(sizeof(char) * (len + 1))) == NULL) {
            status = -2; goto ERR;
        }
        memcpy(*((*proc)->envp + i), *(env + i), len);
        *(*((*proc)->envp + i) + len) = '\0';
        i++;
    }
    *((*proc)->envp + i) = NULL;

    return 0;

ERR:
    switch (status) {
        case    -1:
            break;
        case    -2:
            release_env_proc(*proc);
            (*proc)->envp = NULL;
            break;
    }

    return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x47e2
callq 0x4d66
movq (%rbx), %rax
andq $0x0, 0x10(%rax)
pushq $-0x1
popq %r13
pushq $0x8
popq %r12
addq $-0x8, %r12
cmpq $0x0, 0x8(%r14,%r13,8)
leaq 0x1(%r13), %r13
jne 0x47ea
movq %r12, %rdi
negq %rdi
callq 0x20e0
movq (%rbx), %rcx
movq %rax, 0x10(%rcx)
testq %rax, %rax
je 0x4869
xorl %ebp, %ebp
cmpq %rbp, %r13
je 0x486e
movq (%r14,%rbp,8), %rdi
callq 0x21b0
movq %rax, %r15
leaq 0x1(%rax), %rdi
callq 0x20e0
movq (%rbx), %rcx
movq 0x10(%rcx), %rcx
movq %rax, (%rcx,%rbp,8)
movq (%rbx), %rdi
testq %rax, %rax
je 0x487c
movq 0x10(%rdi), %rax
movq (%rax,%rbp,8), %rdi
movq (%r14,%rbp,8), %rsi
movq %r15, %rdx
callq 0x2470
movq (%rbx), %rax
movq 0x10(%rax), %rax
movq (%rax,%rbp,8), %rax
movb $0x0, (%rax,%r15)
incq %rbp
jmp 0x4813
pushq $-0x1
popq %rax
jmp 0x488f
movq (%rbx), %rax
movq 0x10(%rax), %rcx
subq %r12, %rcx
xorl %eax, %eax
jmp 0x488b
callq 0x4d66
movq (%rbx), %rcx
addq $0x10, %rcx
pushq $-0x2
popq %rax
andq $0x0, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/sasairc[P]clangsay/src/libbenly/src/proc.c
// Function: unset_env_proc
static
void unset_env_proc(PROC** proc)
{
    if ((*proc)->envp != NULL) {
        release_env_proc(*proc);
        (*proc)->envp = NULL;
    }

    return;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x48b9
callq 0x4d66
movq (%rbx), %rax
andq $0x0, 0x10(%rax)
popq %rbx
retq