LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: reverse
static
int reverse(STRING** self)
{
    int     ch      = 0;

    size_t  pos     = 0;

    char*   p       = NULL,
        *   dest    = NULL;

    if ((*self)->empty(*self)) {
        status = ESTRISEMPTY; goto ERR;
    }
    if ((dest = (char*)
                malloc(sizeof(char) * (*self)->capacity(*self))) == NULL) {
#ifdef  LIBRARY_VERBOSE
        print_error();
/* LIBRARY_VERBOSE */
#endif
        status = EMEMORYALLOC; goto ERR;
    } else {
        memset(dest, '\0', (*self)->capacity(*self));
    }
    p = (*self)->c_str(*self);
    pos = (*self)->size(*self);
    setlocale(LC_CTYPE, T_STRING_LOCALE_VALUE);
    while (*p != '\0' && pos) {
        if ((ch = mblen(p, MB_CUR_MAX)) < 0) {
#ifdef  LIBRARY_VERBOSE
            print_error();
/* LIBRARY_VERBOSE */
#endif
            status = EINVALIDCHAR; goto ERR;
        } else {
            pos -= ch;
            memcpy(dest + pos, p, ch);
            p += ch;
        }
    }
    free((*self)->string);
    (*self)->string = dest;

    return 0;

ERR:
    if (dest != NULL) {
        free(dest);
        dest = NULL;
    }

    return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq *0xa0(%rdi)
testl %eax, %eax
je 0x9451
leaq 0x7e37(%rip), %rax      # 0x11278
movl $0xfffffffc, (%rax)     # imm = 0xFFFFFFFC
movl $0xfffffffc, %ebp       # imm = 0xFFFFFFFC
jmp 0x9532
movq (%rbx), %rdi
callq *0x28(%rdi)
movq %rax, %rdi
callq 0x20e0
testq %rax, %rax
je 0x9504
movq %rax, %r14
movq (%rbx), %rdi
callq *0x28(%rdi)
xorl %ebp, %ebp
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x2050
movq (%rbx), %rdi
callq *0xc8(%rdi)
movq %rax, %r15
movq (%rbx), %rdi
callq *0x18(%rdi)
movq %rax, %r12
leaq 0x2f32(%rip), %rsi      # 0xc3ce
xorl %edi, %edi
callq 0x2430
cmpb $0x0, (%r15)
setne %al
testq %r12, %r12
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x94ef
callq 0x21d0
movq %r15, %rdi
movq %rax, %rsi
callq 0x2310
testl %eax, %eax
js 0x9518
movl %eax, %r13d
subq %r13, %r12
leaq (%r14,%r12), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2470
cmpb $0x0, (%r15,%r13)
je 0x94ef
addq %r13, %r15
testq %r12, %r12
jne 0x94b7
movq (%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x21a0
movq (%rbx), %rax
movq %r14, 0x10(%rax)
jmp 0x9532
leaq 0x7d6d(%rip), %rax      # 0x11278
movl $0xfffffffd, (%rax)     # imm = 0xFFFFFFFD
movl $0xfffffffd, %ebp       # imm = 0xFFFFFFFD
jmp 0x9532
leaq 0x7d59(%rip), %rax      # 0x11278
movl $0xfffffffe, (%rax)     # imm = 0xFFFFFFFE
movq %r14, %rdi
callq 0x21a0
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
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/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: ascii_only
static
int ascii_only(STRING* self)
{
    char*   p   = NULL;

    if (self->empty(self))
        return (status = ESTRISEMPTY);

    p = self->c_str(self);
    while (*p != '\0') {
        if (!isascii(*p))
            return 0;
        p++;
    }

    return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq *0xa0(%rdi)
testl %eax, %eax
je 0x9565
leaq 0x7d20(%rip), %rax      # 0x11278
movl $0xfffffffc, (%rax)     # imm = 0xFFFFFFFC
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
popq %rbx
retq
movq %rbx, %rdi
callq *0xc8(%rbx)
movq %rax, %rcx
movb (%rax), %dl
movl $0x1, %eax
testb %dl, %dl
je 0x9563
incq %rcx
testb %dl, %dl
js 0x958e
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x957f
jmp 0x9563
xorl %eax, %eax
jmp 0x9563
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: digit_only
static
int digit_only(STRING* self)
{
    char*   p   = NULL;

    if (self->empty(self))
        return (status = ESTRISEMPTY);

    p = self->c_str(self);
    while (*p != '\0') {
        if (!isdigit(*p))
            return 0;
        p++;
    }

    return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq *0xa0(%rdi)
testl %eax, %eax
je 0x95bc
leaq 0x7cce(%rip), %rax      # 0x11278
movl $0xfffffffc, (%rax)     # imm = 0xFFFFFFFC
movl $0xfffffffc, %ebx       # imm = 0xFFFFFFFC
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq *0xc8(%rbx)
movb (%rax), %bpl
movl $0x1, %ebx
testb %bpl, %bpl
je 0x95b5
movq %rax, %r14
callq 0x21e0
movq (%rax), %rax
incq %r14
movsbq %bpl, %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x95f8
movb (%r14), %bpl
incq %r14
testb %bpl, %bpl
jne 0x95e0
jmp 0x95b5
xorl %ebx, %ebx
jmp 0x95b5
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: each_line
static
int each_line(STRING* self, char* const delim, void (*fn)(STRING*))
{
    size_t      i   = 0,
                idx = 0;

    char*       dd  = "\n"; /* default delimiter */

    STRING**    s2  = NULL;

    if (fn == NULL)
        return (status = EARGISNULPTR);

    if (delim != NULL)
        dd = delim;

    status = 0;
    idx = self->split(self, dd, &s2);
    if (status < 0)
        return status;

    while (i < idx) {
        fn(s2[i]);
        free(s2[i]);
        i++;
    }
    free(s2);

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq $0x0, 0x8(%rsp)
testq %rdx, %rdx
je 0x9681
movq %rdx, %rbx
testq %rsi, %rsi
leaq 0x2dad(%rip), %rax      # 0xc3cd
cmovneq %rsi, %rax
leaq 0x7c4d(%rip), %r15      # 0x11278
movl $0x0, (%r15)
leaq 0x8(%rsp), %rdx
movq %rax, %rsi
callq *0x100(%rdi)
movq %rax, %r14
movl (%r15), %eax
testl %eax, %eax
js 0x9693
testq %r14, %r14
je 0x9673
xorl %r15d, %r15d
movq 0x8(%rsp), %rax
movq (%rax,%r15,8), %rdi
callq *%rbx
movq 0x8(%rsp), %rax
movq (%rax,%r15,8), %rdi
callq 0x21a0
incq %r15
cmpq %r15, %r14
jne 0x9652
movq 0x8(%rsp), %rdi
callq 0x21a0
xorl %eax, %eax
jmp 0x9693
leaq 0x7bf0(%rip), %rax      # 0x11278
movl $0xfffffffb, (%rax)     # imm = 0xFFFFFFFB
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: each_byte
static
int each_byte(STRING* self, void (*fn)(char))
{
    char*   p   = NULL;

    if (self->empty(self))
        return (status = ESTRISEMPTY);
    if (fn == NULL)
        return (status = EARGISNULPTR);

    p = self->c_str(self);
    while (*p != '\0') {
        fn(*p);
        p++;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq *0xa0(%rdi)
movl $0xfffffffc, %ebp       # imm = 0xFFFFFFFC
testl %eax, %eax
je 0x96c6
leaq 0x7bbb(%rip), %rax      # 0x11278
movl %ebp, (%rax)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
testq %rbx, %rbx
je 0x96f4
movq %r14, %rdi
callq *0xc8(%r14)
movq %rax, %r14
movb (%rax), %al
xorl %ebp, %ebp
testb %al, %al
je 0x96bf
incq %r14
movsbl %al, %edi
callq *%rbx
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x96e3
jmp 0x96bf
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
jmp 0x96b6
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: each_char
static
int each_char(STRING* self, void (*fn)(char*))
{
    size_t  y   = 0,
            idx = 0;

    char**  arr = NULL;

    if (self->empty(self))
        return (status = ESTRISEMPTY);
    if (fn == NULL)
        return (status = EARGISNULPTR);

    if ((self)->to_char_arr(self, &arr) < 0)
        return status;

    idx = self->mblen(self);
    while (y < idx) {
        fn(arr[y]);
        free(arr[y]);
        y++;
    }
    free(arr);

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq $0x0, 0x8(%rsp)
callq *0xa0(%rdi)
testl %eax, %eax
je 0x9739
leaq 0x7b54(%rip), %rax      # 0x11278
movl $0xfffffffc, (%rax)     # imm = 0xFFFFFFFC
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
testq %rbx, %rbx
je 0x9792
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq *0x110(%r14)
testl %eax, %eax
js 0x97a6
movq %r14, %rdi
callq *0x20(%r14)
testq %rax, %rax
je 0x9784
movq %rax, %r14
xorl %r15d, %r15d
movq 0x8(%rsp), %rax
movq (%rax,%r15,8), %rdi
callq *%rbx
movq 0x8(%rsp), %rax
movq (%rax,%r15,8), %rdi
callq 0x21a0
incq %r15
cmpq %r15, %r14
jne 0x9763
movq 0x8(%rsp), %rdi
callq 0x21a0
xorl %eax, %eax
jmp 0x972f
leaq 0x7adf(%rip), %rax      # 0x11278
movl $0xfffffffb, (%rax)     # imm = 0xFFFFFFFB
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
jmp 0x972f
leaq 0x7acb(%rip), %rax      # 0x11278
movl (%rax), %eax
jmp 0x972f
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: each_codepoint
static
int each_codepoint(STRING* self, void (*fn)(uint32_t))
{
    int         ch  = 0;

    char*       p   = NULL;

    gunichar*   cp  = NULL;

    if (self->empty(self))
        return (status = ESTRISEMPTY);
    if (fn == NULL)
        return (status = EARGISNULPTR);

    p = self->c_str(self);
    setlocale(LC_CTYPE, T_STRING_LOCALE_VALUE);
    while (*p != '\0') {
        if ((ch = mblen(p, MB_CUR_MAX)) < 0) {
#ifdef  LIBRARY_VERBOSE
            print_error();
/* LIBRARY_VERBOSE */
#endif
            return (status = EINVALIDCHAR);
        }
        cp = g_utf8_to_ucs4_fast(p, sizeof(*p), NULL);
        fn(*cp);
        g_free(cp);
        p += ch;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq *0xa0(%rdi)
movl $0xfffffffc, %r15d      # imm = 0xFFFFFFFC
testl %eax, %eax
je 0x97e8
leaq 0x7a9f(%rip), %rax      # 0x11278
movl %r15d, (%rax)
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testq %rbx, %rbx
je 0x9857
movq %r14, %rdi
callq *0xc8(%r14)
movq %rax, %r14
leaq 0x2bcd(%rip), %rsi      # 0xc3ce
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x2430
cmpb $0x0, (%r14)
je 0x97dc
callq 0x21d0
movq %r14, %rdi
movq %rax, %rsi
callq 0x2310
testl %eax, %eax
js 0x9862
movl %eax, %ebp
xorl %r15d, %r15d
movl $0x1, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x2320
movq %rax, %r12
movl (%rax), %edi
callq *%rbx
movq %r12, %rdi
callq 0x2030
movl %ebp, %eax
cmpb $0x0, (%r14,%rax)
leaq (%r14,%rax), %r14
jne 0x9811
jmp 0x97dc
movl $0xfffffffb, %r15d      # imm = 0xFFFFFFFB
jmp 0x97d2
movl $0xfffffffe, %r15d      # imm = 0xFFFFFFFE
jmp 0x97d2
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: ts_crypt
static
char* ts_crypt(STRING* self, char* const salt)
{
    if (self->empty(self)) {
        status = ESTRISEMPTY;

        return NULL;
    }
    if (salt == NULL) {
        status = EARGISNULPTR;

        return NULL;
    }

    return crypt(self->c_str(self), salt);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq *0xa0(%rdi)
testl %eax, %eax
je 0x9898
leaq 0x79f0(%rip), %rax      # 0x11278
movl $0xfffffffc, (%rax)     # imm = 0xFFFFFFFC
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
testq %rbx, %rbx
je 0x98b9
movq %r14, %rdi
callq *0xc8(%r14)
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2190
leaq 0x79b8(%rip), %rax      # 0x11278
movl $0xfffffffb, (%rax)     # imm = 0xFFFFFFFB
jmp 0x988e
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: ts_crypt2
static
int ts_crypt2(STRING* self, char* const salt, char** dest)
{
    if (self->empty(self))
        return (status = ESTRISEMPTY);
    if (salt == NULL)
        return (status = EARGISNULPTR);

    if ((*dest = crypt(self->c_str(self), salt)) == NULL)
        return errno;

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq *0xa0(%rdi)
testl %eax, %eax
je 0x98f8
leaq 0x7991(%rip), %rax      # 0x11278
movl $0xfffffffc, (%rax)     # imm = 0xFFFFFFFC
movl $0xfffffffc, %eax       # imm = 0xFFFFFFFC
popq %rbx
popq %r14
popq %r15
retq
testq %r14, %r14
je 0x9928
movq %r15, %rdi
callq *0xc8(%r15)
movq %rax, %rdi
movq %r14, %rsi
callq 0x2190
movq %rax, %rcx
movq %rax, (%rbx)
xorl %eax, %eax
testq %rcx, %rcx
jne 0x98f2
callq 0x2390
movl (%rax), %eax
jmp 0x98f2
leaq 0x7949(%rip), %rax      # 0x11278
movl $0xfffffffb, (%rax)     # imm = 0xFFFFFFFB
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
jmp 0x98f2
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: clear
static
void clear(STRING** self)
{
    if ((*self)->string != NULL) {
        free((*self)->string);
        (*self)->string = NULL;
    }
    (*self)->length     = 0;
    (*self)->alloc_size = 0;

    return;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0x995f
callq 0x21a0
movq (%rbx), %rax
movq $0x0, 0x10(%rax)
movq (%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: mbstrlen
static
size_t mbstrlen(char* const str)
{
    int     ch      = 0;

    size_t  c       = 0;

    char*   p       = NULL;

    if (str == NULL) {
        status = EARGISNULPTR; goto ERR;
    } else {
        p = str;
    }
    setlocale(LC_CTYPE, T_STRING_LOCALE_VALUE);
    while (*p != '\0') {
        if ((ch = mblen(p, MB_CUR_MAX)) < 0) {
#ifdef  LIBRARY_VERBOSE
            print_error();
/* LIBRARY_VERBOSE */
#endif
            status = EINVALIDCHAR; goto ERR;
        } else {
            p += ch;
            c++;
        }
    }

    return c;

ERR:
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x99d2
movq %rdi, %r14
leaq 0x2a33(%rip), %rsi      # 0xc3ce
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x2430
cmpb $0x0, (%r14)
je 0x99e9
xorl %ebx, %ebx
callq 0x21d0
movq %r14, %rdi
movq %rax, %rsi
callq 0x2310
testl %eax, %eax
js 0x99d9
movl %eax, %eax
incq %rbx
cmpb $0x0, (%r14,%rax)
leaq (%r14,%rax), %r14
jne 0x99ac
jmp 0x99e9
movl $0xfffffffb, %eax       # imm = 0xFFFFFFFB
jmp 0x99de
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
leaq 0x7893(%rip), %rcx      # 0x11278
movl %eax, (%rcx)
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: fgetline
int
fgetline(FILE* fp, STRING** s)
{
    int     c       = 0;

    size_t  length  = 0,
            bufsiz  = T_STRING_DEFAULT_ALLOC_SIZE + 1;

    char*   buf     = NULL;

    if ((buf = (char*)
                malloc(sizeof(char) * bufsiz)) == NULL) {
#ifdef  LIBRARY_VERBOSE
        print_error();
/* LIBRARY_VERBOSE */
#endif
        status = EMEMORYALLOC; goto ERR;
    } else {
        memset(buf, '\0', bufsiz);
    }
    while ((c = fgetc(fp)) != EOF) {
        if (length >= (bufsiz - 1)) {
            bufsiz += T_STRING_DEFAULT_ALLOC_SIZE;
            if ((buf = (char*)
                        realloc(buf, sizeof(char) * bufsiz)) == NULL) {
#ifdef  LIBRARY_VERBOSE
                print_error();
/* LIBRARY_VERBOSE */
#endif
                status = EMEMORYALLOC; goto ERR;
            } else {
                memset(buf + length, '\0', bufsiz - length);
            }
        }
        *(buf + length) = c;
        length++;
        if (c == '\n') {
            *(buf + length) = '\0';
            break;
        }
    }
    if (!length && c == EOF) {
        status = EOF; goto IS_EOF;
    }
    if ((*s = new_string(buf)) == NULL)
        goto ERR;
    if (buf != NULL) {
        free(buf);
        buf = NULL;
    }

    return 0;

ERR:
IS_EOF:
    if (buf != NULL) {
        free(buf);
        buf = NULL;
    }

    return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r13
movl $0x401, %r12d           # imm = 0x401
movl $0x1, %edi
movl $0x401, %esi            # imm = 0x401
callq 0x23d0
testq %rax, %rax
je 0x9a9d
movq %rax, %rbx
movq %r14, 0x8(%rsp)
movl $0x400, %r15d           # imm = 0x400
xorl %r14d, %r14d
movq %r13, 0x10(%rsp)
movq %r13, %rdi
callq 0x2210
cmpl $-0x1, %eax
je 0x9ab1
movl %eax, %ebp
leaq -0x1(%r12), %rax
cmpq %rax, %r14
jb 0x9a87
leaq 0x400(%r12), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2420
testq %rax, %rax
je 0x9a9d
movq %rax, %rbx
movq %rax, %rdi
addq %r14, %rdi
addq %r15, %r12
xorl %esi, %esi
movq %r12, %rdx
callq 0x2050
movq %r13, %r12
movq 0x10(%rsp), %r13
movb %bpl, (%rbx,%r14)
incq %r14
decq %r15
cmpl $0xa, %ebp
jne 0x9a38
movb $0x0, (%rbx,%r14)
jmp 0x9ab6
leaq 0x77d4(%rip), %rax      # 0x11278
movl $0xfffffffd, (%rax)     # imm = 0xFFFFFFFD
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
jmp 0x9af5
testq %r14, %r14
je 0x9ad7
movq %rbx, %rdi
callq 0x6460
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
testq %rax, %rax
je 0x9ae4
movq %rbx, %rdi
callq 0x21a0
xorl %eax, %eax
jmp 0x9af5
leaq 0x779a(%rip), %rax      # 0x11278
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x21a0
leaq 0x7785(%rip), %rax      # 0x11278
movl (%rax), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: release_char_arr
void
release_char_arr(STRING* self, size_t n, char** arr)
{
    size_t  y   = 0;

    if (self != NULL)
        n = self->mblen(self);

    if (arr != NULL) {
        while (y < n) {
            if (*(arr + y) != NULL) {
                free(*(arr + y));
                *(arr + y) = NULL;
            }
            y++;
        }
        free(arr);
        arr = NULL;
    }

    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
testq %rdi, %rdi
je 0x9b56
callq *0x20(%rdi)
movq %rax, %r14
testq %rbx, %rbx
je 0x9b8e
testq %r14, %r14
je 0x9b81
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
testq %rdi, %rdi
je 0x9b79
callq 0x21a0
movq $0x0, (%rbx,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x9b63
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x21a0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: reallocate_memory
static
int reallocate_memory(STRING** self, size_t size)
{
    if (((*self)->length + size) < (*self)->alloc_size)
        return 0;

    size_t  old_alloc_size  = (*self)->alloc_size;

    while ((*self)->alloc_size < ((*self)->length + size))
        (*self)->alloc_size += T_STRING_DEFAULT_ALLOC_SIZE;

    if (((*self)->string = (char*)
                realloc((*self)->string,
                    sizeof(char) * (*self)->alloc_size)) == NULL) {
#ifdef  LIBRARY_VERBOSE
        print_error();
/* LIBRARY_VERBOSE */
#endif
        return (status = EMEMORYALLOC);
    } else {
        memset((*self)->string + old_alloc_size,
                '\0', (*self)->alloc_size - old_alloc_size);
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rcx
addq 0x8(%rcx), %rsi
movq (%rcx), %r14
xorl %ebp, %ebp
cmpq %r14, %rsi
jb 0x9c29
movq %rdi, %rbx
movq %r14, %rax
jbe 0x9be4
leaq 0x400(%r14), %rax
cmpq %rax, %rsi
cmovaq %rsi, %rax
movq %r14, %rdx
notq %rdx
addq %rax, %rdx
andq $-0x400, %rdx           # imm = 0xFC00
leaq (%r14,%rdx), %rax
addq $0x400, %rax            # imm = 0x400
movq %rax, (%rcx)
movq 0x10(%rcx), %rdi
movq %rax, %rsi
callq 0x2420
movq (%rbx), %rcx
movq %rax, 0x10(%rcx)
testq %rax, %rax
je 0x9c17
movq (%rbx), %rax
movq 0x10(%rax), %rdi
addq %r14, %rdi
movq (%rax), %rdx
subq %r14, %rdx
xorl %ebp, %ebp
xorl %esi, %esi
callq 0x2050
jmp 0x9c29
leaq 0x765a(%rip), %rax      # 0x11278
movl $0xfffffffd, (%rax)     # imm = 0xFFFFFFFD
movl $0xfffffffd, %ebp       # imm = 0xFFFFFFFD
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: mbstrtok
static
char* mbstrtok(char* str, char* delim)
{
    static  char*   ptr = NULL;
            char*   bdy = NULL;

    if (!str)
        str = ptr;

    if (!str)
        return NULL;

    if ((bdy = strstr(str, delim)) != NULL) {
        *bdy = '\0';
        ptr = bdy + strlen(delim);
    } else {
        ptr = NULL;
    }

    return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x9c47
movq 0x7639(%rip), %rbx      # 0x11280
testq %rbx, %rbx
je 0x9c78
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2290
testq %rax, %rax
je 0x9c6f
movq %rax, %r15
movb $0x0, (%rax)
movq %r14, %rdi
callq 0x21b0
addq %r15, %rax
jmp 0x9c71
xorl %eax, %eax
movq %rax, 0x7608(%rip)      # 0x11280
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/typestring.c
// Function: count_mb_witdh
static
int count_mb_witdh(STRING* self, size_t* s)
{
    int         ch  = 0;

    char*       p   = self->c_str(self);

    gunichar*   cp  = NULL;

    setlocale(LC_CTYPE, T_STRING_LOCALE_VALUE);
    while (*p != '\0') {
        if ((ch = mblen(p, MB_CUR_MAX)) < 0) {
#ifdef  LIBRARY_VERBOSE
            print_error();
/* LIBRARY_VERBOSE */
#endif
            return (status = EINVALIDCHAR);
        }
        if (ch > 1) {
            cp = g_utf8_to_ucs4_fast(p, sizeof(*p), NULL);
            if ((*cp >= 0xff65 && *cp <= 0xff9f))
                (*s)++;
            else
                (*s) += 2;
            g_free(cp);
        } else {
            (*s)++;
        }
        p += ch;
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq *0xc8(%rdi)
movq %rax, %r14
leaq 0x2733(%rip), %rsi      # 0xc3ce
xorl %ebp, %ebp
xorl %edi, %edi
callq 0x2430
cmpb $0x0, (%r14)
je 0x9d20
movl $0xffff009b, %r15d      # imm = 0xFFFF009B
callq 0x21d0
movq %r14, %rdi
movq %rax, %rsi
callq 0x2310
testl %eax, %eax
js 0x9d0e
movl %eax, %ebp
cmpl $0x2, %eax
jb 0x9cfa
movl $0x1, %esi
movq %r14, %rdi
xorl %edx, %edx
callq 0x2320
movl (%rax), %ecx
addl %r15d, %ecx
cmpl $0x3b, %ecx
movq (%rbx), %rcx
sbbq $0x0, %rcx
addq $0x2, %rcx
movq %rcx, (%rbx)
movq %rax, %rdi
callq 0x2030
jmp 0x9cfd
incq (%rbx)
movl %ebp, %eax
cmpb $0x0, (%r14,%rax)
leaq (%r14,%rax), %r14
jne 0x9cb0
xorl %ebp, %ebp
jmp 0x9d20
leaq 0x7563(%rip), %rax      # 0x11278
movl $0xfffffffe, (%rax)     # imm = 0xFFFFFFFE
movl $0xfffffffe, %ebp       # imm = 0xFFFFFFFE
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/uri.c
// Function: encode_uri
int encode_uri(char* const src, char** dest)
{
    int     status  = 0;

    size_t  bufsiz  = DEFAULT_BUFSIZE,
            current = 0;

    char*   p       = src;

    if ((*dest = (char*)
                malloc(sizeof(char) * bufsiz)) == NULL) {
        status = -1; goto ERR;
    } else {
        memset(*dest, '\0', bufsiz);
    }

    while (*p != '\0') {
        if ((current + 3) >= bufsiz) {
            bufsiz += DEFAULT_BUFSIZE;
            if ((*dest = (char*)
                        realloc(*dest, sizeof(char) * bufsiz)) == NULL) {
                status = -2; goto ERR;
            } else {
                memset(*dest + current, '\0', DEFAULT_BUFSIZE);
            }
        }
        if (
                (*p >= 0x20 && *p <= 0x39)  ||  /* [0-9] */
                (*p >= 0x41 && *p <= 0x5A)  ||  /* [A-Z] */
                (*p >= 0x61 && *p <= 0x7A)  ||  /* [a-z] */
                (*p == 0x2E)                ||  /* . */
                (*p == 0x2F)                ||  /* / */
                (*p == 0x3A)                    /* : */
           ) {
            *(*(dest) + current) = *p;
            current++;
        } else {
            current += sprintf(*dest + current, "%%%02X",
                    *p & 0x000000FF);
        }
        p++;
    }

    return 0;

ERR:
    switch (status) {
        case    -1:
        case    -2:
            fprintf(stderr, "%s\n",
                    strerror(errno));
            break;
    }

    return status;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %edi
movl $0x400, %esi            # imm = 0x400
callq 0x23d0
movq %rax, (%rbx)
testq %rax, %rax
je 0x9e04
movb (%r14), %al
testb %al, %al
je 0x9df6
incq %r14
movl $0x400, %r15d           # imm = 0x400
leaq 0x23cf(%rip), %r12      # 0xc144
xorl %r13d, %r13d
leaq 0x3(%r13), %rcx
cmpq %r15, %rcx
jb 0x9db1
addq $0x400, %r15            # imm = 0x400
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x2420
movq %rax, (%rbx)
testq %rax, %rax
je 0x9e0b
addq %r13, %rax
movl $0x400, %edx            # imm = 0x400
movq %rax, %rdi
xorl %esi, %esi
callq 0x2050
movb -0x1(%r14), %al
leal -0x20(%rax), %ecx
cmpb $0x1b, %cl
jb 0x9ddd
movl %eax, %ecx
andb $-0x21, %cl
addb $-0x41, %cl
cmpb $0x19, %cl
jbe 0x9ddd
movzbl %al, %edx
movq (%rbx), %rdi
addq %r13, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x2200
cltq
jmp 0x9de9
movq (%rbx), %rcx
movb %al, (%rcx,%r13)
movl $0x1, %eax
addq %rax, %r13
movb (%r14), %al
incq %r14
testb %al, %al
jne 0x9d78
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x9e10
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
callq 0x25dc
jmp 0x9df8
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/libbenly/src/uri.c
// Function: decode_uri
int decode_uri(char* const src, char** dest)
{
    int     status  = 0;

    size_t  bufsiz  = DEFAULT_BUFSIZE,
            current = 0;

    char*   p       = src;

    if ((*dest = (char*)
                malloc(sizeof(char) * bufsiz)) == NULL) {
        status = -1; goto ERR;
    } else {
        memset(*dest, '\0', bufsiz);
    }

    while (*p != '\0') {
        if ((current + 2) >= bufsiz) {
            bufsiz += DEFAULT_BUFSIZE;
            if ((*dest = (char*)
                        realloc(*dest, sizeof(char) * bufsiz)) == NULL) {
                status = -2; goto ERR;
            } else {
                memset(*dest + current, '\0', DEFAULT_BUFSIZE);
            }
        }
        if (*p == '%') {
            p++;
            sscanf(p, "%2X", *(dest) + current);
            p += 2;
        } else {
            *(*(dest) + current) = *p;
            p++;
        }
        current++;
    }

    return 0;

ERR:
    switch (status) {
        case    -1:
        case    -2:
            fprintf(stderr, "%s\n",
                    strerror(errno));
            break;
    }

    return status;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %edi
movl $0x400, %esi            # imm = 0x400
callq 0x23d0
movq %rax, (%rbx)
testq %rax, %rax
je 0x9edb
movb (%r14), %al
testb %al, %al
je 0x9ecd
movl $0x400, %r15d           # imm = 0x400
leaq 0x22f2(%rip), %r12      # 0xc14b
xorl %r13d, %r13d
leaq 0x2(%r13), %rcx
cmpq %r15, %rcx
jb 0x9e94
addq $0x400, %r15            # imm = 0x400
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x2420
movq %rax, (%rbx)
testq %rax, %rax
je 0x9ee2
addq %r13, %rax
movl $0x400, %edx            # imm = 0x400
movq %rax, %rdi
xorl %esi, %esi
callq 0x2050
movb (%r14), %al
cmpb $0x25, %al
jne 0x9eb3
leaq 0x1(%r14), %rdi
movq (%rbx), %rdx
addq %r13, %rdx
movq %r12, %rsi
xorl %eax, %eax
callq 0x2090
movl $0x3, %ecx
jmp 0x9ebf
movq (%rbx), %rcx
movb %al, (%rcx,%r13)
movl $0x1, %ecx
movb (%r14,%rcx), %al
addq %rcx, %r14
incq %r13
testb %al, %al
jne 0x9e5c
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x9ee7
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
callq 0x2608
jmp 0x9ecf
nop
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/cow.c
// Function: read_cow
static
int read_cow(COW** cow)
{
    int     status  = 0;

    if ((*cow)->fp == NULL) {
        status = -1; goto ERR;
    }
    if (((*cow)->lines =
                load_file_to_array(&(*cow)->data, TH_LINES, TH_LENGTH, (*cow)->fp)) < 0) {
        status = -2; goto ERR;
    }
    fclose((*cow)->fp);

    return 0;

ERR:
    switch (status) {
        case    -1:
            fprintf(stdout, "%s: read_cowfile(): fp is NULL\n",
                    PROGNAME);
            break;
        case    -2:
            fprintf(stderr, "%s: read_cowfile(): load_file_to_array(): %s\n",
                    PROGNAME, strerror(errno));
        default:
            if ((*cow)->fp != NULL) {
                fclose((*cow)->fp);
                (*cow)->fp = NULL;
            }
    }

    return status;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
movq (%rdi), %rcx
testq %rcx, %rcx
je 0xa5b9
addq $0x8, %rdi
movl $0x100, %esi            # imm = 0x100
movl $0x200, %edx            # imm = 0x200
callq 0x3df4
movq (%rbx), %rcx
movl %eax, 0x10(%rcx)
testl %eax, %eax
js 0xa5e5
movq (%rcx), %rdi
callq 0x23e0
xorl %eax, %eax
jmp 0xa5dd
movq 0x6a30(%rip), %rax      # 0x10ff0
movq (%rax), %rdi
leaq 0x1d63(%rip), %rsi      # 0xc32d
leaq 0x1c88(%rip), %rdx      # 0xc259
xorl %eax, %eax
callq 0x2450
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x4(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27d1
movl (%r14), %eax
jmp 0xa5dd
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/cow.c
// Function: release_cow
static
void release_cow(COW* cow)
{
    int     i   = 0,
            j   = 0;

    if (cow != NULL) {
        if (cow->data != NULL) {
            i = 0;
            j = cow->lines - 1;
            while (i <= j) {
                if (*(cow->data + i) != NULL) {
                    free(*(cow->data + i));
                    *(cow->data + i) = NULL;
                }
                if (*(cow->data + j) != NULL) {
                    free(*(cow->data + j));
                    *(cow->data + j) = NULL;
                }
                i++;
                j--;
            }
            free(cow->data);
            cow->data = NULL;
        }
        free(cow);
        cow = NULL;
    }

    return;
}

// Assembly:
testq %rdi, %rdi
je 0xaa04
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0xa9f7
movslq 0x10(%rbx), %r14
testq %r14, %r14
jle 0xa9f2
decq %r14
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0xa9c5
callq 0x21a0
movq 0x8(%rbx), %rax
movq $0x0, (%rax,%r15,8)
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0xa9df
callq 0x21a0
movq 0x8(%rbx), %rax
movq $0x0, (%rax,%r14,8)
incq %r15
leaq -0x1(%r14), %rax
cmpq %r14, %r15
movq %rax, %r14
jl 0xa9a3
movq 0x8(%rbx), %rdi
callq 0x21a0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x21a0
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/list.c
// Function: list_cowfiles
int list_cowfiles(void)
{
    int     i       = 0,
            j       = 0,
            entry   = 0;

    char*   env     = NULL;

    env_t*  envt    = NULL;

    struct  dirent**  list;

    /* catenate file path */
    if ((env = getenv("COWPATH")) == NULL)
        env = COWPATH;

    if (split_env(env, &envt) < 0) {
        fprintf(stderr, "%s: list_cowfiles(): split_env() failure\n",
                PROGNAME);

        exit(8);
    }

    /* get file entry and sort */
    do {
        if ((entry = scandir(*(envt->envs + i),
                        &list, selects_cowfiles, alphasort)) != -1) {
            if (i > 0)
                puts("");
            fprintf(stdout, "%s:\n",
                    *(envt->envs + i));
            j = 0;
            while (j < entry) {
                fprintf(stdout, "%s\n",
                        list[j]->d_name);
                free(*(list + j));
                j++;
            }
            free(list);
        }
        i++;
    } while (i < envt->envc);
    release_env_t(envt);

    exit(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x10(%rsp), %rbx
movq $0x0, (%rbx)
leaq 0x17cb(%rip), %rdi      # 0xc29c
callq 0x2380
testq %rax, %rax
leaq 0x17c4(%rip), %rdi      # 0xc2a4
cmovneq %rax, %rdi
movq %rbx, %rsi
callq 0x3c18
testl %eax, %eax
jns 0xab19
movq 0x64e9(%rip), %rax      # 0x10fe0
movq (%rax), %rdi
leaq 0x1cf5(%rip), %rsi      # 0xc7f6
leaq 0x1751(%rip), %rdx      # 0xc259
xorl %eax, %eax
callq 0x2450
movl $0x8, %edi
callq 0x20c0
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %r15
movq 0x64c6(%rip), %r12      # 0x10ff0
leaq 0x1da8(%rip), %r13      # 0xc8d9
xorl %ebx, %ebx
movq 0x8(%rdi), %rax
movq (%rax,%rbx,8), %rdi
movq %r15, %rsi
leaq 0xa5(%rip), %rdx        # 0xabea
movq 0x648c(%rip), %rcx      # 0x10fd8
callq 0x2140
cmpl $-0x1, %eax
je 0xabca
movl %eax, %ebp
testq %rbx, %rbx
je 0xab67
movl $0xa, %edi
callq 0x20d0
movq (%r12), %rdi
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax,%rbx,8), %rdx
leaq 0x1ca1(%rip), %rsi      # 0xc820
xorl %eax, %eax
callq 0x2450
testl %ebp, %ebp
jle 0xabc0
movl %ebp, %ebp
xorl %r14d, %r14d
movq (%r12), %rdi
movq 0x8(%rsp), %rax
movq (%rax,%r14,8), %rdx
addq $0x13, %rdx
movq %r13, %rsi
xorl %eax, %eax
callq 0x2450
movq 0x8(%rsp), %rax
movq (%rax,%r14,8), %rdi
callq 0x21a0
incq %r14
cmpq %r14, %rbp
jne 0xab8f
movq 0x8(%rsp), %rdi
callq 0x21a0
incq %rbx
movq 0x10(%rsp), %rdi
movslq (%rdi), %rax
cmpq %rax, %rbx
jl 0xab33
callq 0x3d43
xorl %edi, %edi
callq 0x20c0
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/msg.c
// Function: recursive_msg
static
int recursive_msg(MSG** msg, int n)
{
    int     status  = 0,
            fd[2]   = {0};

    while (n > 1) {
        if (pipe(fd) < 0) {
            status = -1; goto ERR;
        }
        switch (fork()) {
            case    -1:
                status = -2; goto ERR;
            case    0:
                close(fd[0]);
                dup2(fd[1], STDOUT_FILENO);
                close(fd[1]);
                (*msg)->print(*msg);
                (*msg)->release(*msg);
                exit(0);
            default:
                close(fd[1]);
                if (read_recursive_msg(&(*msg), fd[0]) < 0) {
                    status = -3; goto ERR;
                }
                close(fd[0]);
        }
        wait(&status);
        n--;
    }

    return 0;

ERR:
    switch (status) {
        case    -1:
            fprintf(stderr, "%s: pipe(): %s\n",
                    PROGNAME, strerror(errno));
            break;
        case    -2:
            fprintf(stderr, "%s: fork(): %s\n",
                    PROGNAME, strerror(errno));
            break;
        case    -3:
            break;
    }

    return status;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl $0x0, 0xc(%rsp)
movq $0x0, 0x10(%rsp)
xorl %eax, %eax
cmpl $0x2, %esi
jl 0xb136
movl %esi, %r14d
movq %rdi, %rbx
incl %r14d
leaq 0x10(%rsp), %r15
leaq 0x180d(%rip), %r12      # 0xc85c
leaq 0xc(%rsp), %r13
movq %r15, %rdi
callq 0x2240
testl %eax, %eax
js 0xb106
callq 0x2400
cmpl $-0x1, %eax
je 0xb112
testl %eax, %eax
je 0xb145
movl 0x14(%rsp), %edi
callq 0x2060
movl 0x10(%rsp), %ebp
movq (%rbx), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xb0ab
movl 0x8(%rax), %esi
callq 0x4ca1
movq (%rbx), %rax
movl $0x0, 0x8(%rax)
movq $0x0, (%rax)
movl %ebp, %edi
movq %r12, %rsi
callq 0x2220
testq %rax, %rax
je 0xb11e
movq %rax, %rbp
movq (%rbx), %rdi
movl $0x100, %esi            # imm = 0x100
movl $0x200, %edx            # imm = 0x200
movq %rax, %rcx
callq 0x3df4
movq (%rbx), %rcx
movl %eax, 0x8(%rcx)
movq %rbp, %rdi
testl %eax, %eax
js 0xb125
callq 0x23e0
movl 0x10(%rsp), %edi
callq 0x2060
movq %r13, %rdi
callq 0x2070
decl %r14d
cmpl $0x2, %r14d
jg 0xb054
xorl %eax, %eax
jmp 0xb136
leaq 0xc(%rsp), %rdi
callq 0x29ad
jmp 0xb132
leaq 0xc(%rsp), %rdi
callq 0x28f7
jmp 0xb132
callq 0x2979
jmp 0xb12a
callq 0x2931
movl $0xfffffffd, 0xc(%rsp)  # imm = 0xFFFFFFFD
movl 0xc(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x10(%rsp), %edi
callq 0x2060
movl 0x14(%rsp), %edi
movl $0x1, %esi
callq 0x2040
movl 0x14(%rsp), %edi
callq 0x2060
movq (%rbx), %rdi
callq *0x20(%rdi)
movq (%rbx), %rdi
callq *0x28(%rdi)
xorl %edi, %edi
callq 0x20c0
// File: /workspace/github_c_makefile_star2_O3/sasairc[P]clangsay/src/msg.c
// Function: release_msg
static
void release_msg(MSG* msg)
{
    int     i   = 0,
            j   = 0;

    if (msg != NULL) {
        if (msg->data != NULL) {
            i = 0;
            j = msg->lines - 1;
            while (i <= j) {
                if (*(msg->data + i) != NULL) {
                    free(*(msg->data + i));
                    *(msg->data + i) = NULL;
                }
                if (*(msg->data + j) != NULL) {
                    free(*(msg->data + j));
                    *(msg->data + j) = NULL;
                }
                i++;
                j--;
            }
            free(msg->data);
            msg->data = NULL;
        }
        free(msg);
        msg = NULL;
    }

    return;
}

// Assembly:
testq %rdi, %rdi
je 0xb1f8
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xb1eb
movslq 0x8(%rbx), %r14
testq %r14, %r14
jle 0xb1e6
decq %r14
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0xb1bb
callq 0x21a0
movq (%rbx), %rax
movq $0x0, (%rax,%r15,8)
movq (%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0xb1d4
callq 0x21a0
movq (%rbx), %rax
movq $0x0, (%rax,%r14,8)
incq %r15
leaq -0x1(%r14), %rax
cmpq %r14, %r15
movq %rax, %r14
jl 0xb19c
movq (%rbx), %rdi
callq 0x21a0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x21a0
retq
// File: /workspace/github_c_makefile_star2_O3/sc932[P]ALE/src/synthReadGen.c
// Function: NormalVal
double NormalVal(float mu, float sigma){
  double u, v, x, y, q;
  int stop = 0;
  while(stop == 0){
    u = rand()/( RAND_MAX + 1.0 );
    v = 1.7156*(rand()/( RAND_MAX + 1.0 ) - 0.5);
    x = u - 0.449871;
    y = abs(v) + 0.386595;
    q = sqrt(x) + y*(0.19600*y-0.25472*x);
    if( q > 0.27597 && ( q > 0.27846 || sqrt(v) > -4.0*log(u)*sqrt(u))){
      stop = 1;
    }
  }
  return mu + sigma*v/u;
}

// Assembly:
subq $0x28, %rsp
movss %xmm1, 0x24(%rsp)
movss %xmm0, 0x20(%rsp)
callq 0x1190
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd 0x2bbe(%rip), %xmm0     # 0x4008
mulsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
callq 0x1190
movsd (%rsp), %xmm2
xorps %xmm3, %xmm3
cvtsi2sd %eax, %xmm3
mulsd 0x2b9c(%rip), %xmm3     # 0x4008
addsd 0x2bb4(%rip), %xmm3     # 0x4028
mulsd 0x2bb4(%rip), %xmm3     # 0x4030
movapd %xmm2, %xmm4
cvttsd2si %xmm3, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
xorps %xmm5, %xmm5
cvtsi2sd %ecx, %xmm5
addsd 0x2b9e(%rip), %xmm4     # 0x4038
addsd 0x2b9e(%rip), %xmm5     # 0x4040
ucomisd 0x2bc6(%rip), %xmm4     # 0x4070
movsd %xmm3, 0x18(%rsp)
jb 0x14bb
xorps %xmm0, %xmm0
sqrtsd %xmm4, %xmm0
jmp 0x14e7
movapd %xmm4, %xmm0
movsd %xmm4, 0x8(%rsp)
movsd %xmm5, 0x10(%rsp)
callq 0x1180
movsd 0x10(%rsp), %xmm5
movsd 0x8(%rsp), %xmm4
movsd 0x18(%rsp), %xmm3
movsd (%rsp), %xmm2
mulsd 0x2b59(%rip), %xmm4     # 0x4048
movapd %xmm5, %xmm1
mulsd 0x2b55(%rip), %xmm1     # 0x4050
addsd %xmm4, %xmm1
mulsd %xmm5, %xmm1
addsd %xmm0, %xmm1
ucomisd 0x2b49(%rip), %xmm1     # 0x4058
jbe 0x1436
ucomisd 0x2b43(%rip), %xmm1     # 0x4060
ja 0x15ab
ucomisd 0x2b45(%rip), %xmm3     # 0x4070
jb 0x1536
xorps %xmm0, %xmm0
sqrtsd %xmm3, %xmm0
jmp 0x1544
movapd %xmm3, %xmm0
callq 0x1180
movsd (%rsp), %xmm2
movsd %xmm0, 0x8(%rsp)
movapd %xmm2, %xmm0
callq 0x1090
movsd (%rsp), %xmm2
movapd %xmm0, %xmm1
mulsd 0x2b04(%rip), %xmm1     # 0x4068
ucomisd 0x2b04(%rip), %xmm2     # 0x4070
jb 0x1577
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
jmp 0x1591
movapd %xmm2, %xmm0
movsd %xmm1, 0x10(%rsp)
callq 0x1180
movsd 0x10(%rsp), %xmm1
movsd (%rsp), %xmm2
movsd 0x18(%rsp), %xmm3
mulsd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1436
xorps %xmm0, %xmm0
cvtss2sd 0x20(%rsp), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x24(%rsp), %xmm1
mulsd %xmm1, %xmm3
divsd %xmm2, %xmm3
addsd %xmm0, %xmm3
movapd %xmm3, %xmm0
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/sc932[P]ALE/src/synthReadGen.c
// Function: TruncatedNormal
double TruncatedNormal(float mu, float sigma, float min, float max){
  double val = NormalVal(mu, sigma);
  if(val < min){
    return min;
  }else if(val > max){
    return max;
  }else{
    return val;
  }
}

// Assembly:
pushq %rax
movss %xmm3, (%rsp)
movss %xmm2, 0x4(%rsp)
callq 0x1426
movapd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd 0x4(%rsp), %xmm0
ucomisd %xmm1, %xmm0
ja 0x1602
xorps %xmm0, %xmm0
cvtss2sd (%rsp), %xmm0
minsd %xmm1, %xmm0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/dalnefre[P]kernel_abe/life.c
// Function: print_grid
void
print_grid()
{
	int x, y;
	
	for (y = 0; y < Y_MAX; ++y) {
		for (x = 0; x < X_MAX; ++x) {
			printf(" %c", get_grid_value(x, y));
		}
		printf("\n");
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x10940(%rip), %r14     # 0x13130
leaq 0xb80d(%rip), %rbx      # 0xe004
xorl %r15d, %r15d
xorl %r12d, %r12d
movl (%r14,%r12,4), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x20f0
incq %r12
cmpq $0x8, %r12
jne 0x27fd
movl $0xa, %edi
callq 0x2040
incq %r15
addq $0x20, %r14
cmpq $0x8, %r15
jne 0x27fa
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/dalnefre[P]kernel_abe/life.c
// Function: ask_cell
BEH_DECL(ask_cell)
{
	CONS* msg = WHAT;
	CONS* x = map_get(msg, ATOM("x"));
	CONS* y = map_get(msg, ATOM("y"));
	CONS* state = MINE;
/*	CONS* request = map_get(state, ATOM("request")); */
/*	CONS* reply_to = map_get(state, ATOM("reply-to")); */
	CONS* cell;

	DBUG_ENTER("ask_cell");
	cell = get_cell(MK_INT(x), MK_INT(y));
	assert(actorp(cell));
	msg = state;
	DBUG_PRINT("", ("x=%d y=%d msg=%s", MK_INT(x), MK_INT(y), cons_to_str(msg)));
	SEND(cell, msg);
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0xbdf9
movq %rax, %r15
leaq 0xbf5b(%rip), %rdi      # 0xf3ba
callq 0x91e7
xorl %ebp, %ebp
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0xc22e
movq %rax, %r14
leaq 0xb405(%rip), %rdi      # 0xe882
callq 0x91e7
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0xc22e
movq %rax, %r15
movq 0x30(%rbx), %rdi
callq 0xbd5a
movq %rax, %rdi
callq 0x3e4d
movq %rax, %r12
leaq 0xac4a(%rip), %rax      # 0xe0f7
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0xff3e(%rip), %rax      # 0x133f8
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x125, 0xc(%rdi)       # imm = 0x125
leaq 0xc92f(%rip), %r13      # 0xfe04
movq %r13, 0x10(%rdi)
leaq 0xfd50(%rip), %rcx      # 0x13230
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0xdb0e
shrq $0x2, %r14
shrq $0x2, %r15
testl %r14d, %r14d
movl $0x0, %eax
cmovgl %r14d, %eax
subl %r14d, %eax
movl $0x7, %ecx
addl %ecx, %eax
andl $-0x8, %eax
addl %r14d, %eax
cmpl $0x8, %eax
movl $0x7, %edx
cmovgel %eax, %edx
movl $0x7ffffff8, %esi       # imm = 0x7FFFFFF8
andl %esi, %edx
subl %edx, %eax
testl %r15d, %r15d
cmovgl %r15d, %ebp
subl %r15d, %ebp
addl $0x7, %ebp
andl $-0x8, %ebp
addl %r15d, %ebp
cmpl $0x8, %ebp
cmovgel %ebp, %ecx
andl %esi, %ecx
subl %ecx, %ebp
shlq $0x6, %rbp
leaq 0xff03(%rip), %rcx      # 0x13450
addq %rbp, %rcx
movq (%rcx,%rax,8), %rbp
movl %ebp, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x35ec
leaq 0x10637(%rip), %rax     # 0x13ba0
cmpl $0x0, (%rax)
je 0x35c0
leaq 0xfe83(%rip), %rax      # 0x133f8
movq (%rax), %rax
movq 0x50(%rax), %rax
movq %r13, 0x10(%rax)
movq %r13, %rdi
callq 0xd270
testl %eax, %eax
je 0x35c0
leaq 0xfe65(%rip), %rax      # 0x133f8
movq (%rax), %rax
movq 0x50(%rax), %rax
movl $0x129, 0xc(%rax)       # imm = 0x129
movq %r12, %rdi
callq 0x5d28
leaq 0xab75(%rip), %rdi      # 0xe125
movl %r14d, %esi
movl %r15d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0xdb7f
movq %rbx, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x4a83
movq %rsp, %rdi
movl $0x12b, 0xc(%rdi)       # imm = 0x12B
callq 0xdc93
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xab0d(%rip), %rdi      # 0xe100
leaq 0xaa4e(%rip), %rsi      # 0xe048
leaq 0xab0c(%rip), %rcx      # 0xe10d
movl $0x127, %edx            # imm = 0x127
callq 0x2110
// File: /workspace/github_c_makefile_star2_O3/dalnefre[P]kernel_abe/life.c
// Function: life_tick
void
life_tick(CONFIG* cfg)
{
	CONS* msg;
	CONS* actor;
	int n;

	DBUG_ENTER("life_tick");
	actor = CFG_ACTOR(cfg, ask_all_cells, NIL);

	msg = NIL;
	msg = map_put(msg, ATOM("request"), ATOM("gen-next"));
	CFG_SEND(cfg, actor, msg);

	n = run_configuration(cfg, 1000000);
	if (cfg->q_count > 0) {
		TRACE(printf("gen-next: queue length %d with %d budget remaining\n", cfg->q_count, n));
	}

	msg = NIL;
	msg = map_put(msg, ATOM("request"), ATOM("update-grid"));
	CFG_SEND(cfg, actor, msg);

	n = run_configuration(cfg, 1000000);
	if (cfg->q_count > 0) {
		TRACE(printf("update-grid: queue length %d with %d budget remaining\n", cfg->q_count, n));
	}

	DBUG_RETURN;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0xa6f7(%rip), %rax      # 0xe16b
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0xf977(%rip), %rax      # 0x133f8
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x177, 0xc(%rdi)       # imm = 0x177
leaq 0xc368(%rip), %rcx      # 0xfe04
movq %rcx, 0x10(%rdi)
leaq 0xf789(%rip), %rcx      # 0x13230
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0xdb0e
leaq -0x4b0(%rip), %rsi      # 0x360b
leaq 0xf8a6(%rip), %r15      # 0x13368
movq %rbx, %rdi
movq %r15, %rdx
callq 0x49a6
movq %rax, %r14
leaq 0xa5b3(%rip), %rdi      # 0xe08a
callq 0x91e7
movq %rax, %r12
leaq 0xa5e1(%rip), %rdi      # 0xe0c7
callq 0x91e7
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xc2a0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x4a83
movq %rbx, %rdi
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x50f7
movl 0x28(%rbx), %esi
testl %esi, %esi
jle 0x3b2b
leaq 0xa653(%rip), %rdi      # 0xe175
movl %eax, %edx
xorl %eax, %eax
callq 0x20f0
leaq 0xa558(%rip), %rdi      # 0xe08a
callq 0x91e7
movq %rax, %r15
leaq 0xa57a(%rip), %rdi      # 0xe0bb
callq 0x91e7
leaq 0xf81b(%rip), %rdi      # 0x13368
movq %r15, %rsi
movq %rax, %rdx
callq 0xc2a0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x4a83
movq %rbx, %rdi
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x50f7
movl 0x28(%rbx), %esi
testl %esi, %esi
jle 0x3b8a
leaq 0xa628(%rip), %rdi      # 0xe1a9
movl %eax, %edx
xorl %eax, %eax
callq 0x20f0
movq %rsp, %rdi
movl $0x18c, 0xc(%rdi)       # imm = 0x18C
callq 0xdc93
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/dalnefre[P]kernel_abe/life.c
// Function: test_life
void
test_life(int counter)
{
	int n;
	CONFIG* cfg;

	DBUG_ENTER("test_life");
	TRACE(printf("--test_life--\n"));
	cfg = init_life();

	TRACE(printf("Initial Grid\n"));
	print_grid();
	
	for (n = 1; n < counter; ++n) {
		life_tick(cfg);
		TRACE(printf("Generation %d\n", n));
		print_grid();
	}

	report_actor_usage(cfg);
	DBUG_RETURN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edi, %ebx
leaq 0xa628(%rip), %rax      # 0xe1e0
movq %rsp, %rdi
movq %rax, (%rdi)
leaq 0xf833(%rip), %rax      # 0x133f8
movq (%rax), %rax
movq 0x50(%rax), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x8(%rdi)
movl $0x195, 0xc(%rdi)       # imm = 0x195
leaq 0xc224(%rip), %rcx      # 0xfe04
movq %rcx, 0x10(%rdi)
leaq 0xf645(%rip), %rcx      # 0x13230
movq %rcx, 0x18(%rdi)
movq %rax, 0x20(%rdi)
callq 0xdb0e
leaq 0xa633(%rip), %rdi      # 0xe232
callq 0x20b0
callq 0x383d
movq %rax, %r14
leaq 0xa62d(%rip), %rdi      # 0xe240
callq 0x20b0
callq 0x27e1
cmpl $0x2, %ebx
jl 0x3c4d
movl $0x1, %ebp
leaq 0xa5bc(%rip), %r15      # 0xe1ea
movq %r14, %rdi
callq 0x3a5f
movq %r15, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x20f0
callq 0x27e1
incl %ebp
cmpl %ebp, %ebx
jne 0x3c2e
movq %r14, %rdi
callq 0x5c68
movq %rsp, %rdi
movl $0x1a3, 0xc(%rdi)       # imm = 0x1A3
callq 0xdc93
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq