LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/eiselekd[P]MinimalLisp/./lf1.c
// Function: lf_apply_p
v *
lf_apply_p(lfctx *lfctx) 
{
    fctx *cctx = (fctx *)lfctx; v *env = 0;
    v *fn = POP; v *args = POP; v *r = 0, *benv; int a = 0, isop = 0;
    if( (isop = ((fn->tag == FUNC) ? 0 : 1)) || fwordp(fn)) {
        benv = TOSE;
        if (FN_FUNCENVP(fn))
            benv = funcenv(fn);
        /* if (FN_ARGBINDP(fn)) */
        /*     benv = evbind(car(func(fn)), args, benv); /\* error, todo: bind eval'ed args  *\/ */
        env = benv;
        a = (FN_ARGEVALP(fn)) ? 1 : 0;
    } else {
        fprintf(stderr, "Cannot apply to "); print((ctx*)cctx, stderr, fn); fprintf(stderr, "\n"); 
    }
    PUSH(env);
    PUSH(args);
    PUSH(fn);
    PUSH(mkInt(isop));
    PUSH(mkInt(a));
    return r;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x120(%rdi), %rdx
movq 0x120(%rdi), %rcx
testq %rcx, %rcx
je 0xd70c
movq 0x10(%rcx), %rax
movq %rax, (%rdx)
movq 0x8(%rcx), %rsi
testq %rax, %rax
je 0xd712
movq 0x10(%rax), %rcx
movq %rcx, (%rdx)
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xd71c
xorl %ecx, %ecx
xorl %esi, %esi
jmp 0xd714
xorl %ecx, %ecx
movq $0x0, -0x30(%rbp)
movl (%rsi), %r13d
movl %r13d, %r15d
andl $0xf, %r15d
cmpl $0x4, %r15d
movq %rdx, -0x48(%rbp)
movq %rsi, -0x40(%rbp)
je 0xd844
movq 0x178(%rdi), %rax
testq %rax, %rax
je 0xd74a
movq 0x8(%rax), %r12
jmp 0xd74d
xorl %r12d, %r12d
testb $0x20, %r13b
je 0xd757
movq 0x10(%rsi), %r12
movq %rcx, -0x38(%rbp)
shrl $0x4, %r13d
andl $0x1, %r13d
xorl %ebx, %ebx
cmpl $0x4, %r15d
setne %bl
movl $0x18, %edi
callq 0x2100
movq %rax, %r15
xorl %eax, %eax
movl %eax, (%r15)
xorl %r14d, %r14d
movq %r12, 0x8(%r15)
movq -0x38(%rbp), %rax
movq %rax, 0x10(%r15)
movl $0x18, %edi
callq 0x2100
movq %rax, %r12
movl %r14d, (%rax)
movq -0x30(%rbp), %rax
movq %rax, 0x8(%r12)
movq %r15, 0x10(%r12)
movl $0x18, %edi
callq 0x2100
movq %rax, %r15
movl %r14d, (%rax)
movq -0x40(%rbp), %rax
movq %rax, 0x8(%r15)
movq %r12, 0x10(%r15)
movl $0x18, %edi
callq 0x2100
movq %rax, %r14
movl $0x1, %eax
movl %eax, (%r14)
movq %rbx, 0x8(%r14)
movl $0x18, %edi
callq 0x2100
movq %rax, %r12
xorl %eax, %eax
movl %eax, (%r12)
xorl %ebx, %ebx
movq %r14, 0x8(%r12)
movq %r15, 0x10(%r12)
movl $0x18, %edi
callq 0x2100
movq %rax, %r14
movl $0x1, %eax
movl %eax, (%r14)
movq %r13, 0x8(%r14)
movl $0x18, %edi
callq 0x2100
movl %ebx, (%rax)
movq %r14, 0x8(%rax)
movq %r12, 0x10(%rax)
movq -0x48(%rbp), %rcx
movq %rax, (%rcx)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x50(%rbp), %r12
movq %r12, %rcx
callq 0x2253
movq (%r12), %rax
movq %rax, -0x38(%rbp)
xorl %r12d, %r12d
xorl %r13d, %r13d
jmp 0xd763
// File: /workspace/github_c_makefile_star2_O3/eiselekd[P]MinimalLisp/./lf1.c
// Function: lf_remap
void
lf_remap(lfctx *lfctx)
{
    struct ctx *lctx = (struct ctx *) lfctx;
    struct fctx *fctx = (struct fctx *)lfctx;
    v *le = 0, *fe; struct lf_maps *c = m;
    while(c->ln && c->fn) {
        if ((le = assq(unique(lctx,c->ln, strlen(c->ln)), lctx->env)) &&
            (fe = assq(unique(lctx,c->fn, strlen(c->fn)), fctx->env))) {
            rplacd(le,cdr(fe));
            printf("Map %s to %s (0x%p)\n", c->ln, c->fn, cdr(fe));
        } else {
            printf("Cannot map %s to %s\n", c->ln, c->fn);
        }
        c++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x478f(%rip), %r12      # 0x132d0
testq %r12, %r12
je 0xec26
movq %rdi, %rbx
leaq 0x477c(%rip), %r13      # 0x132d0
leaq 0x931(%rip), %r14       # 0xf48c
cmpq $0x0, 0x8(%r13)
je 0xec26
movq %r12, %rdi
callq 0x2060
movq %rbx, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x3608
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0xebe1
movq 0x8(%rcx), %r15
testq %r15, %r15
je 0xeb95
cmpq %rax, 0x8(%r15)
jne 0xeb9a
jmp 0xeba0
testq %rax, %rax
je 0xebe1
movq 0x10(%rcx), %rcx
jmp 0xeb7f
movq 0x8(%r13), %r12
movq %r12, %rdi
callq 0x2060
movq %rbx, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x3608
movq 0x148(%rbx), %rcx
testq %rcx, %rcx
je 0xebe1
movq 0x8(%rcx), %rdx
testq %rdx, %rdx
je 0xebd6
cmpq %rax, 0x8(%rdx)
jne 0xebdb
jmp 0xec06
testq %rax, %rax
je 0xebe1
movq 0x10(%rcx), %rcx
jmp 0xebc0
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2070
movq 0x10(%r13), %r12
addq $0x10, %r13
testq %r12, %r12
jne 0xeb5b
jmp 0xec26
movq 0x10(%rdx), %rcx
movq %rcx, 0x10(%r15)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
leaq 0x85a(%rip), %rdi       # 0xf477
xorl %eax, %eax
callq 0x2070
jmp 0xebf3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/soso7885[P]OPCUA_example/demo_src/server_datasource.c
// Function: writeInteger
static UA_StatusCode
writeInteger(void *handle, const UA_NodeId nodeid,
             const UA_Variant *data, const UA_NumericRange *range) {
    if(UA_Variant_isScalar(data) && data->type == &UA_TYPES[UA_TYPES_INT32] && data->data){
        *(UA_UInt32*)handle = *(UA_UInt32*)data->data;
    }
    // we know the nodeid is a string
    UA_LOG_INFO(logger, UA_LOGCATEGORY_USERLAND, "Node written %.*s",
                nodeid.identifier.string.length, nodeid.identifier.string.data);
    UA_LOG_INFO(logger, UA_LOGCATEGORY_USERLAND, "written value %i", *(UA_UInt32*)handle);
    return UA_STATUSCODE_GOOD;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x10(%rsi)
jne 0x14db
movq 0x18(%rsi), %rax
cmpq $0x2, %rax
jb 0x14db
movl $0xc8, %ecx
addq 0x2b06(%rip), %rcx      # 0x3fd8
cmpq %rcx, (%rsi)
jne 0x14db
movl (%rax), %eax
movl %eax, (%rbx)
movq 0x2b96(%rip), %r9       # 0x4078
testq %r9, %r9
je 0x152d
leaq 0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq 0x10(%rax), %r8
leaq 0xb53(%rip), %rdx       # 0x204d
movl $0x2, %edi
movl $0x5, %esi
xorl %eax, %eax
callq *%r9
movq 0x2b68(%rip), %r8       # 0x4078
testq %r8, %r8
je 0x152d
movl (%rbx), %ecx
leaq 0xb41(%rip), %rdx       # 0x205f
movl $0x2, %edi
movl $0x5, %esi
xorl %eax, %eax
callq *%r8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/giometti[P]mastering_UNIX_programming/chapter_09/scdu_mod13.c
// Function: mod_crypt
void mod_crypt(char *text, size_t n)
{
        int i, c;
        char base;

        for (i = 0; i < n; i++) {
                if ((text[i] >= 'a') && (text[i] <= 'z')) 
                        base = 'a';
                else if ((text[i] >= 'A') && (text[i] <= 'Z'))
                        base = 'A';
		else
			continue;

                c = text[i] - base;
                c = (c + 13) % 26;
                text[i] = c + base;
        }
}

// Assembly:
testq %rsi, %rsi
je 0x105c
xorl %eax, %eax
movb (%rdi,%rax), %dl
leal -0x61(%rdx), %r8d
movb $0x61, %cl
cmpb $0x1a, %r8b
jb 0x1022
leal -0x41(%rdx), %r8d
movb $0x41, %cl
cmpb $0x19, %r8b
ja 0x1054
subb %cl, %dl
addb $0xd, %dl
movsbl %dl, %edx
imull $0x4f, %edx, %r8d
movzwl %r8w, %r9d
shrl $0xb, %r8d
shrl $0xf, %r9d
addb %r8b, %r9b
movzbl %r9b, %r8d
leal (%r8,%r8,4), %r9d
leal (%r9,%r9,4), %r9d
addl %r8d, %r9d
subb %r9b, %dl
addb %cl, %dl
movb %dl, (%rdi,%rax)
incq %rax
cmpq %rax, %rsi
jne 0x1007
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_06/define.c
// Function: consume_comments
void consume_comments(void)
{
  int c = getc(stdin);
  if (c == '/')
  {
    putc(c, stdout);

    c = getc(stdin);
    if (c == '/')
    {
      putc(c, stdout);
      while ((c = getc(stdin)) != '\n' && c != EOF)
      {
        putc(c, stdout);
      }
    }
    else if (c == '*')
    {
      putc(c, stdout);
      while ((c = getc(stdin)) != EOF)
      {
        putc(c, stdout);
        if (c == '*')
        {
          c = getc(stdin);
          putc(c, stdout);
          if (c == '/')
          {
            break;
          }
        }
      }

      c = getc(stdin);
      if (c == '/')
      {
        putc(c, stdout);
        return;
      }
    }
  }
  ungetc(c, stdin);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x2b66(%rip), %r14      # 0x3fe0
movq (%r14), %rdi
callq 0x10c0
cmpl $0x2f, %eax
jne 0x1545
movq 0x2b46(%rip), %r15      # 0x3fd8
movq (%r15), %rsi
movl $0x2f, %edi
callq 0x1080
movq (%r14), %rdi
callq 0x10c0
cmpl $0x2a, %eax
je 0x14d3
cmpl $0x2f, %eax
jne 0x1545
movq (%r15), %rsi
movl %eax, %edi
callq 0x1080
movq (%r14), %rdi
callq 0x10c0
cmpl $-0x1, %eax
je 0x1545
cmpl $0xa, %eax
jne 0x14b5
jmp 0x1545
movq (%r15), %rsi
movl $0x2a, %edi
callq 0x1080
movq (%r14), %rdi
callq 0x10c0
cmpl $-0x1, %eax
je 0x1526
movl %eax, %ebx
movq (%r15), %rsi
movl %ebx, %edi
callq 0x1080
cmpl $0x2a, %ebx
jne 0x1517
movq (%r14), %rdi
callq 0x10c0
movl %eax, %ebx
movq (%r15), %rsi
movl %eax, %edi
callq 0x1080
cmpl $0x2f, %ebx
je 0x1526
movq (%r14), %rdi
callq 0x10c0
movl %eax, %ebx
cmpl $-0x1, %eax
jne 0x14ef
movq (%r14), %rdi
callq 0x10c0
cmpl $0x2f, %eax
jne 0x1545
movq (%r15), %rsi
movl $0x2f, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x1080
movq (%r14), %rsi
movl %eax, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x10b0
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_06/define.c
// Function: consume_preproc
void consume_preproc(void)
{
  int c = getc(stdin);
  if (c == '#')
  {
    putc(c, stdout);

    char word[MAX_WORD_LEN];
    consume_word(word, "Error: expected preprocessor directive.");

    enum directive_type directive = NONE;
    if (strcmp(word, "define") == 0)
    {
      directive = DEFINE;
    }
    else if (strcmp(word, "undef") == 0)
    {
      directive = UNDEF;
    }

    if (directive)
    {
      consume_blanks();
      consume_word(word, "Error: invalid name.");
    }

    if (directive == DEFINE)
    {
      consume_blanks();
      char definition[MAX_WORD_LEN];
      get_alnum_str(definition, MAX_WORD_LEN);
      printf("%s", definition);

      struct list_node *node_p = lookup(definition);
      if (node_p != NULL)
      {
        install(word, node_p->definition);
      }
      else
      {
        install(word, definition);
      }
    }
    else if (directive == UNDEF)
    {
      undef(word);
    }
  }
  else
  {
    ungetc(c, stdin);
  }
}

// Assembly:
pushq %rbx
subq $0xe0, %rsp
movq 0x2a5f(%rip), %rbx      # 0x3fe0
movq (%rbx), %rdi
callq 0x10c0
cmpl $0x23, %eax
jne 0x1608
movq 0x2a43(%rip), %rax      # 0x3fd8
movq (%rax), %rsi
movl $0x23, %edi
callq 0x1080
leaq 0xa5e(%rip), %rsi       # 0x2007
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x1956
movl $0x69666564, %eax       # imm = 0x69666564
xorl (%rbx), %eax
movl $0x656e69, %ecx         # imm = 0x656E69
xorl 0x3(%rbx), %ecx
xorl %ebx, %ebx
orl %eax, %ecx
setne %al
je 0x161a
movl $0x65646e75, %ecx       # imm = 0x65646E75
xorl (%rsp), %ecx
movzwl 0x4(%rsp), %edx
xorl $0x66, %edx
orl %ecx, %edx
jne 0x1679
movb %al, %bl
callq 0x19b8
leaq 0xa4a(%rip), %rsi       # 0x203c
movq %rsp, %rdi
callq 0x1956
testl %ebx, %ebx
je 0x162e
movq %rsp, %rdi
callq 0x17ce
jmp 0x1679
movq (%rbx), %rsi
movl %eax, %edi
addq $0xe0, %rsp
popq %rbx
jmp 0x10b0
callq 0x19b8
leaq 0xa16(%rip), %rsi       # 0x203c
movq %rsp, %rdi
callq 0x1956
callq 0x19b8
leaq 0x70(%rsp), %rbx
movl $0x64, %esi
movq %rbx, %rdi
callq 0x18ce
leaq 0x9b8(%rip), %rdi       # 0x2004
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
callq 0x13e0
testq %rax, %rax
je 0x166c
movq 0x8(%rax), %rsi
movq %rsp, %rdi
jmp 0x1674
movq %rsp, %rdi
leaq 0x70(%rsp), %rsi
callq 0x16fe
addq $0xe0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_06/define.c
// Function: get_alnum_str
size_t get_alnum_str(char *str, size_t max_str_len)
{
  size_t i = 0;
  int c;
  while (isalnum(c = getc(stdin)) && i < max_str_len)
  {
    str[i++] = c;
  }
  str[i] = '\0';
  ungetc(c, stdin);
  return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x10d0
movq %rax, %r15
movq (%rax), %r12
movq 0x26ef(%rip), %r13      # 0x3fe0
movq (%r13), %rdi
callq 0x10c0
movslq %eax, %rcx
testb $0x8, (%r12,%rcx,2)
sete %cl
testq %r14, %r14
sete %dl
xorl %r12d, %r12d
orb %cl, %dl
jne 0x1934
movb %al, (%rbx,%r12)
incq %r12
movq (%r15), %rbp
movq (%r13), %rdi
callq 0x10c0
movslq %eax, %rcx
testb $0x8, (%rbp,%rcx,2)
je 0x1934
cmpq %r14, %r12
jb 0x1912
movb $0x0, (%rbx,%r12)
movq (%r13), %rsi
movl %eax, %edi
callq 0x10b0
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_06/define.c
// Function: consume_word
void consume_word(char *word, char *Error_str)
{
  int c;
  if ((c = get_word(word, MAX_WORD_LEN)) == EOF)
  {
    ungetc(c, stdin);
    return;
  }
  else if (!isalpha(c))
  {
    puts(Error_str);
  }
  printf("%s", word);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x64, %esi
callq 0x1307
cmpl $-0x1, %eax
je 0x19a0
movl %eax, %ebp
callq 0x10d0
movq (%rax), %rax
movslq %ebp, %rcx
testb $0x4, 0x1(%rax,%rcx,2)
jne 0x198b
movq %r14, %rdi
callq 0x1050
leaq 0x672(%rip), %rdi       # 0x2004
movq %rbx, %rsi
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x1070
movq 0x2639(%rip), %rax      # 0x3fe0
movq (%rax), %rsi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
jmp 0x10b0
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_06/define.c
// Function: consume_blanks
void consume_blanks(void)
{
  int c;
  while (isblank(c = getc(stdin)))
  {
    putc(c, stdout);
  }
  ungetc(c, stdin);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
callq 0x10d0
movq %rax, %rbx
movq (%rax), %r15
movq 0x260e(%rip), %r14      # 0x3fe0
movq (%r14), %rdi
callq 0x10c0
movslq %eax, %rcx
testb $0x1, (%r15,%rcx,2)
je 0x1a0a
movq 0x25ed(%rip), %r15      # 0x3fd8
movq (%r15), %rsi
movl %eax, %edi
callq 0x1080
movq (%rbx), %r12
movq (%r14), %rdi
callq 0x10c0
movslq %eax, %rcx
testb $0x1, (%r12,%rcx,2)
jne 0x19eb
movq (%r14), %rsi
movl %eax, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x10b0
// File: /workspace/github_c_makefile_star2_O3/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_6/exercise_6_06/define.c
// Function: consume_chars_between
void consume_chars_between(char start, char end)
{
  int c = getc(stdin);
  if (c == start)
  {
    putc(c, stdout);
    while ((c = getc(stdin)) != EOF)
    {
      putc(c, stdout);
      if (c == '\\')
      {
        c = getc(stdin);
        putc(c, stdout);
        if (c == EOF)
        {
          break;
        }
      }
      else if (c == end)
      {
        return;
      }
    }
  }
  ungetc(c, stdin);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movl %edi, %r14d
movq 0x25aa(%rip), %r15      # 0x3fe0
movq (%r15), %rdi
callq 0x10c0
movl %eax, %ebx
cmpl %r14d, %eax
jne 0x1ab3
movq 0x258c(%rip), %r12      # 0x3fd8
movq (%r12), %rsi
movl %ebx, %edi
callq 0x1080
movq (%r15), %rdi
callq 0x10c0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x1ab3
movl %eax, %r14d
movsbl %bpl, %r13d
movq (%r12), %rsi
movl %r14d, %edi
callq 0x1080
cmpl $0x5c, %r14d
jne 0x1a9e
movq (%r15), %rdi
callq 0x10c0
movl %eax, %ebp
movq (%r12), %rsi
movl %eax, %edi
callq 0x1080
cmpl $-0x1, %ebp
jne 0x1aa3
jmp 0x1ab3
cmpl %r13d, %r14d
je 0x1acb
movq (%r15), %rdi
callq 0x10c0
movl %eax, %r14d
cmpl $-0x1, %eax
jne 0x1a70
movq (%r15), %rsi
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/juliusHuelsmann[P]st-focus/x.c
// Function: xloadalpha
void
xloadalpha(void)
{
	float const usedAlpha = focused ? alpha : alphaUnfocused;
	if (opt_alpha) alpha = strtof(opt_alpha, NULL);
	dc.col[defaultbg].color.alpha = (unsigned short)(0xffff * usedAlpha);
	dc.col[defaultbg].pixel &= 0x00FFFFFF;
	dc.col[defaultbg].pixel |= (unsigned char)(0xff * usedAlpha) << 24;
}

// Assembly:
pushq %rax
movss 0xb451(%rip), %xmm1     # 0x154e0
movq 0xdaca(%rip), %rdi      # 0x17b60
testq %rdi, %rdi
je 0xa0b6
xorl %esi, %esi
movss %xmm1, 0x4(%rsp)
callq 0x5450
movss 0x4(%rsp), %xmm1
movss %xmm0, 0xb426(%rip)     # 0x154dc
movss 0x49b2(%rip), %xmm0     # 0xea70
mulss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movq 0xda9b(%rip), %rcx      # 0x17b68
movl 0xda85(%rip), %edx      # 0x17b58
shlq $0x4, %rdx
movw %ax, 0xe(%rcx,%rdx)
movq (%rcx,%rdx), %rax
andl $0xffffff, %eax         # imm = 0xFFFFFF
mulss 0x4987(%rip), %xmm1     # 0xea74
cvttss2si %xmm1, %esi
shll $0x18, %esi
movslq %esi, %rsi
orq %rax, %rsi
movq %rsi, (%rcx,%rdx)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/juliusHuelsmann[P]st-focus/x.c
// Function: xloadcols
void
xloadcols(void)
{
	static int loaded;
	Color *cp;

	if (!loaded) {
		dc.collen = 1 + (defaultbg = MAX(LEN(colorname), 256));
		dc.col = xmalloc((dc.collen) * sizeof(Color));
	}

	for (int i = 0; i+1 < dc.collen; ++i)
		if (!xloadcolor(i, NULL, &dc.col[i])) {
			if (colorname[i])
				die("could not allocate color '%s'\n", colorname[i]);
			else
				die("could not allocate color %d\n", i);
		}
	if (dc.collen) // cannot die, as the color is already loaded.
		xloadcolor(focused ?bg :bgUnfocused, NULL, &dc.col[defaultbg]);

	xloadalpha();
	loaded = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpb $0x0, 0xdb50(%rip)      # 0x17c60
jne 0xa138
movl $0x103, 0xda3c(%rip)    # imm = 0x103
movq $0x104, 0xda49(%rip) # imm = 0x104
movl $0x1040, %edi           # imm = 0x1040
callq 0x5e3c
movq %rax, 0xda30(%rip)      # 0x17b68
movq 0xda31(%rip), %rax      # 0x17b70
cmpq $0x2, %rax
jb 0xa1c0
leaq 0x88c4(%rip), %r12      # 0x12a10
leaq 0x4a54(%rip), %rbx      # 0xeba7
leaq 0x4a2e(%rip), %r14      # 0xeb88
xorl %r13d, %r13d
xorl %r15d, %r15d
movq 0xda01(%rip), %rdx      # 0x17b68
addq %r13, %rdx
movl %r15d, %edi
xorl %esi, %esi
callq 0xa1f9
testl %eax, %eax
jne 0xa1a1
leaq -0x10(%r15), %rax
cmpq $0xf0, %rax
jae 0xa193
movq %rbx, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x5e66
jmp 0xa1a1
movq (%r12), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x5e66
movq 0xd9c8(%rip), %rax      # 0x17b70
leaq 0x1(%r15), %rcx
addq $0x8, %r12
addq $0x10, %r13
addq $0x2, %r15
cmpq %r15, %rax
movq %rcx, %r15
ja 0xa160
testq %rax, %rax
je 0xa1e3
movl 0xb321(%rip), %edi      # 0x154ec
movl 0xd987(%rip), %edx      # 0x17b58
shlq $0x4, %rdx
addq 0xd98c(%rip), %rdx      # 0x17b68
xorl %esi, %esi
callq 0xa1f9
callq 0xa086
movb $0x1, 0xda71(%rip)      # 0x17c60
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/deepika9294[P]Threading-Library/many-one/test/matrix.c
// Function: print_matrix
void print_matrix(matrix *t) {
    printf("\n");
    // printf("%d %d\n",t->r,t->c);
    // t->mat[5][5] = 34;

    for(int i = 0; i < t->r; i++) {
        for(int j = 0; j < t->c; j++) {
            // printf("%d ", t->mat[i][j]);
            // just for test case
            if(t->mat[i][j] != 80){
                final_check = 0;
            }
        }
        // printf("\n");
    }
    if(final_check == 1) {
        printf(GREEN "**PASSED** : MATRIX TEST with rows=%d, columns=%d\n" NONE, t->r, t->c);
    }
    else {
        printf(RED "**FAILED** : MATRIX TEST with rows=%d, columns=%d\n" NONE,  t->r, t->c);

    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xa, %edi
callq 0x1050
movslq 0x8(%rbx), %rsi
testq %rsi, %rsi
jle 0x1a57
movl 0xc(%rbx), %eax
xorl %ecx, %ecx
testl %eax, %eax
jle 0x1a4f
movq (%rbx), %rdx
movq (%rdx,%rcx,8), %rdx
xorl %edi, %edi
cmpl $0x50, (%rdx,%rdi,4)
je 0x1a47
movl $0x0, 0x2669(%rip)      # 0x40b0
incq %rdi
cmpq %rdi, %rax
jne 0x1a37
incq %rcx
cmpq %rsi, %rcx
jne 0x1a2a
cmpl $0x1, 0x2652(%rip)      # 0x40b0
movl 0xc(%rbx), %edx
leaq 0x5c9(%rip), %rax       # 0x2031
leaq 0x602(%rip), %rdi       # 0x2071
cmoveq %rax, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x10a0
// File: /workspace/github_c_makefile_star2_O3/mflatt[P]gc-demo/gen2space/gen2space.c
// Function: is_allocated
int is_allocated(void *p)
{
  return (((uintptr_t)p >= space_start
           && (uintptr_t)p < space_end)
          || (is_major
              /* During a major collection, also treat references
                 into the old generation's space as allocated: */
              && ((uintptr_t)p >= gen1_space_start
                  && (uintptr_t)p < gen1_space_end)));
}

// Assembly:
leaq 0x3046(%rip), %rax      # 0x44b0
cmpq %rdi, (%rax)
ja 0x1481
leaq 0x2c22(%rip), %rcx      # 0x4098
movl $0x1, %eax
cmpq %rdi, (%rcx)
jbe 0x1481
retq
xorl %eax, %eax
cmpb $0x1, 0x2bee(%rip)      # 0x4078
jne 0x1480
cmpq %rdi, 0x2bed(%rip)      # 0x4080
setbe %al
cmpq %rdi, 0x2bcb(%rip)      # 0x4068
seta %cl
andb %al, %cl
movzbl %cl, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: logging
void logging(enum loglevel_t loglevel, char *format, ...)
{
	va_list arg;
	static const char *loglevel2str[] = {
		[DEBUG] = "DEBUG",
		[WARN]  = "WARN",
		[ERROR] = "ERROR",
		[FATAL] = "FATAL",
	};

	/* debug message is available on verbose mode */
	if ((loglevel == DEBUG) && (VERBOSE == false))
		return;

	fprintf(stderr, ">>%s<<\t", loglevel2str[loglevel]);

	va_start(arg, format);
	vfprintf(stderr, format, arg);
	va_end(arg);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x24b5
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 %edi, %edi
jne 0x24c4
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
movq %rsi, %rbx
movq 0x53b2a(%rip), %r14     # 0x55ff8
movq (%r14), %rax
movl %edi, %ecx
leaq 0x609a(%rip), %rsi      # 0x8574
movslq (%rsi,%rcx,4), %rdx
addq %rsi, %rdx
leaq 0x5037c(%rip), %rsi     # 0x52864
movq %rax, %rdi
xorl %eax, %eax
callq 0x21a0
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rdx)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rdx)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x22a0
jmp 0x24b9
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: eopen
int eopen(const char *path, int flag)
{
	int fd;
	errno = 0;

	if ((fd = open(path, flag)) < 0) {
		logging(ERROR, "couldn't open \"%s\"\n", path);
		logging(ERROR, "open: %s\n", strerror(errno));
	}
	return fd;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r15
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
movq %r15, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x2270
movl %eax, %ebx
testl %eax, %eax
jns 0x2582
leaq 0x50317(%rip), %rsi     # 0x5286c
movl $0x2, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x245c
movl (%r14), %edi
callq 0x22e0
leaq 0x5030e(%rip), %rsi     # 0x52881
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: efopen
FILE *efopen(const char *path, char *mode)
{
	FILE *fp;
	errno = 0;

	if ((fp = fopen(path, mode)) == NULL) {
		logging(ERROR, "couldn't open \"%s\"\n", path);
		logging(ERROR, "fopen: %s\n", strerror(errno));
	}
	return fp;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2280
movq %rax, %rbx
testq %rax, %rax
jne 0x2633
leaq 0x50266(%rip), %rsi     # 0x5286c
movl $0x2, %edi
movq %r15, %rdx
xorl %eax, %eax
callq 0x245c
movl (%r14), %edi
callq 0x22e0
leaq 0x5025c(%rip), %rsi     # 0x52880
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: efclose
int efclose(FILE *fp)
{
	int ret;
	errno = 0;

	if ((ret = fclose(fp)) < 0)
		logging(ERROR, "fclose: %s\n", strerror(errno));

	return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
movq %rbx, %rdi
callq 0x20c0
movl %eax, %ebx
testl %eax, %eax
jns 0x267d
movl (%r14), %edi
callq 0x22e0
leaq 0x5021d(%rip), %rsi     # 0x5288b
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: emmap
void *emmap(void *addr, size_t len, int prot, int flag, int fd, off_t offset)
{
	void *fp;
	errno = 0;

	if ((fp = mmap(addr, len, prot, flag, fd, offset)) == MAP_FAILED)
		logging(ERROR, "mmap: %s\n", strerror(errno));

	return fp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movl %r8d, %ebp
movl %ecx, %r15d
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %rbx
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
movq %rbx, %rdi
movq %r13, %rsi
movl %r12d, %edx
movl %r15d, %ecx
movl %ebp, %r8d
movq (%rsp), %r9
callq 0x20e0
movq %rax, %rbx
cmpq $-0x1, %rax
jne 0x26f2
movl (%r14), %edi
callq 0x22e0
leaq 0x501b4(%rip), %rsi     # 0x52897
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: emunmap
int emunmap(void *ptr, size_t len)
{
	int ret;
	errno = 0;

	if ((ret = munmap(ptr, len)) < 0)
		logging(ERROR, "munmap: %s\n", strerror(errno));

	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2230
movl %eax, %ebx
testl %eax, %eax
jns 0x274c
movl (%r14), %edi
callq 0x22e0
leaq 0x50164(%rip), %rsi     # 0x528a1
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: ecalloc
void *ecalloc(size_t nmemb, size_t size)
{
	void *ptr;
	errno = 0;

	if ((ptr = calloc(nmemb, size)) == NULL)
		logging(ERROR, "calloc: %s\n", strerror(errno));

	return ptr;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2060
movl $0x0, (%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2180
movq %rax, %rbx
testq %rax, %rax
jne 0x2799
xorl %edi, %edi
callq 0x22e0
leaq 0x50123(%rip), %rsi     # 0x528ad
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: erealloc
void *erealloc(void *ptr, size_t size)
{
	void *new;
	errno = 0;

	if ((new = realloc(ptr, size)) == NULL)
		logging(ERROR, "realloc: %s\n", strerror(errno));

	return new;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2220
movq %rax, %rbx
testq %rax, %rax
jne 0x27ee
movl (%r14), %edi
callq 0x22e0
leaq 0x500da(%rip), %rsi     # 0x528b9
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: eselect
int eselect(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tv)
{
	int ret;
	errno = 0;

	if ((ret = select(maxfd, readfds, writefds, errorfds, tv)) < 0) {
		if (errno == EINTR)
			return eselect(maxfd, readfds, writefds, errorfds, tv);
		else
			logging(ERROR, "select: %s\n", strerror(errno));
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, (%rsp)
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %r13d
callq 0x2060
movq %rax, %rbx
movl $0x0, (%rbx)
movl %r13d, %edi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq (%rsp), %r8
callq 0x21e0
movl %eax, %ebp
testl %eax, %eax
jns 0x285d
movl (%rbx), %edi
cmpl $0x4, %edi
je 0x281a
callq 0x22e0
leaq 0x50078(%rip), %rsi     # 0x528c6
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
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_O3/uobikiemukot[P]yaft/./util.h
// Function: ewrite
ssize_t ewrite(int fd, const void *buf, size_t size)
{
	ssize_t ret;
	errno = 0;

	if ((ret = write(fd, buf, size)) < 0) {
		if (errno == EINTR) {
			logging(ERROR, "write: EINTR occurred\n");
			return ewrite(fd, buf, size);
		} else if (errno == EAGAIN || errno == EWOULDBLOCK) {
			logging(ERROR, "write: EAGAIN or EWOULDBLOCK occurred, sleep %d usec\n", SLEEP_TIME);
			usleep(SLEEP_TIME);
			return ewrite(fd, buf, size);
		} else {
			logging(ERROR, "write: %s\n", strerror(errno));
			return ret;
		}
	} else if (ret < (ssize_t) size) {
		logging(ERROR, "data size:%zu write size:%zd\n", size, ret);
		return ewrite(fd, (char *) buf + ret, size - ret);
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r13
movq %rsi, %rbx
movl %edi, %ebp
callq 0x2060
movq %rax, %r14
leaq 0x50059(%rip), %r15     # 0x528e9
movl %ebp, 0x4(%rsp)
movl $0x0, (%r14)
movl %ebp, %edi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x20b0
movq %rax, %r12
testq %rax, %rax
jns 0x28f2
movl (%r14), %edi
cmpl $0xb, %edi
je 0x28d2
cmpl $0x4, %edi
jne 0x2928
movl $0x2, %edi
leaq 0x50009(%rip), %rsi     # 0x528d2
xorl %eax, %eax
callq 0x245c
jmp 0x2894
movl $0x2, %edi
movq %r15, %rsi
movl $0x7530, %edx           # imm = 0x7530
xorl %eax, %eax
callq 0x245c
movl $0x7530, %edi           # imm = 0x7530
callq 0x2350
jmp 0x2894
movq %r15, %rbp
movq %r13, %r15
subq %r12, %r15
jle 0x2943
movl $0x2, %edi
leaq 0x50021(%rip), %rsi     # 0x5292a
movq %r13, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x245c
addq %r12, %rbx
movq %r15, %r13
movq %rbp, %r15
movl 0x4(%rsp), %ebp
jmp 0x2894
callq 0x22e0
leaq 0x4ffeb(%rip), %rsi     # 0x5291f
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: esigaction
int esigaction(int signo, struct sigaction *act, struct sigaction *oact)
{
	int ret;
	errno = 0;

	if ((ret = sigaction(signo, act, oact)) < 0)
		logging(ERROR, "sigaction: %s\n", strerror(errno));

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movl %edi, %ebp
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
movl %ebp, %edi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2090
movl %eax, %ebx
testl %eax, %eax
jns 0x29a3
movl (%r14), %edi
callq 0x22e0
leaq 0x4ffb4(%rip), %rsi     # 0x52948
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: etcgetattr
int etcgetattr(int fd, struct termios *tm)
{
	int ret;
	errno = 0;

	if ((ret = tcgetattr(fd, tm)) < 0)
		logging(ERROR, "tcgetattr: %s\n", strerror(errno));

	return ret;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
movl %ebp, %edi
movq %rbx, %rsi
callq 0x2250
movl %eax, %ebx
testl %eax, %eax
jns 0x29f5
movl (%r14), %edi
callq 0x22e0
leaq 0x4ff71(%rip), %rsi     # 0x52957
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: etcsetattr
int etcsetattr(int fd, int action, const struct termios *tm)
{
	int ret;
	errno = 0;

	if ((ret = tcsetattr(fd, action, tm)) < 0)
		logging(ERROR, "tcgetattr: %s\n", strerror(errno));

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r15d
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
movl %r15d, %edi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x2260
movl %eax, %ebx
testl %eax, %eax
jns 0x2a4a
movl (%r14), %edi
callq 0x22e0
leaq 0x4ff1c(%rip), %rsi     # 0x52957
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: eopenpty
int eopenpty(int *amaster, int *aslave, char *aname,
	const struct termios *termp, const struct winsize *winsize)
{
	int master;
	char *name = NULL;
	errno = 0;

	if ((master = posix_openpt(O_RDWR | O_NOCTTY)) < 0
		|| grantpt(master) < 0
		|| unlockpt(master) < 0
		|| (name = ptsname(master)) == NULL) {
		logging(ERROR, "openpty: %s\n", strerror(errno));
		return -1;
	}
	*amaster = master;
	*aslave  = eopen(name, O_RDWR | O_NOCTTY);

	if (aname)
		/* XXX: we don't use the slave's name, do nothing */
		(void) aname;
		//strncpy(aname, name, _POSIX_TTY_NAME_MAX - 1);
		//snprintf(aname, _POSIX_TTY_NAME_MAX, "%s", name);
	if (termp)
		etcsetattr(*aslave, TCSAFLUSH, termp);
	if (winsize)
		ioctl(*aslave, TIOCSWINSZ, winsize);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r15
movq %rsi, %r14
movq %rdi, %r12
callq 0x2060
movq %rax, %r13
movl $0x0, (%rax)
movl $0x102, %edi            # imm = 0x102
callq 0x2300
testl %eax, %eax
js 0x2af1
movl %eax, %ebp
movl %eax, %edi
callq 0x22c0
testl %eax, %eax
js 0x2af1
movl %ebp, %edi
callq 0x2190
testl %eax, %eax
js 0x2af1
movl %ebp, %edi
callq 0x2040
testq %rax, %rax
je 0x2af1
movl %ebp, (%r12)
movq %rax, %rdi
movl $0x102, %esi            # imm = 0x102
callq 0x2524
movl %eax, (%r14)
testq %r15, %r15
je 0x2ad6
movl %eax, %edi
movl $0x2, %esi
movq %r15, %rdx
callq 0x29fc
testq %rbx, %rbx
je 0x2b26
movl (%r14), %edi
xorl %ebp, %ebp
movl $0x5414, %esi           # imm = 0x5414
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2140
jmp 0x2b15
movl (%r13), %edi
callq 0x22e0
leaq 0x4fe65(%rip), %rsi     # 0x52966
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x2b15
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: eforkpty
pid_t eforkpty(int *amaster, char *name,
	const struct termios *termp, const struct winsize *winsize)
{
	int master, slave;
	pid_t pid;

	if (eopenpty(&master, &slave, name, termp, winsize) < 0)
		return -1;

	errno = 0;
	pid   = fork();
	if (pid < 0) {
		logging(ERROR, "fork: %s\n", strerror(errno));
		return pid;
	} else if (pid == 0) { /* child */
		close(master);
		setsid();

		dup2(slave, STDIN_FILENO);
		dup2(slave, STDOUT_FILENO);
		dup2(slave, STDERR_FILENO);

		/* XXX: this ioctl may fail in Mac OS X
			ref http://www.opensource.apple.com/source/Libc/Libc-825.25/util/pty.c?txt */
		if (ioctl(slave, TIOCSCTTY, NULL))
			logging(WARN, "ioctl: TIOCSCTTY faild\n");
		close(slave);

		return 0;
	}
	/* parent */
	close(slave);
	*amaster = master;

	return pid;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r8
movq %rdx, %rcx
movq %rdi, %r14
leaq 0x4(%rsp), %rdi
movq %rsp, %rsi
callq 0x2a57
testl %eax, %eax
js 0x2b7a
callq 0x2060
movq %rax, %r15
movl $0x0, (%rax)
callq 0x2320
movl %eax, %ebx
testl %eax, %eax
js 0x2b84
je 0x2ba4
movl (%rsp), %edi
callq 0x2150
movl 0x4(%rsp), %eax
movl %eax, (%r14)
jmp 0x2c06
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x2c06
movl (%r15), %edi
callq 0x22e0
leaq 0x4fde0(%rip), %rsi     # 0x52973
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
jmp 0x2c06
movl 0x4(%rsp), %edi
callq 0x2150
callq 0x2160
movl (%rsp), %ebp
xorl %ebx, %ebx
movl %ebp, %edi
xorl %esi, %esi
callq 0x20f0
movl %ebp, %edi
movl $0x1, %esi
callq 0x20f0
movl %ebp, %edi
movl $0x2, %esi
callq 0x20f0
movl $0x540e, %esi           # imm = 0x540E
movl %ebp, %edi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2140
testl %eax, %eax
je 0x2bff
leaq 0x4fd8a(%rip), %rsi     # 0x5297d
movl $0x1, %edi
xorl %eax, %eax
callq 0x245c
movl %ebp, %edi
callq 0x2150
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: esetenv
int esetenv(const char *name, const char *value, int overwrite)
{
	int ret;
	errno = 0;

	if ((ret = setenv(name, value, overwrite)) < 0)
		logging(ERROR, "setenv: %s\n", strerror(errno));

	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r12
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
movq %r12, %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0x20a0
movl %eax, %ebx
testl %eax, %eax
jns 0x2c62
movl (%r14), %edi
callq 0x22e0
leaq 0x4fd42(%rip), %rsi     # 0x52995
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: eexecvp
int eexecvp(const char *file, char *const argv[])
{
	int ret;
	errno = 0;

	if ((ret = execvp(file, (char * const *) argv)) < 0)
		logging(ERROR, "execvp: %s\n", strerror(errno));

	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x22b0
movl %eax, %ebx
testl %eax, %eax
jns 0x2cb8
movl (%r14), %edi
callq 0x22e0
leaq 0x4fcf8(%rip), %rsi     # 0x529a1
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: eexecl
int eexecl(const char *path)
{
	int ret;
	errno = 0;

	/* XXX: assume only one argument is given */
	if ((ret = execl(path, path, NULL)) < 0)
		logging(ERROR, "execl: %s\n", strerror(errno));

	return ret;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
movq %rbx, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x22f0
movl %eax, %ebx
testl %eax, %eax
jns 0x2d08
movl (%r14), %edi
callq 0x22e0
leaq 0x4fcb4(%rip), %rsi     # 0x529ad
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: estrtol
long estrtol(const char *nptr, char **endptr, int base)
{
	long int ret;
	errno = 0;

	ret = strtol(nptr, endptr, base);
	if (ret == LONG_MIN || ret == LONG_MAX) {
		logging(ERROR, "strtol: %s\n", strerror(errno));
		return 0;
	}

	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r12
callq 0x2060
movq %rax, %r14
movl $0x0, (%rax)
movq %r12, %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0x21b0
movq %rax, %rbx
movabsq $-0x7fffffffffffffff, %rax # imm = 0x8000000000000001
addq %rbx, %rax
cmpq $0x1, %rax
ja 0x2d73
movl (%r14), %edi
callq 0x22e0
leaq 0x4fc56(%rip), %rsi     # 0x529b8
xorl %ebx, %ebx
movl $0x2, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x245c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: parse_arg
void parse_arg(char *buf, struct parm_t *pt, int delim, int (is_valid)(int c))
{
	/*
		v..........v d           v.....v d v.....v ... d
		(valid char) (delimiter)
		argv[0]                  argv[1]   argv[2] ...   argv[argc - 1]
	*/
	size_t length;
	char *cp, *vp;

	if (buf == NULL)
		return;

	length = strlen(buf);
	logging(DEBUG, "parse_arg() length:%u\n", (unsigned) length);

	vp = NULL;
	for (size_t i = 0; i < length; i++) {
		cp = buf + i;

		if (vp == NULL && is_valid(*cp))
			vp = cp;

		if (*cp == delim) {
			*cp = '\0';
			add_parm(pt, vp);
			vp = NULL;
		}

		if (i == (length - 1) && (vp != NULL || *cp == '\0'))
			add_parm(pt, vp);
	}

	logging(DEBUG, "argc:%d\n", pt->argc);
}

// Assembly:
testq %rdi, %rdi
je 0x2e6b
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
callq 0x20d0
testq %rax, %rax
je 0x2e63
movq %rax, %r12
xorl %eax, %eax
testq %rax, %rax
jne 0x2e00
movsbl (%r15), %edi
callq *%rbx
testl %eax, %eax
je 0x2dfe
movq %r15, %rax
jmp 0x2e00
xorl %eax, %eax
movsbl (%r15), %ecx
cmpl %ebp, %ecx
jne 0x2e22
movb $0x0, (%r15)
movslq (%r14), %rcx
cmpq $0xf, %rcx
jg 0x2e20
movq %rax, 0x8(%r14,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, (%r14)
xorl %eax, %eax
cmpq $0x1, %r12
jne 0x2e55
testq %rax, %rax
je 0x2e47
movl (%r14), %ecx
movq %rax, %rdx
cmpl $0xf, %ecx
jg 0x2e55
movslq %ecx, %rcx
movq %rdx, 0x8(%r14,%rcx,8)
incl %ecx
movl %ecx, (%r14)
jmp 0x2e55
cmpb $0x0, (%r15)
jne 0x2e55
movl (%r14), %ecx
cmpl $0xf, %ecx
jle 0x2e5f
incq %r15
decq %r12
jne 0x2dea
jmp 0x2e63
xorl %edx, %edx
jmp 0x2e38
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./util.h
// Function: sum
int sum(struct parm_t *parm)
{
	int sum = 0;

	for (int i = 0; i < parm->argc; i++)
		sum += dec2num(parm->argv[i]);

	return sum;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl (%rdi), %ecx
testl %ecx, %ecx
jle 0x2eee
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %ebp, %ebp
movq 0x8(%rbx,%r14,8), %rdi
movl $0x0, %eax
testq %rdi, %rdi
je 0x2edf
xorl %esi, %esi
movl $0xa, %edx
callq 0x2d12
movl (%rbx), %ecx
addl %eax, %ebp
incq %r14
movslq %ecx, %rax
cmpq %rax, %r14
jl 0x2ec2
jmp 0x2ef0
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./fb/linux.h
// Function: set_fbinfo
bool set_fbinfo(int fd, struct fb_info_t *info)
{
	struct fb_fix_screeninfo finfo;
	struct fb_var_screeninfo vinfo;

	if (ioctl(fd, FBIOGET_FSCREENINFO, &finfo)) {
		logging(ERROR, "ioctl: FBIOGET_FSCREENINFO failed\n");
		return false;
	}

	if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo)) {
		logging(ERROR, "ioctl: FBIOGET_VSCREENINFO failed\n");
		return false;
	}

	set_bitfield(&vinfo, &info->red, &info->green, &info->blue);

	info->width  = vinfo.xres;
	info->height = vinfo.yres;
	info->screen_size = finfo.smem_len;
	info->line_length = finfo.line_length;

	info->bits_per_pixel  = vinfo.bits_per_pixel;
	info->bytes_per_pixel = my_ceil(info->bits_per_pixel, BITS_PER_BYTE);

	info->type   = set_type(finfo.type);
	info->visual = set_visual(finfo.visual);

	/* check screen [xy]offset and initialize because linux console changes these values */
	if (vinfo.xoffset != 0 || vinfo.yoffset != 0) {
		vinfo.xoffset = vinfo.yoffset = 0;
		if (ioctl(fd, FBIOPUT_VSCREENINFO, &vinfo))
			logging(WARN, "couldn't reset offset (x:%d y:%d)\n", vinfo.xoffset, vinfo.yoffset);
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xf0, %rsp
movq %rsi, %r14
movl %edi, %ebx
leaq 0xa0(%rsp), %rdx
movl $0x4602, %esi           # imm = 0x4602
xorl %eax, %eax
callq 0x2140
testl %eax, %eax
je 0x2fed
leaq 0x4f9d9(%rip), %rsi     # 0x529c4
jmp 0x3009
movq %rsp, %rdx
movl $0x4600, %esi           # imm = 0x4600
movl %ebx, %edi
xorl %eax, %eax
callq 0x2140
testl %eax, %eax
je 0x3025
leaq 0x4f9de(%rip), %rsi     # 0x529e7
xorl %ebp, %ebp
movl $0x2, %edi
xorl %eax, %eax
callq 0x245c
movl %ebp, %eax
addq $0xf0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x20(%rsp), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, (%r14)
movq 0x2c(%rsp), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x8(%r14)
movq 0x38(%rsp), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, 0x10(%r14)
movq (%rsp), %rax
movq %rax, 0x18(%r14)
movl 0xb8(%rsp), %eax
movq %rax, 0x20(%r14)
movl 0xd0(%rsp), %eax
movl %eax, 0x28(%r14)
movl 0x18(%rsp), %eax
movl %eax, 0x30(%r14)
leal 0x7(%rax), %ecx
addl $0xe, %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
sarl $0x3, %eax
movl %eax, 0x2c(%r14)
movl 0xbc(%rsp), %eax
xorl %ecx, %ecx
cmpl $0x1, %eax
setne %cl
incl %ecx
testl %eax, %eax
cmovel %eax, %ecx
movl %ecx, 0x34(%r14)
movl 0xc4(%rsp), %eax
addl $-0x2, %eax
movl $0x3, %ecx
cmpl $0x2, %eax
ja 0x30c9
movl %eax, %eax
leaq 0x4f75a(%rip), %rcx     # 0x52820
movl (%rcx,%rax,4), %ecx
movl %ecx, 0x38(%r14)
movl 0x14(%rsp), %eax
movb $0x1, %bpl
orl 0x10(%rsp), %eax
je 0x3017
movq %rsp, %rdx
movq $0x0, 0x10(%rdx)
movl $0x4601, %esi           # imm = 0x4601
movl %ebx, %edi
xorl %eax, %eax
callq 0x2140
testl %eax, %eax
je 0x3017
movl 0x10(%rsp), %edx
movl 0x14(%rsp), %ecx
leaq 0x4f8fc(%rip), %rsi     # 0x52a0a
movl $0x1, %edi
xorl %eax, %eax
callq 0x245c
jmp 0x3017
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./fb/common.h
// Function: cmap_die
void cmap_die(cmap_t *cmap)
{
	if (cmap) {
		free(cmap->red);
		free(cmap->green);
		free(cmap->blue);
		//free(cmap->transp);
		free(cmap);
	}
}

// Assembly:
testq %rdi, %rdi
je 0x3198
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x2050
movq 0x10(%rbx), %rdi
callq 0x2050
movq 0x18(%rbx), %rdi
callq 0x2050
movq %rbx, %rdi
popq %rbx
jmp 0x2050
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./fb/common.h
// Function: cmap_create
cmap_t *cmap_create(int colors)
{
	cmap_t *cmap;

	if ((cmap = (cmap_t *) ecalloc(1, sizeof(cmap_t))) == NULL) {
		logging(ERROR, "couldn't allocate cmap buffer\n");
		return NULL;
	}

	/* init os specific */
	alloc_cmap(cmap, colors);

	if (!cmap->red || !cmap->green || !cmap->blue) {
		logging(ERROR, "couldn't allocate red/green/blue buffer of cmap\n");
		cmap_die(cmap);
		return NULL;
	}
	return cmap;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x1, %edi
movl $0x28, %esi
callq 0x2754
testq %rax, %rax
je 0x31f3
movq %rax, %rbx
movq %rax, %rdi
movl %ebp, %esi
callq 0x2ef7
cmpq $0x0, 0x8(%rbx)
je 0x31d4
cmpq $0x0, 0x10(%rbx)
je 0x31d4
cmpq $0x0, 0x18(%rbx)
jne 0x3208
leaq 0x4f895(%rip), %rsi     # 0x52a70
movl $0x2, %edi
xorl %eax, %eax
callq 0x245c
movq %rbx, %rdi
callq 0x316b
xorl %ebx, %ebx
jmp 0x3208
leaq 0x4f857(%rip), %rsi     # 0x52a51
xorl %ebx, %ebx
movl $0x2, %edi
xorl %eax, %eax
callq 0x245c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./fb/common.h
// Function: cmap_update
bool cmap_update(int fd, cmap_t *cmap)
{
	if (cmap) {
		if (put_cmap(fd, cmap)) {
			logging(ERROR, "put_cmap failed\n");
			return false;
		}
	}
	return true;
}

// Assembly:
pushq %rbx
movb $0x1, %bl
testq %rsi, %rsi
je 0x3242
movq %rsi, %rdx
movl $0x4605, %esi           # imm = 0x4605
xorl %eax, %eax
callq 0x2140
testl %eax, %eax
je 0x3242
leaq 0x4f86d(%rip), %rsi     # 0x52aa1
xorl %ebx, %ebx
movl $0x2, %edi
xorl %eax, %eax
callq 0x245c
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/uobikiemukot[P]yaft/./fb/common.h
// Function: cmap_save
bool cmap_save(int fd, cmap_t *cmap)
{
	if (get_cmap(fd, cmap)) {
		logging(WARN, "get_cmap failed\n");
		return false;
	}
	return true;
}

// Assembly:
pushq %rbx
movq %rsi, %rdx
movl $0x4604, %esi           # imm = 0x4604
xorl %eax, %eax
callq 0x2140
movl %eax, %ebx
testl %eax, %eax
je 0x326f
leaq 0x4f84f(%rip), %rsi     # 0x52ab2
movl $0x1, %edi
xorl %eax, %eax
callq 0x245c
testl %ebx, %ebx
sete %al
popq %rbx
retq