LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/atchannel.c
// Function: at_open
int at_open(int fd, ATUnsolHandler h)
{
    int ret;
    pthread_attr_t attr;

    s_fd = fd;
    s_unsolHandler = h;
    s_readerClosed = 0;

    s_responsePrefix = NULL;
    s_smsPDU = NULL;
    sp_response = NULL;
    
    pthread_attr_init (&attr);
    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);

    ret = pthread_create(&s_tid_reader, &attr, readerLoop, NULL);

    if (ret < 0) {
        LOGE("readerLoop create fail!");
        perror ("pthread_create\n");
        return -1;
    }

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edi, 0xfba3(%rip)      # 0x29310
andq $0x0, 0x117eb(%rip)     # 0x2af60
movq %rsi, 0x117d4(%rip)     # 0x2af50
andq $0x0, 0x117e4(%rip)     # 0x2af68
movb $0x0, 0x117cd(%rip)     # 0x2af58
andq $0x0, 0x117dd(%rip)     # 0x2af70
movq %rsp, %r14
movq %r14, %rdi
callq 0x5260
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x5330
leaq 0x117c8(%rip), %rdi     # 0x2af78
leaq 0x76(%rip), %rdx        # 0x1982d
xorl %ebx, %ebx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x53e0
testl %eax, %eax
js 0x197d1
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq 0xf7e0(%rip), %rax      # 0x28fb8
movq (%rax), %rbx
callq 0xe343
leaq 0x7cb1(%rip), %rsi      # 0x21498
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x104ad(%rip), %rax     # 0x29ca8
movq (%rax), %rbx
testq %rbx, %rbx
je 0x1981c
callq 0xe343
leaq 0x7c89(%rip), %rsi      # 0x21498
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0x7c93(%rip), %rdi      # 0x214b6
callq 0x54a0
pushq $-0x1
popq %rbx
jmp 0x197c7
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/atchannel.c
// Function: at_close
void at_close()
{
    dbg_time("at_close");
    if (s_fd >= 0) {
        close(s_fd);
    }
    s_fd = -1;

    pthread_mutex_lock(&cm_command_mutex);

    s_readerClosed = 1;

    pthread_cond_signal(&cm_command_cond);

    pthread_mutex_unlock(&cm_command_mutex);

    /* the reader thread should eventually die */
}

// Assembly:
pushq %rbx
movq 0xf31f(%rip), %rax      # 0x28fb8
movq (%rax), %rbx
callq 0xe343
leaq 0x781e(%rip), %rsi      # 0x214c6
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0xffec(%rip), %rax      # 0x29ca8
movq (%rax), %rbx
testq %rbx, %rbx
je 0x19cdd
callq 0xe343
leaq 0x77f6(%rip), %rsi      # 0x214c6
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
movl 0xf62d(%rip), %edi      # 0x29310
testl %edi, %edi
js 0x19cec
callq 0x5230
orl $-0x1, 0xf61d(%rip)     # 0x29310
leaq 0xff56(%rip), %rbx      # 0x29c50
movq %rbx, %rdi
callq 0x5570
movb $0x1, 0x1124f(%rip)     # 0x2af58
leaq 0xff68(%rip), %rdi      # 0x29c78
callq 0x5280
movq %rbx, %rdi
popq %rbx
jmp 0x5340
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/atchannel.c
// Function: at_response_free
void at_response_free(ATResponse *p_response)
{
    ATLine *p_line;

    if (p_response == NULL) return;

    p_line = p_response->p_intermediates;

    while (p_line != NULL) {
        ATLine *p_toFree;

        p_toFree = p_line;
        p_line = p_line->p_next;

        free(p_toFree->line);
        free(p_toFree);
    }

    free (p_response->finalResponse);
    free (p_response);
}

// Assembly:
testq %rdi, %rdi
je 0x19d63
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x19d4d
movq (%r14), %r15
movq 0x8(%r14), %rdi
callq 0x5040
movq %r14, %rdi
callq 0x5040
movq %r15, %r14
jmp 0x19d2f
movq 0x8(%rbx), %rdi
callq 0x5040
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x5040
retq
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/atchannel.c
// Function: at_send_command_full
static int at_send_command_full (const char *command, ATCommandType type,
                    const char *responsePrefix, const char *smspdu,
                    long long timeoutMsec, ATResponse **pp_outResponse)
{
    int err;

    if (0 != pthread_equal(s_tid_reader, pthread_self())) {
        /* cannot be called from reader thread */
        return AT_ERROR_INVALID_THREAD;
    }

    pthread_mutex_lock(&cm_command_mutex);

    err = at_send_command_full_nolock(command, type,
                    responsePrefix, smspdu,
                    timeoutMsec, pp_outResponse);

    pthread_mutex_unlock(&cm_command_mutex);

    if (err == AT_ERROR_TIMEOUT && s_onTimeout != NULL) {
        s_onTimeout();
    }

    return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r12
movq 0x111e9(%rip), %r13     # 0x2af78
callq 0x5410
movq %r13, %rdi
movq %rax, %rsi
callq 0x5400
testl %eax, %eax
je 0x19da7
pushq $-0x5
jmp 0x19df4
leaq 0xfea2(%rip), %r13      # 0x29c50
movq %r13, %rdi
callq 0x5570
movq %r12, %rdi
movl %ebp, %esi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x19fac
movl %eax, %ebx
movq %r13, %rdi
callq 0x5340
cmpl $-0x4, %ebx
sete %cl
movq 0x111ad(%rip), %rax     # 0x2af90
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x19df5
callq *%rax
pushq $-0x4
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/atchannel.c
// Function: at_send_command_singleline
int at_send_command_singleline (const char *command,
                                const char *responsePrefix,
                                 ATResponse **pp_outResponse)
{
    int err;

    err = at_send_command_full (command, SINGLELINE, responsePrefix,
                                    NULL, 0, pp_outResponse);

    if (err == 0 && pp_outResponse != NULL
        && (*pp_outResponse)->success > 0
        && (*pp_outResponse)->p_intermediates == NULL
    ) {
        /* successful command must have an intermediate response */
        at_response_free(*pp_outResponse);
        *pp_outResponse = NULL;
        return AT_ERROR_INVALID_RESPONSE;
    }

    return err;
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
movq %rsi, %rdx
pushq $0x2
popq %rsi
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x19d6f
testl %eax, %eax
setne %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0x19e4d
movq (%rbx), %rdi
cmpl $0x0, (%rdi)
jle 0x19e4b
cmpq $0x0, 0x10(%rdi)
movl $0x0, %eax
jne 0x19e4d
callq 0x19d1e
andq $0x0, (%rbx)
pushq $-0x6
popq %rax
jmp 0x19e4d
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/atchannel.c
// Function: at_send_command_numeric
int at_send_command_numeric (const char *command,
                                 ATResponse **pp_outResponse)
{
    int err;

    err = at_send_command_full (command, NUMERIC, NULL,
                                    NULL, 0, pp_outResponse);

    if (err == 0 && pp_outResponse != NULL
        && (*pp_outResponse)->success > 0
        && (*pp_outResponse)->p_intermediates == NULL
    ) {
        /* successful command must have an intermediate response */
        at_response_free(*pp_outResponse);
        *pp_outResponse = NULL;
        return AT_ERROR_INVALID_RESPONSE;
    }

    return err;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
pushq $0x1
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x19d6f
testl %eax, %eax
setne %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0x19e95
movq (%rbx), %rdi
cmpl $0x0, (%rdi)
jle 0x19e93
cmpq $0x0, 0x10(%rdi)
movl $0x0, %eax
jne 0x19e95
callq 0x19d1e
andq $0x0, (%rbx)
pushq $-0x6
popq %rax
jmp 0x19e95
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/atchannel.c
// Function: at_send_command_sms
int at_send_command_sms (const char *command,
                                const char *pdu,
                                const char *responsePrefix,
                                 ATResponse **pp_outResponse)
{
    int err;

    err = at_send_command_full (command, SINGLELINE, responsePrefix,
                                    pdu, 0, pp_outResponse);

    if (err == 0 && pp_outResponse != NULL
        && (*pp_outResponse)->success > 0
        && (*pp_outResponse)->p_intermediates == NULL
    ) {
        /* successful command must have an intermediate response */
        at_response_free(*pp_outResponse);
        *pp_outResponse = NULL;
        return AT_ERROR_INVALID_RESPONSE;
    }

    return err;
}

// Assembly:
pushq %rbx
movq %rcx, %rbx
movq %rsi, %rcx
pushq $0x2
popq %rsi
movq %rbx, %r8
callq 0x19d6f
testl %eax, %eax
setne %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0x19ed5
movq (%rbx), %rdi
xorl %eax, %eax
cmpl $0x0, (%rdi)
jle 0x19ed5
cmpq $0x0, 0x10(%rdi)
jne 0x19ed5
callq 0x19d1e
andq $0x0, (%rbx)
pushq $-0x6
popq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/atchannel.c
// Function: at_handshake
int at_handshake()
{
    int i;
    int err = 0;

    if (0 != pthread_equal(s_tid_reader, pthread_self())) {
        /* cannot be called from reader thread */
        return AT_ERROR_INVALID_THREAD;
    }

    pthread_mutex_lock(&cm_command_mutex);

    for (i = 0 ; i < HANDSHAKE_RETRY_COUNT ; i++) {
        /* some stacks start with verbose off */
        err = at_send_command_full_nolock ("ATE0Q0V1", NO_RESULT,
                    NULL, NULL, HANDSHAKE_TIMEOUT_MSEC, NULL);

        if (err == 0) {
            break;
        }
    }

    pthread_mutex_unlock(&cm_command_mutex);

    if (err == 0) {
        /* pause for a bit to let the input buffer drain any unmatched OK's
           (they will appear as extraneous unsolicited responses) */

        sleepMsec(HANDSHAKE_TIMEOUT_MSEC);
    }

    return err;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0x11065(%rip), %rbx     # 0x2af78
callq 0x5410
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5400
testl %eax, %eax
je 0x19f2c
pushq $-0x5
popq %rbx
jmp 0x19fa1
leaq 0xfd1d(%rip), %rdi      # 0x29c50
callq 0x5570
xorl %eax, %eax
pushq $0x9
popq %rbp
leaq 0x7591(%rip), %r14      # 0x214d5
movl %eax, %ebx
decl %ebp
je 0x19f67
xorl %ebx, %ebx
movl $0x3e8, %r8d            # imm = 0x3E8
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x19fac
testl %eax, %eax
jne 0x19f44
leaq 0xfce2(%rip), %rdi      # 0x29c50
callq 0x5340
testl %ebx, %ebx
jne 0x19fa1
movq %rsp, %rbx
movq $0x1, (%rbx)
andq $0x0, 0x8(%rbx)
movq %rbx, %rdi
movq %rbx, %rsi
callq 0x51d0
testl %eax, %eax
jns 0x19f9f
callq 0x5070
cmpl $0x4, (%rax)
je 0x19f86
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/atchannel.c
// Function: at_get_cme_error
AT_CME_Error at_get_cme_error(const ATResponse *p_response)
{
    int ret;
    int err;
    char *p_cur;

    if (p_response == NULL)
        return CME_ERROR_NON_CME;

    if (p_response->success > 0) {
        return CME_SUCCESS;
    }

    if (p_response->finalResponse == NULL
        || !strStartsWith(p_response->finalResponse, "+CME ERROR:")
    ) {
        return CME_ERROR_NON_CME;
    }

    p_cur = p_response->finalResponse;
    err = at_tok_start(&p_cur);

    if (err < 0) {
        return CME_ERROR_NON_CME;
    }

    err = at_tok_nextint(&p_cur, &ret);

    if (err < 0) {
        return CME_ERROR_NON_CME;
    }

    return (AT_CME_Error) ret;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
pushq $-0x1
popq %rbp
testq %rdi, %rdi
je 0x1a2ae
xorl %eax, %eax
cmpl $0x0, (%rdi)
jg 0x1a2b0
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
je 0x1a2ae
leaq 0x726a(%rip), %rsi      # 0x214de
movq %rbx, %rdi
callq 0x1973c
testl %eax, %eax
je 0x1a2ae
leaq 0x10(%rsp), %rdi
movq %rbx, (%rdi)
callq 0x1a678
movl %eax, %ecx
movl %ebp, %eax
testl %ecx, %ecx
js 0x1a2b0
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x1a6ac
testl %eax, %eax
js 0x1a2b7
movl 0xc(%rsp), %eax
jmp 0x1a2b0
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
pushq $-0x1
popq %rax
jmp 0x1a2b0
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/atchannel.c
// Function: findNextEOL
static char * findNextEOL(char *cur)
{
    if (cur[0] == '>' && cur[1] == ' ' && cur[2] == '\0') {
        /* SMS prompt character...not \r terminated */
        return cur+2;
    }

    // Find next newline
    while (*cur != '\0' && *cur != '\r' && *cur != '\n') cur++;

    return *cur == '\0' ? NULL : cur;
}

// Assembly:
movq %rdi, %rax
movb (%rdi), %cl
cmpb $0x3e, %cl
jne 0x1a5f8
cmpb $0x20, 0x1(%rax)
jne 0x1a5f8
cmpb $0x0, 0x2(%rax)
je 0x1a61b
movl $0x2401, %edx           # imm = 0x2401
cmpb $0xd, %cl
ja 0x1a60a
movzbl %cl, %esi
btl %esi, %edx
jb 0x1a612
movb 0x1(%rax), %cl
incq %rax
jmp 0x1a5fd
xorl %edx, %edx
testb %cl, %cl
cmoveq %rdx, %rax
retq
addq $0x2, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/atchannel.c
// Function: addIntermediate
static void addIntermediate(const char *line)
{
    ATLine *p_new;

    p_new = (ATLine  *) malloc(sizeof(ATLine));

    p_new->line = strdup(line);

    /* note: this adds to the head of the list, so the list
       will be in reverse order of lines received. the order is flipped
       again before passing on to the command issuer */
    p_new->p_next = sp_response->p_intermediates;
    sp_response->p_intermediates = p_new;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x10
popq %rdi
callq 0x5360
movq %rax, %r14
movq %rbx, %rdi
callq 0x5530
movq %rax, 0x8(%r14)
movq 0x1090d(%rip), %rax     # 0x2af70
movq 0x10(%rax), %rcx
movq %rcx, (%r14)
movq %r14, 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/at_tok.c
// Function: at_tok_start
int at_tok_start(char **p_cur)
{
    if (*p_cur == NULL) {
        return -1;
    }

    // skip prefix
    // consume "^[^:]:"

    *p_cur = strchr(*p_cur, ':');

    if (*p_cur == NULL) {
        return -1;
    }

    (*p_cur)++;

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %rdi
pushq $-0x1
popq %rbx
testq %rdi, %rdi
je 0x1a6a2
pushq $0x3a
popq %rsi
callq 0x5190
movq %rax, (%r14)
testq %rax, %rax
je 0x1a6a2
incq %rax
movq %rax, (%r14)
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/at_tok.c
// Function: at_tok_nextint_base
static int at_tok_nextint_base(char **p_cur, int *p_out, int base, int  uns)
{
    char *ret;

    if (*p_cur == NULL) {
        return -1;
    }

    ret = nextTok(p_cur);

    if (ret == NULL) {
        return -1;
    } else {
        long l;
        char *end;

        if (uns)
            l = strtoul(ret, &end, base);
        else
            l = strtol(ret, &end, base);

        *p_out = (int)l;

        if (end == ret) {
            return -1;
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
pushq $-0x1
popq %r15
cmpq $0x0, (%rdi)
je 0x1a70a
movl %ecx, %r12d
movl %edx, %ebp
movq %rsi, %rbx
callq 0x1a76f
testq %rax, %rax
je 0x1a70a
movq %rax, %r14
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
movl %ebp, %edx
testl %r12d, %r12d
je 0x1a6f4
callq 0x54b0
jmp 0x1a6f9
callq 0x52e0
movl %eax, (%rbx)
xorl %r15d, %r15d
cmpq %r14, 0x8(%rsp)
sete %r15b
negl %r15d
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/at_tok.c
// Function: nextTok
static char * nextTok(char **p_cur)
{
    char *ret = NULL;

    skipWhiteSpace(p_cur);

    if (*p_cur == NULL) {
        ret = NULL;
    } else if (**p_cur == '"') {
        (*p_cur)++;
        ret = strsep(p_cur, "\"");
        skipNextComma(p_cur);
    } else {
        ret = strsep(p_cur, ",");
    }

    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x1a7a1
movq %rdi, %rbx
incq %r14
movsbq -0x1(%r14), %r15
testq %r15, %r15
je 0x1a7de
callq 0x5590
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r15,2)
je 0x1a7a9
movq %r14, (%rbx)
jmp 0x1a77f
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
cmpb $0x22, %r15b
jne 0x1a7de
movq %r14, (%rbx)
leaq 0x688f(%rip), %rsi      # 0x21048
movq %rbx, %rdi
callq 0x5380
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x1a7a3
incq %rcx
movzbl -0x1(%rcx), %edx
testl %edx, %edx
je 0x1a7a3
cmpl $0x2c, %edx
je 0x1a7f2
movq %rcx, (%rbx)
jmp 0x1a7c9
leaq 0x6e38(%rip), %rsi      # 0x2161d
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x5380
movq %rcx, (%rbx)
jmp 0x1a7a3
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/at_tok.c
// Function: at_tok_count
int at_tok_count(const char *in_line)
{
    int commas = 0;
    const char *p;

    if (!in_line)
        return 0;

    for (p = in_line; *p != '\0' ; p++) {
        if (*p == ',') commas++;
    }

    return commas;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x1a824
movzbl (%rdi), %ecx
cmpl $0x2c, %ecx
je 0x1a81d
testl %ecx, %ecx
jne 0x1a81f
jmp 0x1a824
incl %eax
incq %rdi
jmp 0x1a80f
retq
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/udhcpc.c
// Function: update_ipv6_address
void update_ipv6_address(const char *ifname, const char *ip, const char *gw, unsigned prefix) {
    char shell_cmd[128];

    (void)gw;
    if (!access("/sbin/ip", X_OK)) {
        snprintf(shell_cmd, sizeof(shell_cmd), "ip -%d address flush dev %s", 6, ifname);
        ql_system(shell_cmd);

        snprintf(shell_cmd, sizeof(shell_cmd), "ip -%d address add %s/%u dev %s", 6, ip, prefix, ifname);
        ql_system(shell_cmd);

        //ping6 www.qq.com
        snprintf(shell_cmd, sizeof(shell_cmd), "ip -%d route add default dev %s", 6, ifname);
        ql_system(shell_cmd);
    } else {
        snprintf(shell_cmd, sizeof(shell_cmd), "ifconfig %s %s/%d", ifname, ip, prefix);
        ql_system(shell_cmd);

        snprintf(shell_cmd, sizeof(shell_cmd), "route -A inet6 add default dev %s", ifname);
        ql_system(shell_cmd);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movl %ecx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x6874(%rip), %rdi      # 0x2167a
pushq $0x1
popq %rsi
callq 0x5460
testl %eax, %eax
je 0x1ae59
leaq 0x693f(%rip), %rdx      # 0x21758
leaq 0x10(%rsp), %r15
movl $0x80, %esi
movq %r15, %rdi
movq %rbx, %rcx
movq %r14, %r8
movl %ebp, %r9d
xorl %eax, %eax
callq 0x51c0
movq %r15, %rdi
callq 0x1abc9
leaq 0x6925(%rip), %rdx      # 0x2176a
movl $0x80, %esi
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x51c0
jmp 0x1aecd
leaq 0x6823(%rip), %rdx      # 0x21683
leaq 0x10(%rsp), %r15
pushq $0x6
popq %r12
movl $0x80, %esi
movq %r15, %rdi
movl %r12d, %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0x51c0
movq %r15, %rdi
callq 0x1abc9
movq %rbx, (%rsp)
leaq 0x680e(%rip), %rdx      # 0x2169f
movl $0x80, %esi
movq %r15, %rdi
movl %r12d, %ecx
movq %r14, %r8
movl %ebp, %r9d
xorl %eax, %eax
callq 0x51c0
movq %r15, %rdi
callq 0x1abc9
leaq 0x6880(%rip), %rdx      # 0x21738
movl $0x80, %esi
movq %r15, %rdi
movl %r12d, %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0x51c0
leaq 0x10(%rsp), %rdi
callq 0x1abc9
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/udhcpc.c
// Function: ipv6Str
static const char *ipv6Str(const UCHAR Address[16]) {
    static char str[64];
    uint16_t ip[8];
    int i;
    for (i = 0; i < 8; i++) {
        ip[i] = (Address[i*2]<<8) + Address[i*2+1];
    }

    snprintf(str, sizeof(str), "%x:%x:%x:%x:%x:%x:%x:%x",
        ip[0], ip[1], ip[2], ip[3], ip[4], ip[5], ip[6], ip[7]);

    return str;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
xorl %eax, %eax
cmpq $0x8, %rax
je 0x1b87b
movzwl (%rdi,%rax,2), %ecx
rolw $0x8, %cx
movw %cx, (%rsp,%rax,2)
incq %rax
jmp 0x1b864
movzwl (%rsp), %ecx
movzwl 0x2(%rsp), %r8d
movzwl 0x4(%rsp), %r9d
movzwl 0x6(%rsp), %r10d
movzwl 0x8(%rsp), %r11d
movzwl 0xa(%rsp), %ebx
movzwl 0xc(%rsp), %r14d
movzwl 0xe(%rsp), %r15d
subq $0x8, %rsp
leaq 0xfb3d(%rip), %rdi      # 0x2b3f0
leaq 0x6050(%rip), %rdx      # 0x2190a
pushq $0x40
popq %rsi
xorl %eax, %eax
pushq %r15
pushq %r14
pushq %rbx
pushq %r11
pushq %r10
callq 0x51c0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/udhcpc.c
// Function: udhcpc_thread_function
static void* udhcpc_thread_function(void* arg) {
    FILE * udhcpc_fp;
    char *udhcpc_cmd = (char *)arg;

    if (udhcpc_cmd == NULL)
        return NULL;

    dbg_time("%s", udhcpc_cmd);
    udhcpc_fp = popen(udhcpc_cmd, "r");
    free(udhcpc_cmd);
    if (udhcpc_fp) {
        char buf[0xff];

        buf[sizeof(buf)-1] = '\0';
        while((fgets(buf, sizeof(buf)-1, udhcpc_fp)) != NULL) {
            if ((strlen(buf) > 1) && (buf[strlen(buf) - 1] == '\n'))
                buf[strlen(buf) - 1] = '\0';
            dbg_time("%s", buf);
        }

        pclose(udhcpc_fp);
    }

    return NULL;
}

// Assembly:
testq %rdi, %rdi
je 0x1bbb2
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %r14
movq 0xd50f(%rip), %r13      # 0x28fb8
movq (%r13), %rbx
callq 0xe343
leaq 0x148d(%rip), %rsi      # 0x1cf46
movq %rbx, %rdi
movq %rax, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x52c0
leaq 0xe1d8(%rip), %rbp      # 0x29ca8
movq (%rbp), %rbx
testq %rbx, %rbx
je 0x1baf5
callq 0xe343
leaq 0x1461(%rip), %rsi      # 0x1cf46
movq %rbx, %rdi
movq %rax, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x52c0
leaq 0x469f(%rip), %rsi      # 0x2019b
movq %r14, %rdi
callq 0x5470
movq %rax, %rbx
movq %r14, %rdi
callq 0x5040
testq %rbx, %rbx
je 0x1bba1
movb $0x0, 0xfe(%rsp)
movq %rsp, %r14
leaq 0x141c(%rip), %r15      # 0x1cf46
movq %r14, %rdi
movl $0xfe, %esi
movq %rbx, %rdx
callq 0x5270
testq %rax, %rax
je 0x1bb99
movq %r14, %rdi
callq 0x5160
cmpq $0x2, %rax
jb 0x1bb5a
cmpb $0xa, -0x1(%rax,%r14)
jne 0x1bb5a
movb $0x0, -0x1(%rsp,%rax)
movq (%r13), %r12
callq 0xe343
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x52c0
movq (%rbp), %r12
testq %r12, %r12
je 0x1bb2a
callq 0xe343
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x52c0
jmp 0x1bb2a
movq %rbx, %rdi
callq 0x51b0
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/Carton32[P]quectel-CM/udhcpc.c
// Function: udhcpc_stop
void udhcpc_stop(PROFILE_T *profile) {
    char *ifname = profile->usbnet_adapter;
    char shell_cmd[128];

    ql_set_driver_link_state(profile, 0);

    if (profile->qmapnet_adapter[0]) {
        ifname = profile->qmapnet_adapter;
    }

#ifdef USE_DHCLIENT
    if (dhclient_alive) {
        system("killall dhclient");
        dhclient_alive = 0;
    }
#endif
    if (dibbler_client_alive) {
        if (system("killall dibbler-client")) {};
        dibbler_client_alive = 0;
    }

//it seems when call netif_carrier_on(), and netcard 's IP is "0.0.0.0", will cause netif_queue_stopped()
    snprintf(shell_cmd, sizeof(shell_cmd), "ifconfig %s 0.0.0.0", ifname);
    ql_system(shell_cmd);
    snprintf(shell_cmd, sizeof(shell_cmd), "ifconfig %s down", ifname);
    ql_system(shell_cmd);

#ifdef QL_OPENWER_NETWORK_SETUP
    ql_openwrt_setup_wan(ifname, NULL);
    ql_openwrt_setup_wan6(ifname, NULL);
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
leaq 0xaa(%rdi), %r15
xorl %esi, %esi
callq 0x1a9e4
leaq 0xca(%rbx), %r14
cmpb $0x0, 0xca(%rbx)
cmoveq %r15, %r14
leaq 0x5c89(%rip), %rdx      # 0x218dc
movq %rsp, %rbx
movl $0x80, %esi
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x51c0
movq %rbx, %rdi
callq 0x1abc9
leaq 0x59f2(%rip), %rdx      # 0x21669
movl $0x80, %esi
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x51c0
movq %rbx, %rdi
callq 0x1abc9
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kobolt[P]curses-collection/racer/racer.c
// Function: car_init
static void car_init(car_t *car, bool far_away)
{
  for (int i = 0; i < CARS_MAX; i++) {
    car->speed = 3 + (random() % 15);
    car->hpos = HPOS_MIN + (random() % (HPOS_MAX - HPOS_MIN));
    if (far_away) {
      car->distance = 1500 + (random() % 2500);
    } else {
      car->distance = 100 + (random() % 4000);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %esi, %esi
movl $0x9c4, %eax            # imm = 0x9C4
movl $0xfa0, %r14d           # imm = 0xFA0
cmovneq %rax, %r14
movl $0x5dc, %eax            # imm = 0x5DC
pushq $0x64
popq %r15
cmovneq %rax, %r15
movq %rdi, %rbx
pushq $0x5
popq %rbp
pushq $0xf
popq %r12
pushq $0x46
popq %r13
subl $0x1, %ebp
jb 0x1bba
callq 0x1110
cqto
idivq %r12
addl $0x3, %edx
movl %edx, 0x8(%rbx)
callq 0x1110
cqto
idivq %r13
addl $-0x23, %edx
movl %edx, 0xc(%rbx)
callq 0x1110
cqto
idivq %r14
addq %r15, %rdx
cvtsi2ss %rdx, %xmm0
movss %xmm0, (%rbx)
jmp 0x1b7d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/motet-a[P]libforks/tests/too_many_clients.c
// Function: main
int main() {
  libforks_ServerConn conn;

  check(libforks_start(&conn) == libforks_OK);

  for (size_t i = 0; i < 19; i++) {
    libforks_Result r = libforks_fork(
      conn,
      NULL, // pid_ptr
      NULL, // socket_fd_ptr
      NULL, // exit_fd_ptr
      child_main
    );
    check(r == libforks_OK);
  }

  errno = ENOENT;
  libforks_Result r = libforks_fork(
    conn,
    NULL, // pid_ptr
    NULL, // socket_fd_ptr
    NULL, // exit_fd_ptr
    child_main
  );
  check(errno == 0);
  check(r == libforks_TOO_MANY_CLIENTS_ERROR);

  check(libforks_stop(conn) == libforks_OK);

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsp, %rdi
callq 0x173e
testl %eax, %eax
jne 0x1386
pushq $0x14
popq %r14
leaq 0xc6(%rip), %rbx        # 0x13dd
decq %r14
je 0x1341
movq (%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x203a
testl %eax, %eax
je 0x1317
leaq 0x1d09(%rip), %rdi      # 0x3042
pushq $0x18
popq %rsi
callq 0x13b2
callq 0x1050
movq %rax, %rbx
movl $0x2, (%rax)
movq (%rsp), %rdi
leaq 0x83(%rip), %r8         # 0x13dd
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x203a
cmpl $0x0, (%rbx)
jne 0x1391
cmpl $-0x7, %eax
jne 0x139c
movq (%rsp), %rdi
callq 0x21de
testl %eax, %eax
jne 0x13a7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1c77(%rip), %rdi      # 0x3004
pushq $0xe
jmp 0x133b
leaq 0x1cbb(%rip), %rdi      # 0x3053
pushq $0x23
jmp 0x133b
leaq 0x1cbb(%rip), %rdi      # 0x305e
pushq $0x24
jmp 0x133b
leaq 0x1cd5(%rip), %rdi      # 0x3083
pushq $0x26
jmp 0x133b
// File: /workspace/github_c_makefile_star2_O2/stv0g[P]c11-queues/mpmc_test.c
// Function: thread_func
int thread_func(void *ctx)
{
	struct mpmc_queue *q = (struct mpmc_queue *) ctx;

	srand((unsigned) time(0) + thread_get_id());
	size_t pause = rand() % 1000;

	/* Wait for global start signal */
	while (g_start == 0)
		thrd_yield();

	/* Wait for a random time */
	for (size_t i = 0; i != pause; i += 1)
		nop();

	for (int iter = 0; iter != iter_count; ++iter) {
		for (size_t i = 0; i != batch_size; i += 1) {
			void *ptr = (void *) i;
			while (!mpmc_queue_push(q, ptr))
				thrd_yield(); // queue full, let other threads proceed
		}

		for (size_t i = 0; i != batch_size; i += 1) {
			void *ptr;
			while (!mpmc_queue_pull(q, &ptr))
				thrd_yield(); // queue empty, let other threads proceed
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %edi, %edi
callq 0x1090
leal -0x1(%rax), %edi
callq 0x1080
callq 0x10f0
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
movl %edx, %ebp
cmpl $0x0, 0x2e60(%rip)      # 0x4094
jne 0x123d
callq 0x1070
jmp 0x122d
movslq %ebp, %rax
subq $0x1, %rax
jb 0x124a
pause
jmp 0x1240
xorl %r12d, %r12d
leaq 0x8(%rsp), %r14
cmpl $0x1e8480, %r12d        # imm = 0x1E8480
je 0x12a8
xorl %r15d, %r15d
cmpq $0xa, %r15
jne 0x126b
jmp 0x127f
callq 0x1070
movq %rbx, %rdi
movq %r15, %rsi
callq 0x14f9
testl %eax, %eax
je 0x1266
incq %r15
jmp 0x125e
xorl %r15d, %r15d
cmpq $0xa, %r15
jne 0x128f
jmp 0x12a3
callq 0x1070
movq %rbx, %rdi
movq %r14, %rsi
callq 0x153c
testl %eax, %eax
je 0x128a
incq %r15
jmp 0x1282
incl %r12d
jmp 0x1252
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stv0g[P]c11-queues/mpmc_test.c
// Function: main
int main()
{
	struct mpmc_queue queue;
	thrd_t threads[thread_count];
	int ret;
	
	mpmc_queue_init(&queue, queue_size, &memtype_heap);

	for (int i = 0; i != thread_count; ++i)
		thrd_create(&threads[i], thread_func, &queue);

	sleep(1);
	
	long long starttime, endtime;
	struct timespec start, end;

	if(clock_gettime(CLOCK_REALTIME, &start))
		return -1;

	g_start = 1;

	for (int i = 0; i != thread_count; ++i)
		thrd_join(threads[i], NULL);

	if(clock_gettime(CLOCK_REALTIME, &end))
		return -1;
	
	starttime = start.tv_sec*1000000000LL + start.tv_nsec;
	endtime = end.tv_sec*1000000000LL + end.tv_nsec;
	printf("cycles/op = %lld\n", (endtime - starttime) / (batch_size * iter_count * 2 * thread_count));
	
	size_t used = mpmc_queue_available(&queue);
	if (used > 0)
		printf("%zu slots in use? There is something wrong with the test\n", used);
	
	ret = mpmc_queue_destroy(&queue);
	if (ret)
		printf("Failed to destroy queue: %d", ret);
	
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rsp, %r15
leaq 0x2ab1(%rip), %rdx      # 0x3d80
leaq 0x40(%rsp), %rbx
movl $0x100000, %esi         # imm = 0x100000
movq %rbx, %rdi
callq 0x13f0
xorl %r12d, %r12d
leaq -0xeb(%rip), %r14       # 0x1200
cmpq $0x20, %r12
je 0x130c
leaq (%rsp,%r12), %rdi
addq $0x20, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x10c0
addq $0x8, %r12
jmp 0x12eb
pushq $0x1
popq %rdi
callq 0x10e0
leaq 0x10(%rsp), %rsi
xorl %edi, %edi
callq 0x1040
pushq $-0x1
popq %rbx
testl %eax, %eax
jne 0x13db
movl $0x1, 0x2d5f(%rip)      # 0x4094
xorl %r12d, %r12d
movq %rsp, %r14
cmpq $0x4, %r12
je 0x1353
movq 0x20(%rsp,%r12,8), %rdi
movq %r14, %rsi
callq 0x10d0
incq %r12
jmp 0x133b
movq %rsp, %rsi
xorl %edi, %edi
callq 0x1040
testl %eax, %eax
jne 0x13db
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
subq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rax
imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00
addq %rcx, %rax
xorl %ebx, %ebx
movl $0x9896800, %ecx        # imm = 0x9896800
xorl %edx, %edx
divq %rcx
leaq 0xc97(%rip), %rdi       # 0x2028
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
leaq 0x40(%rsp), %rdi
callq 0x14e7
testq %rax, %rax
je 0x13bb
leaq 0xc89(%rip), %rdi       # 0x203a
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
leaq 0x40(%rsp), %rdi
callq 0x14cb
testl %eax, %eax
je 0x13db
leaq 0xca4(%rip), %rdi       # 0x2074
xorl %ebx, %ebx
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %r15, %rsp
movl %ebx, %eax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/callbacks.c
// Function: ErrorCallback
static void ErrorCallback(int ec, const char* descr)
    {
    BEGIN(Error);
    lua_pushinteger(L, ec); /* @@ farne un enum? */ 
    lua_pushstring(L, descr);
    EXEC(2);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebp
movq 0x15b17(%rip), %r15     # 0x1bfd8
movq (%r15), %rdi
callq 0x5080
movl %eax, %ebx
movq (%r15), %rdi
movslq 0x15eeb(%rip), %rdx     # 0x1c3c0
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
movq (%r15), %rdi
cmpl $0x6, %eax
jne 0x6525
movslq %ebp, %rsi
callq 0x5310
movq (%r15), %rdi
movq %r14, %rsi
callq 0x5690
movq (%r15), %rdi
pushq $0x2
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5730
movq (%r15), %rdi
testl %eax, %eax
je 0x6547
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5580
leaq 0xbd28(%rip), %rsi      # 0x12254
leaq 0xbd3b(%rip), %rdx      # 0x1226e
pushq $0x4a
popq %rcx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x55b0
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/callbacks.c
// Function: MonitorCallback
static void MonitorCallback(GLFWmonitor *monitor, int event)
    {
    BEGIN(Monitor);
    lua_pushinteger(L, MonitorId(monitor));
    lua_pushstring(L, event==GLFW_CONNECTED ? "connected" : "disconnected");
    EXEC(2);
    /* always call the default callback: */
    monitorCallback(monitor, event);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x14ba1(%rip), %r13     # 0x1bfd8
movq (%r13), %rdi
callq 0x5080
movl %eax, %ebp
movq (%r13), %rdi
movslq 0x14f77(%rip), %rdx     # 0x1c3c4
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
movq (%r13), %r15
cmpl $0x6, %eax
jne 0x7480
xorl %edi, %edi
callq 0x5180
pushq $-0x1
popq %r12
testq %rax, %rax
je 0x74ad
cmpq %r14, 0x28(%rax)
je 0x74a9
movq %rax, %rdi
callq 0x51c0
jmp 0x746b
leaq 0xadcd(%rip), %rsi      # 0x12254
leaq 0xade0(%rip), %rdx      # 0x1226e
pushq $0x55
popq %rcx
movq %r15, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x55b0
movslq 0x20(%rax), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x5310
movq (%r13), %rdi
cmpl $0x40001, %ebx          # imm = 0x40001
leaq 0xae16(%rip), %rax      # 0x122df
leaq 0xae0c(%rip), %rsi      # 0x122dc
cmoveq %rax, %rsi
callq 0x5690
movq (%r13), %rdi
pushq $0x2
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5730
movq (%r13), %rdi
testl %eax, %eax
je 0x750a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5580
movl %ebp, %esi
callq 0x50d0
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5770
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/callbacks.c
// Function: JoystickCallback
static void JoystickCallback(int jid, int event)
    {
    BEGIN(Joystick);
    PushJoystick(L, jid);
    lua_pushstring(L, event==GLFW_CONNECTED ? "connected" : "disconnected");
    EXEC(2);
   /* always call the default callback: */
    joystickCallback(jid, event);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movl %edi, %r14d
movq 0x14a9b(%rip), %r15     # 0x1bfd8
movq (%r15), %rdi
callq 0x5080
movl %eax, %ebx
movq (%r15), %rdi
movslq 0x14e77(%rip), %rdx     # 0x1c3c8
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
movq (%r15), %rdi
cmpl $0x6, %eax
jne 0x75b9
incl %r14d
movslq %r14d, %rsi
callq 0x5310
movq (%r15), %rdi
cmpl $0x40001, %ebp          # imm = 0x40001
leaq 0xad61(%rip), %rax      # 0x122df
leaq 0xad57(%rip), %rsi      # 0x122dc
cmoveq %rax, %rsi
callq 0x5690
movq (%r15), %rdi
pushq $0x2
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5730
movq (%r15), %rdi
testl %eax, %eax
je 0x75db
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5580
leaq 0xac94(%rip), %rsi      # 0x12254
leaq 0xaca7(%rip), %rdx      # 0x1226e
pushq $0x69
popq %rcx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x55b0
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/callbacks.c
// Function: WindowPosCallback
static void WindowPosCallback(GLFWwindow *window, int xpos, int ypos)
    {
    BEGIN(WindowPos);
    lua_pushinteger(L, xpos);
    lua_pushinteger(L, ypos);
    EXEC(2);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movq 0x15a69(%rip), %r12     # 0x1bfd8
movq (%r12), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x15a67(%rip), %rax     # 0x1bfe8
movq %r15, %rdi
callq *0x150(%rax)
movq %rax, %r15
movl %r15d, %edi
callq 0x5430
testq %rax, %rax
je 0x6600
movq (%r12), %rdi
movslq 0x34(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x6600
movq (%r12), %rdi
movslq %r15d, %rsi
callq 0x5310
movq (%r12), %rdi
movslq %r14d, %rsi
callq 0x5310
movq (%r12), %rdi
movslq %ebp, %rsi
callq 0x5310
movq (%r12), %rdi
pushq $0x3
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5730
movq (%r12), %rdi
testl %eax, %eax
je 0x6626
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5580
movq (%r12), %rdi
leaq 0xbc49(%rip), %rsi      # 0x12254
leaq 0xbc5c(%rip), %rdx      # 0x1226e
movl $0xab, %ecx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x55b0
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/callbacks.c
// Function: WindowSizeCallback
static void WindowSizeCallback(GLFWwindow *window, int width, int height)
    {
    BEGIN(WindowSize);
    lua_pushinteger(L, width);
    lua_pushinteger(L, height);
    EXEC(2);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movq 0x1598c(%rip), %r12     # 0x1bfd8
movq (%r12), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x1598a(%rip), %rax     # 0x1bfe8
movq %r15, %rdi
callq *0x150(%rax)
movq %rax, %r15
movl %r15d, %edi
callq 0x5430
testq %rax, %rax
je 0x66dd
movq (%r12), %rdi
movslq 0x38(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x66dd
movq (%r12), %rdi
movslq %r15d, %rsi
callq 0x5310
movq (%r12), %rdi
movslq %r14d, %rsi
callq 0x5310
movq (%r12), %rdi
movslq %ebp, %rsi
callq 0x5310
movq (%r12), %rdi
pushq $0x3
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5730
movq (%r12), %rdi
testl %eax, %eax
je 0x6703
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5580
movq (%r12), %rdi
leaq 0xbb6c(%rip), %rsi      # 0x12254
leaq 0xbb7f(%rip), %rdx      # 0x1226e
movl $0xb3, %ecx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x55b0
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/callbacks.c
// Function: WindowContentScaleCallback
static void WindowContentScaleCallback(GLFWwindow *window, float xscale, float yscale)
    {
    BEGIN(WindowContentScale);
    lua_pushnumber(L, xscale);
    lua_pushnumber(L, yscale);
    EXEC(2);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x8(%rsp)
movq %rdi, %r14
movq 0x154ea(%rip), %r15     # 0x1bfd8
movq (%r15), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x154e9(%rip), %rax     # 0x1bfe8
movq %r14, %rdi
callq *0x150(%rax)
movq %rax, %r14
movl %r14d, %edi
callq 0x5430
testq %rax, %rax
je 0x6b7f
movq (%r15), %rdi
movslq 0x50(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x6b7f
movq (%r15), %rdi
movslq %r14d, %rsi
callq 0x5310
movq (%r15), %rdi
cvtss2sd 0x8(%rsp), %xmm0
callq 0x5460
movq (%r15), %rdi
cvtss2sd 0xc(%rsp), %xmm0
callq 0x5460
movq (%r15), %rdi
pushq $0x3
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5730
movq (%r15), %rdi
testl %eax, %eax
je 0x6ba5
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x5580
movq (%r15), %rdi
leaq 0xb6cb(%rip), %rsi      # 0x12254
leaq 0xb6de(%rip), %rdx      # 0x1226e
movl $0xdc, %ecx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
movl %ebx, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/callbacks.c
// Function: FramebufferSizeCallback
static void FramebufferSizeCallback(GLFWwindow *window, int width, int height)
    {
    BEGIN(FramebufferSize);
    lua_pushinteger(L, width);
    lua_pushinteger(L, height);
    EXEC(2);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movq 0x1540c(%rip), %r12     # 0x1bfd8
movq (%r12), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x1540a(%rip), %rax     # 0x1bfe8
movq %r15, %rdi
callq *0x150(%rax)
movq %rax, %r15
movl %r15d, %edi
callq 0x5430
testq %rax, %rax
je 0x6c5d
movq (%r12), %rdi
movslq 0x54(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x6c5d
movq (%r12), %rdi
movslq %r15d, %rsi
callq 0x5310
movq (%r12), %rdi
movslq %r14d, %rsi
callq 0x5310
movq (%r12), %rdi
movslq %ebp, %rsi
callq 0x5310
movq (%r12), %rdi
pushq $0x3
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5730
movq (%r12), %rdi
testl %eax, %eax
je 0x6c83
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5580
movq (%r12), %rdi
leaq 0xb5ec(%rip), %rsi      # 0x12254
leaq 0xb5ff(%rip), %rdx      # 0x1226e
movl $0xe4, %ecx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x55b0
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/callbacks.c
// Function: KeyCallback
static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, int mods)
    {
    int n = 3;
    BEGIN(Key);
    pushkey(L, key);
    lua_pushinteger(L, scancode);
    pushaction(L, action);
    n += PushMods(L, mods);
    EXEC(n);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r13
movq 0x15325(%rip), %rbx     # 0x1bfd8
movq (%rbx), %rdi
callq 0x5080
movl %eax, 0x4(%rsp)
movq 0x15322(%rip), %rax     # 0x1bfe8
movq %r13, %rdi
callq *0x150(%rax)
movq %rax, %r13
movl %r13d, %edi
callq 0x5430
testq %rax, %rax
je 0x6d63
movq (%rbx), %rdi
movslq 0x58(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x6d63
movq (%rbx), %rdi
movslq %r13d, %rsi
callq 0x5310
movq (%rbx), %rdi
pushq $0x2
popq %rsi
movl %r12d, %edx
callq 0x55e0
movq (%rbx), %rdi
movslq %r15d, %rsi
callq 0x5310
movq (%rbx), %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x55e0
movq (%rbx), %rdi
movl %ebp, %esi
callq 0x6da5
movq (%rbx), %rdi
pushq $0x8
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5730
movq (%rbx), %rdi
testl %eax, %eax
je 0x6d8e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5580
movq (%rbx), %rdi
leaq 0xb4e7(%rip), %rsi      # 0x12254
leaq 0xb4fa(%rip), %rdx      # 0x1226e
movl $0xef, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x55b0
movl 0x4(%rsp), %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/callbacks.c
// Function: PushMods
static int PushMods(lua_State *L, int mods)
    {
    lua_pushboolean(L, mods & GLFW_MOD_SHIFT);
    lua_pushboolean(L, mods & GLFW_MOD_CONTROL);
    lua_pushboolean(L, mods & GLFW_MOD_ALT);
    lua_pushboolean(L, mods & GLFW_MOD_SUPER);
    return 4;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
andl $0x1, %esi
callq 0x5480
movl %ebx, %esi
andl $0x2, %esi
movq %r14, %rdi
callq 0x5480
movl %ebx, %esi
andl $0x4, %esi
movq %r14, %rdi
callq 0x5480
andl $0x8, %ebx
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5480
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/callbacks.c
// Function: CharModsCallback
static void CharModsCallback(GLFWwindow *window, unsigned int codepoint, int mods)
    {
    int n = 1;
    BEGIN(CharMods);
    lua_pushinteger(L, codepoint);
    n += PushMods(L, mods);
    EXEC(n);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movq 0x15112(%rip), %r12     # 0x1bfd8
movq (%r12), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x15110(%rip), %rax     # 0x1bfe8
movq %r15, %rdi
callq *0x150(%rax)
movq %rax, %r15
movl %r15d, %edi
callq 0x5430
testq %rax, %rax
je 0x6f56
movq (%r12), %rdi
movslq 0x60(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x6f56
movq (%r12), %rdi
movslq %r15d, %rsi
callq 0x5310
movq (%r12), %rdi
movl %r14d, %esi
callq 0x5310
movq (%r12), %rdi
movl %ebp, %esi
callq 0x6da5
movq (%r12), %rdi
pushq $0x6
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5730
movq (%r12), %rdi
testl %eax, %eax
je 0x6f7c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5580
movq (%r12), %rdi
leaq 0xb2f3(%rip), %rsi      # 0x12254
leaq 0xb306(%rip), %rdx      # 0x1226e
movl $0x107, %ecx            # imm = 0x107
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x55b0
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/callbacks.c
// Function: MouseButtonCallback
static void MouseButtonCallback(GLFWwindow *window, int button, int action, int mods)
    {
    int n = 2;
    BEGIN(MouseButton);
    pushbutton(L, button);
    pushaction(L, action);
    n += PushMods(L, mods);
    EXEC(n);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r12
movq 0x15030(%rip), %r13     # 0x1bfd8
movq (%r13), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x1502e(%rip), %rax     # 0x1bfe8
movq %r12, %rdi
callq *0x150(%rax)
movq %rax, %r12
movl %r12d, %edi
callq 0x5430
testq %rax, %rax
je 0x704f
movq (%r13), %rdi
movslq 0x64(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x704f
movq (%r13), %rdi
movslq %r12d, %rsi
callq 0x5310
movq (%r13), %rdi
pushq $0x1
popq %rsi
movl %r15d, %edx
callq 0x55e0
movq (%r13), %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x55e0
movq (%r13), %rdi
movl %ebp, %esi
callq 0x6da5
movq (%r13), %rdi
pushq $0x7
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5730
movq (%r13), %rdi
testl %eax, %eax
je 0x707b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5580
movq (%r13), %rdi
leaq 0xb1fa(%rip), %rsi      # 0x12254
leaq 0xb20d(%rip), %rdx      # 0x1226e
movl $0x113, %ecx            # imm = 0x113
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x55b0
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonglfw/src/callbacks.c
// Function: CursorPosCallback
static void CursorPosCallback(GLFWwindow *window, double xpos, double ypos)
    {
    BEGIN(CursorPos);
    lua_pushnumber(L, xpos);
    lua_pushnumber(L, ypos);
    EXEC(2);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
movq %rdi, %r14
movq 0x14f2a(%rip), %r15     # 0x1bfd8
movq (%r15), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x14f29(%rip), %rax     # 0x1bfe8
movq %r14, %rdi
callq *0x150(%rax)
movq %rax, %r14
movl %r14d, %edi
callq 0x5430
testq %rax, %rax
je 0x713e
movq (%r15), %rdi
movslq 0x68(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x713e
movq (%r15), %rdi
movslq %r14d, %rsi
callq 0x5310
movq (%r15), %rdi
movsd (%rsp), %xmm0
callq 0x5460
movq (%r15), %rdi
movsd 0x8(%rsp), %xmm0
callq 0x5460
movq (%r15), %rdi
pushq $0x3
popq %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5730
movq (%r15), %rdi
testl %eax, %eax
je 0x7164
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x5580
movq (%r15), %rdi
leaq 0xb10c(%rip), %rsi      # 0x12254
leaq 0xb11f(%rip), %rdx      # 0x1226e
movl $0x11f, %ecx            # imm = 0x11F
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
movl %ebx, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x50d0