LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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, 0xf6dc(%rip)      # 0x2a310
movq %rsi, 0x11315(%rip)     # 0x2bf50
movb $0x0, 0x11316(%rip)     # 0x2bf58
xorl %ebx, %ebx
movq %rbx, 0x11315(%rip)     # 0x2bf60
movq %rbx, 0x11316(%rip)     # 0x2bf68
movq %rbx, 0x11317(%rip)     # 0x2bf70
movq %rsp, %r14
movq %r14, %rdi
callq 0x5260
movq %r14, %rdi
movl $0x1, %esi
callq 0x5330
leaq 0x11300(%rip), %rdi     # 0x2bf78
leaq 0x24(%rip), %rdx        # 0x1aca3
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x53d0
testl %eax, %eax
js 0x1ac97
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
callq 0x55c0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x1ac8d
// File: /workspace/github_c_makefile_star2_O1/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 0xed6e(%rip), %rax      # 0x29fc0
movq (%rax), %rbx
callq 0xeb2f
leaq 0x81ed(%rip), %rsi      # 0x2344e
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
leaq 0xfa33(%rip), %rax      # 0x2aca8
movq (%rax), %rbx
testq %rbx, %rbx
je 0x1b296
callq 0xeb2f
leaq 0x81c5(%rip), %rsi      # 0x2344e
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x52c0
movl 0xf074(%rip), %edi      # 0x2a310
testl %edi, %edi
js 0x1b2a5
callq 0x5230
movl $0xffffffff, 0xf061(%rip) # imm = 0xFFFFFFFF
leaq 0xf99a(%rip), %rbx      # 0x2ac50
movq %rbx, %rdi
callq 0x5560
movb $0x1, 0x10c93(%rip)     # 0x2bf58
leaq 0xf9ac(%rip), %rdi      # 0x2ac78
callq 0x5280
movq %rbx, %rdi
popq %rbx
jmp 0x5340
// File: /workspace/github_c_makefile_star2_O1/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 0x1b322
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x1b30c
movq (%r14), %r15
movq 0x8(%r14), %rdi
callq 0x5040
movq %r14, %rdi
callq 0x5040
movq %r15, %r14
testq %r15, %r15
jne 0x1b2f0
movq 0x8(%rbx), %rdi
callq 0x5040
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x5040
retq
// File: /workspace/github_c_makefile_star2_O1/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, %r12d
movq %rdi, %r13
movq 0x10c29(%rip), %rbp     # 0x2bf78
callq 0x5400
movq %rbp, %rdi
movq %rax, %rsi
callq 0x53f0
movl $0xfffffffb, %ebp       # imm = 0xFFFFFFFB
testl %eax, %eax
jne 0x1b3b5
leaq 0xf8e1(%rip), %rdi      # 0x2ac50
callq 0x5560
movq %r13, %rdi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x1b572
movl %eax, %ebp
leaq 0xf8bc(%rip), %rdi      # 0x2ac50
callq 0x5340
cmpl $-0x4, %ebp
sete %cl
movq 0x10bea(%rip), %rax     # 0x2bf90
testq %rax, %rax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1b3b5
callq *%rax
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_O1/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
movl $0x2, %esi
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x1b32e
testl %eax, %eax
setne %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0x1b40b
movq (%rbx), %rdi
cmpl $0x0, (%rdi)
jle 0x1b40b
cmpq $0x0, 0x10(%rdi)
jne 0x1b40b
callq 0x1b2da
movq $0x0, (%rbx)
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x1b32e
testl %eax, %eax
setne %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0x1b451
movq (%rbx), %rdi
cmpl $0x0, (%rdi)
jle 0x1b451
cmpq $0x0, 0x10(%rdi)
jne 0x1b451
callq 0x1b2da
movq $0x0, (%rbx)
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x2, %esi
movq %rbx, %r8
callq 0x1b32e
testl %eax, %eax
setne %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0x1b496
movq (%rbx), %rdi
cmpl $0x0, (%rdi)
jle 0x1b496
cmpq $0x0, 0x10(%rdi)
jne 0x1b496
callq 0x1b2da
movq $0x0, (%rbx)
movl $0xfffffffa, %eax       # imm = 0xFFFFFFFA
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x10aa0(%rip), %rbx     # 0x2bf78
callq 0x5400
movq %rbx, %rdi
movq %rax, %rsi
callq 0x53f0
movl $0xfffffffb, %ebx       # imm = 0xFFFFFFFB
testl %eax, %eax
jne 0x1b567
leaq 0xf758(%rip), %rdi      # 0x2ac50
callq 0x5560
movl $0x8, %ebp
leaq 0x7f54(%rip), %r14      # 0x2345d
xorl %ebx, %ebx
movl $0x3e8, %r8d            # imm = 0x3E8
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x1b572
testl %eax, %eax
je 0x1b52c
decl %ebp
jne 0x1b509
movl %eax, %ebx
leaq 0xf71d(%rip), %rdi      # 0x2ac50
callq 0x5340
testl %ebx, %ebx
jne 0x1b567
movq %rsp, %r14
movq $0x1, (%r14)
movq $0x0, 0x8(%r14)
movq %r14, %rdi
movq %r14, %rsi
callq 0x51d0
testl %eax, %eax
jns 0x1b567
callq 0x5070
cmpl $0x4, (%rax)
je 0x1b54e
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x1b894
xorl %eax, %eax
cmpl $0x0, (%rdi)
jle 0x1b84e
retq
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x1b894
subq $0x18, %rsp
movb (%rax), %sil
testb %sil, %sil
je 0x1b89a
xorl %edx, %edx
leaq 0x7c05(%rip), %rcx      # 0x23471
leaq 0x7bf3(%rip), %rdi      # 0x23466
cmpq $0xb, %rdx
je 0x1b8a1
cmpb (%rdx,%rdi), %sil
jne 0x1b8a6
movb 0x1(%rax,%rdx), %sil
incq %rdx
testb %sil, %sil
jne 0x1b873
addq %rdx, %rdi
movq %rdi, %rcx
jmp 0x1b8a1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
leaq 0x7bc5(%rip), %rcx      # 0x23466
cmpb $0x0, (%rcx)
je 0x1b8b0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
retq
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
callq 0x1bcbc
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
js 0x1b8ab
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x1bcf4
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
js 0x1b8ab
movl 0xc(%rsp), %eax
jmp 0x1b8ab
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x10, %edi
callq 0x5360
movq %rax, %r14
movq %rbx, %rdi
callq 0x5520
movq %rax, 0x8(%r14)
movq 0x102c9(%rip), %rax     # 0x2bf70
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_O1/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
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x1bcea
movl $0x3a, %esi
callq 0x5190
movq %rax, (%r14)
testq %rax, %rax
je 0x1bcea
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_O1/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
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpq $0x0, (%rdi)
je 0x1bd56
movl %ecx, %r12d
movl %edx, %ebp
movq %rsi, %rbx
callq 0x1bdca
testq %rax, %rax
je 0x1bd56
movq %rax, %r14
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
movl %ebp, %edx
testl %r12d, %r12d
je 0x1bd40
callq 0x54a0
jmp 0x1bd45
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_O1/Carton32[P]quectel-CM/at_tok.c
// Function: at_tok_nextbool
int at_tok_nextbool(char **p_cur, char *p_out)
{
    int ret;
    int result;

    ret = at_tok_nextint(p_cur, &result);

    if (ret < 0) {
        return -1;
    }

    // booleans should be 0 or 1
    if (!(result == 0 || result == 1)) {
        return -1;
    }

    if (p_out != NULL) {
        *p_out = (char)result;
    }

    return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
leaq 0xc(%rsp), %rsi
movl $0xa, %edx
xorl %ecx, %ecx
callq 0x1bcfd
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testl %eax, %eax
js 0x1bda6
movl 0xc(%rsp), %edx
cmpl $0x1, %edx
ja 0x1bda6
testq %rbx, %rbx
je 0x1bda4
movb %dl, (%rbx)
movl %eax, %ecx
movl %ecx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x1be05
movb (%r14), %bpl
testb %bpl, %bpl
je 0x1be05
callq 0x5580
incq %r14
movq (%rax), %rcx
movsbq %bpl, %rdx
testb $0x20, 0x1(%rcx,%rdx,2)
je 0x1be05
movq %r14, (%rbx)
movb (%r14), %bpl
incq %r14
testb %bpl, %bpl
jne 0x1bde9
movq (%rbx), %rax
testq %rax, %rax
je 0x1be44
cmpb $0x22, (%rax)
jne 0x1be48
incq %rax
movq %rax, (%rbx)
leaq 0x71e9(%rip), %rsi      # 0x23008
movq %rbx, %rdi
callq 0x5380
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x1be5e
incq %rcx
movzbl -0x1(%rcx), %edx
testl %edx, %edx
je 0x1be5e
cmpl $0x2c, %edx
je 0x1be5b
movq %rcx, (%rbx)
jmp 0x1be2f
xorl %eax, %eax
jmp 0x1be5e
leaq 0x7759(%rip), %rsi      # 0x235a8
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x5380
movq %rcx, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1be90
movzbl (%rdi), %ecx
cmpl $0x2c, %ecx
je 0x1be89
testl %ecx, %ecx
jne 0x1be8b
jmp 0x1be90
incl %eax
incq %rdi
jmp 0x1be7b
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
subq $0x98, %rsp
movl %ecx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x713d(%rip), %rdi      # 0x23605
movl $0x1, %esi
callq 0x5450
testl %eax, %eax
je 0x1c51d
leaq 0x7206(%rip), %rdx      # 0x236e3
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 0x1c2a5
leaq 0x71ec(%rip), %rdx      # 0x236f5
movl $0x80, %esi
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x51c0
jmp 0x1c593
leaq 0x70ea(%rip), %rdx      # 0x2360e
leaq 0x10(%rsp), %r15
movl $0x80, %esi
movq %r15, %rdi
movl $0x6, %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0x51c0
movq %r15, %rdi
callq 0x1c2a5
movq %rbx, (%rsp)
leaq 0x70d7(%rip), %rdx      # 0x2362a
movl $0x80, %esi
movq %r15, %rdi
movl $0x6, %ecx
movq %r14, %r8
movl %ebp, %r9d
xorl %eax, %eax
callq 0x51c0
movq %r15, %rdi
callq 0x1c2a5
leaq 0x7147(%rip), %rdx      # 0x236c3
movl $0x80, %esi
movq %r15, %rdi
movl $0x6, %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0x51c0
leaq 0x10(%rsp), %rdi
callq 0x1c2a5
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movzwl (%rdi,%rax,2), %ecx
rolw $0x8, %cx
movw %cx, (%rsp,%rax,2)
incq %rax
cmpq $0x8, %rax
jne 0x1d07a
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 0xf329(%rip), %rdi      # 0x2c3f0
leaq 0x67c7(%rip), %rdx      # 0x23895
movl $0x40, %esi
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_O1/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 0x1d4c6
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %r14
movq 0xcc16(%rip), %r13      # 0x29fc0
movq (%r13), %rbx
callq 0xeb2f
leaq 0x1b90(%rip), %rsi      # 0x1ef4a
movq %rbx, %rdi
movq %rax, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x52c0
leaq 0xd8d7(%rip), %rbp      # 0x2aca8
movq (%rbp), %rbx
testq %rbx, %rbx
je 0x1d3f6
callq 0xeb2f
leaq 0x1b64(%rip), %rsi      # 0x1ef4a
movq %rbx, %rdi
movq %rax, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x52c0
leaq 0x4d61(%rip), %rsi      # 0x2215e
movq %r14, %rdi
callq 0x5460
movq %rax, %rbx
movq %r14, %rdi
callq 0x5040
testq %rbx, %rbx
je 0x1d4b5
movb $0x0, 0xfe(%rsp)
movq %rsp, %r14
movq %r14, %rdi
movl $0xfe, %esi
movq %rbx, %rdx
callq 0x5270
testq %rax, %rax
je 0x1d4ad
leaq 0x1b0a(%rip), %r15      # 0x1ef4a
movq %r14, %rdi
callq 0x5160
cmpq $0x2, %rax
jb 0x1d45b
cmpb $0xa, -0x1(%rax,%r14)
jne 0x1d45b
movb $0x0, -0x1(%rsp,%rax)
movq (%r13), %r12
callq 0xeb2f
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x52c0
movq (%rbp), %r12
testq %r12, %r12
je 0x1d498
callq 0xeb2f
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x52c0
movq %r14, %rdi
movl $0xfe, %esi
movq %rbx, %rdx
callq 0x5270
testq %rax, %rax
jne 0x1d440
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_O1/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 0x1c0bc
leaq 0xca(%rbx), %r14
cmpb $0x0, 0xca(%rbx)
cmoveq %r15, %r14
leaq 0x62df(%rip), %rdx      # 0x23867
movq %rsp, %rbx
movl $0x80, %esi
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x51c0
movq %rbx, %rdi
callq 0x1c2a5
leaq 0x6048(%rip), %rdx      # 0x235f4
movl $0x80, %esi
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x51c0
movq %rbx, %rdi
callq 0x1c2a5
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1793
testl %eax, %eax
jne 0x13aa
movl $0x13, %r14d
leaq 0xe0(%rip), %rbx        # 0x1419
movq (%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x21e7
testl %eax, %eax
jne 0x1399
decq %r14
jne 0x1339
callq 0x1050
movq %rax, %rbx
movl $0x2, (%rax)
movq (%rsp), %rdi
leaq 0xac(%rip), %r8         # 0x1419
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x21e7
cmpl $0x0, (%rbx)
jne 0x13bb
cmpl $-0x7, %eax
jne 0x13cc
movq (%rsp), %rdi
callq 0x23a2
testl %eax, %eax
jne 0x13dd
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1ca2(%rip), %rdi      # 0x3042
movl $0x18, %esi
callq 0x13ee
leaq 0x1c53(%rip), %rdi      # 0x3004
movl $0xe, %esi
callq 0x13ee
leaq 0x1c91(%rip), %rdi      # 0x3053
movl $0x23, %esi
callq 0x13ee
leaq 0x1c8b(%rip), %rdi      # 0x305e
movl $0x24, %esi
callq 0x13ee
leaq 0x1c9f(%rip), %rdi      # 0x3083
movl $0x26, %esi
callq 0x13ee
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %edi, %edi
callq 0x1090
leal -0x1(%rax), %edi
callq 0x1080
callq 0x10f0
movslq %eax, %r14
imulq $0x10624dd3, %r14, %rax # imm = 0x10624DD3
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rax
addl %ecx, %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
subl %eax, %r14d
cmpl $0x0, 0x2e4a(%rip)      # 0x4094
jne 0x1253
callq 0x1070
jmp 0x1243
testl %r14d, %r14d
je 0x1262
movslq %r14d, %rax
pause
decq %rax
jne 0x125b
xorl %r12d, %r12d
movq %rsp, %r14
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1517
testl %eax, %eax
jne 0x1281
callq 0x1070
jmp 0x126b
incq %r15
cmpq $0xa, %r15
jne 0x126b
xorl %r15d, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x155f
testl %eax, %eax
jne 0x12a3
callq 0x1070
jmp 0x128d
incq %r15
cmpq $0xa, %r15
jne 0x128d
incl %r12d
cmpl $0x1e8480, %r12d        # imm = 0x1E8480
jne 0x1268
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2aa2(%rip), %rdx      # 0x3d80
leaq 0x40(%rsp), %rbx
movl $0x100000, %esi         # imm = 0x100000
movq %rbx, %rdi
callq 0x140c
xorl %r12d, %r12d
leaq -0xf6(%rip), %r14       # 0x1204
leaq (%rsp,%r12), %rdi
addq $0x20, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x10c0
addq $0x8, %r12
cmpq $0x20, %r12
jne 0x12fa
movl $0x1, %edi
callq 0x10e0
leaq 0x10(%rsp), %rsi
xorl %edi, %edi
callq 0x1040
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x13f5
movl $0x1, 0x2d4e(%rip)      # 0x4094
xorl %r12d, %r12d
movq %rsp, %r14
movq 0x20(%rsp,%r12,8), %rdi
movq %r14, %rsi
callq 0x10d0
incq %r12
cmpq $0x4, %r12
jne 0x134c
movq %rsp, %rsi
xorl %edi, %edi
callq 0x1040
testl %eax, %eax
jne 0x13f5
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
subq 0x10(%rsp), %rcx
subq 0x18(%rsp), %rax
imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00
addq %rcx, %rax
movabsq $-0x29406b2a1a85bd43, %rcx # imm = 0xD6BF94D5E57A42BD
mulq %rcx
shrq $0x1b, %rdx
leaq 0xc7f(%rip), %rdi       # 0x2028
xorl %ebx, %ebx
movq %rdx, %rsi
xorl %eax, %eax
callq 0x1060
leaq 0x40(%rsp), %rdi
callq 0x1505
testq %rax, %rax
je 0x13d5
leaq 0xc6f(%rip), %rdi       # 0x203a
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
leaq 0x40(%rsp), %rdi
callq 0x14e9
testl %eax, %eax
je 0x13f5
leaq 0xc8a(%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
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/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 0x15a8f(%rip), %r15     # 0x1bfd8
movq (%r15), %rdi
callq 0x5080
movl %eax, %ebx
movq (%r15), %rdi
movslq 0x15e4b(%rip), %rdx     # 0x1c3a8
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
movq (%r15), %rdi
cmpl $0x6, %eax
jne 0x65af
movslq %ebp, %rsi
callq 0x5310
movq (%r15), %rdi
movq %r14, %rsi
callq 0x5680
movq (%r15), %rdi
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5710
movq (%r15), %rdi
testl %eax, %eax
je 0x65d3
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5570
leaq 0xcc9e(%rip), %rsi      # 0x13254
leaq 0xccb1(%rip), %rdx      # 0x1326e
movl $0x4a, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x55a0
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O1/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 0x159dd(%rip), %r12     # 0x1bfd8
movq (%r12), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x159db(%rip), %rax     # 0x1bfe8
movq %r15, %rdi
callq *0x150(%rax)
movq %rax, %r15
movl %r15d, %edi
callq 0x5420
testq %rax, %rax
je 0x668e
movq (%r12), %rdi
movslq 0x34(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x668e
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
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5710
movq (%r12), %rdi
testl %eax, %eax
je 0x66b4
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5570
movq (%r12), %rdi
leaq 0xcbbb(%rip), %rsi      # 0x13254
leaq 0xcbce(%rip), %rdx      # 0x1326e
movl $0xab, %ecx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x55a0
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O1/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 0x158fe(%rip), %r12     # 0x1bfd8
movq (%r12), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x158fc(%rip), %rax     # 0x1bfe8
movq %r15, %rdi
callq *0x150(%rax)
movq %rax, %r15
movl %r15d, %edi
callq 0x5420
testq %rax, %rax
je 0x676d
movq (%r12), %rdi
movslq 0x38(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x676d
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
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5710
movq (%r12), %rdi
testl %eax, %eax
je 0x6793
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5570
movq (%r12), %rdi
leaq 0xcadc(%rip), %rsi      # 0x13254
leaq 0xcaef(%rip), %rdx      # 0x1326e
movl $0xb3, %ecx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x55a0
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O1/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 0x15450(%rip), %r15     # 0x1bfd8
movq (%r15), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x1544f(%rip), %rax     # 0x1bfe8
movq %r14, %rdi
callq *0x150(%rax)
movq %rax, %r14
movl %r14d, %edi
callq 0x5420
testq %rax, %rax
je 0x6c21
movq (%r15), %rdi
movslq 0x50(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x6c21
movq (%r15), %rdi
movslq %r14d, %rsi
callq 0x5310
movq (%r15), %rdi
xorps %xmm0, %xmm0
cvtss2sd 0x8(%rsp), %xmm0
callq 0x5450
movq (%r15), %rdi
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
callq 0x5450
movq (%r15), %rdi
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5710
movq (%r15), %rdi
testl %eax, %eax
je 0x6c47
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x5570
movq (%r15), %rdi
leaq 0xc629(%rip), %rsi      # 0x13254
leaq 0xc63c(%rip), %rdx      # 0x1326e
movl $0xdc, %ecx
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
movl %ebx, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O1/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 0x1536a(%rip), %r12     # 0x1bfd8
movq (%r12), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x15368(%rip), %rax     # 0x1bfe8
movq %r15, %rdi
callq *0x150(%rax)
movq %rax, %r15
movl %r15d, %edi
callq 0x5420
testq %rax, %rax
je 0x6d01
movq (%r12), %rdi
movslq 0x54(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x6d01
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
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5710
movq (%r12), %rdi
testl %eax, %eax
je 0x6d27
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5570
movq (%r12), %rdi
leaq 0xc548(%rip), %rsi      # 0x13254
leaq 0xc55b(%rip), %rdx      # 0x1326e
movl $0xe4, %ecx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x55a0
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O1/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 0x15281(%rip), %rbx     # 0x1bfd8
movq (%rbx), %rdi
callq 0x5080
movl %eax, 0x4(%rsp)
movq 0x1527e(%rip), %rax     # 0x1bfe8
movq %r13, %rdi
callq *0x150(%rax)
movq %rax, %r13
movl %r13d, %edi
callq 0x5420
testq %rax, %rax
je 0x6e0b
movq (%rbx), %rdi
movslq 0x58(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x6e0b
movq (%rbx), %rdi
movslq %r13d, %rsi
callq 0x5310
movq (%rbx), %rdi
movl $0x2, %esi
movl %r12d, %edx
callq 0x55d0
movq (%rbx), %rdi
movslq %r15d, %rsi
callq 0x5310
movq (%rbx), %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x55d0
movq (%rbx), %rdi
movl %ebp, %esi
callq 0x6e4d
movq (%rbx), %rdi
movl $0x8, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5710
movq (%rbx), %rdi
testl %eax, %eax
je 0x6e36
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5570
movq (%rbx), %rdi
leaq 0xc43f(%rip), %rsi      # 0x13254
leaq 0xc452(%rip), %rdx      # 0x1326e
movl $0xef, %ecx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x55a0
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_O1/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 0x5470
movl %ebx, %esi
andl $0x2, %esi
movq %r14, %rdi
callq 0x5470
movl %ebx, %esi
andl $0x4, %esi
movq %r14, %rdi
callq 0x5470
andl $0x8, %ebx
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5470
// File: /workspace/github_c_makefile_star2_O1/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 0x15068(%rip), %r12     # 0x1bfd8
movq (%r12), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x15066(%rip), %rax     # 0x1bfe8
movq %r15, %rdi
callq *0x150(%rax)
movq %rax, %r15
movl %r15d, %edi
callq 0x5420
testq %rax, %rax
je 0x7002
movq (%r12), %rdi
movslq 0x60(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x7002
movq (%r12), %rdi
movslq %r15d, %rsi
callq 0x5310
movq (%r12), %rdi
movl %r14d, %esi
callq 0x5310
movq (%r12), %rdi
movl %ebp, %esi
callq 0x6e4d
movq (%r12), %rdi
movl $0x6, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5710
movq (%r12), %rdi
testl %eax, %eax
je 0x7028
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5570
movq (%r12), %rdi
leaq 0xc247(%rip), %rsi      # 0x13254
leaq 0xc25a(%rip), %rdx      # 0x1326e
movl $0x107, %ecx            # imm = 0x107
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x55a0
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O1/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 0x14f84(%rip), %r13     # 0x1bfd8
movq (%r13), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x14f82(%rip), %rax     # 0x1bfe8
movq %r12, %rdi
callq *0x150(%rax)
movq %rax, %r12
movl %r12d, %edi
callq 0x5420
testq %rax, %rax
je 0x7103
movq (%r13), %rdi
movslq 0x64(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x7103
movq (%r13), %rdi
movslq %r12d, %rsi
callq 0x5310
movq (%r13), %rdi
movl $0x1, %esi
movl %r15d, %edx
callq 0x55d0
movq (%r13), %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x55d0
movq (%r13), %rdi
movl %ebp, %esi
callq 0x6e4d
movq (%r13), %rdi
movl $0x7, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5710
movq (%r13), %rdi
testl %eax, %eax
je 0x712f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5570
movq (%r13), %rdi
leaq 0xc146(%rip), %rsi      # 0x13254
leaq 0xc159(%rip), %rdx      # 0x1326e
movl $0x113, %ecx            # imm = 0x113
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x55a0
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_O1/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 0x14e76(%rip), %r15     # 0x1bfd8
movq (%r15), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x14e75(%rip), %rax     # 0x1bfe8
movq %r14, %rdi
callq *0x150(%rax)
movq %rax, %r14
movl %r14d, %edi
callq 0x5420
testq %rax, %rax
je 0x71f4
movq (%r15), %rdi
movslq 0x68(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x71f4
movq (%r15), %rdi
movslq %r14d, %rsi
callq 0x5310
movq (%r15), %rdi
movsd (%rsp), %xmm0
callq 0x5450
movq (%r15), %rdi
movsd 0x8(%rsp), %xmm0
callq 0x5450
movq (%r15), %rdi
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5710
movq (%r15), %rdi
testl %eax, %eax
je 0x721a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x5570
movq (%r15), %rdi
leaq 0xc056(%rip), %rsi      # 0x13254
leaq 0xc069(%rip), %rdx      # 0x1326e
movl $0x11f, %ecx            # imm = 0x11F
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
movl %ebx, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/callbacks.c
// Function: ScrollCallback
static void ScrollCallback(GLFWwindow *window, double xoffset, double yoffset)
    {
    BEGIN(Scroll);
    lua_pushnumber(L, xoffset);
    lua_pushnumber(L, yoffset);
    EXEC(2);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
movq %rdi, %r14
movq 0x14cc3(%rip), %r15     # 0x1bfd8
movq (%r15), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x14cc2(%rip), %rax     # 0x1bfe8
movq %r14, %rdi
callq *0x150(%rax)
movq %rax, %r14
movl %r14d, %edi
callq 0x5420
testq %rax, %rax
je 0x73a7
movq (%r15), %rdi
movslq 0x70(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x73a7
movq (%r15), %rdi
movslq %r14d, %rsi
callq 0x5310
movq (%r15), %rdi
movsd (%rsp), %xmm0
callq 0x5450
movq (%r15), %rdi
movsd 0x8(%rsp), %xmm0
callq 0x5450
movq (%r15), %rdi
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5710
movq (%r15), %rdi
testl %eax, %eax
je 0x73cd
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x5570
movq (%r15), %rdi
leaq 0xbea3(%rip), %rsi      # 0x13254
leaq 0xbeb6(%rip), %rdx      # 0x1326e
movl $0x134, %ecx            # imm = 0x134
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
movl %ebx, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x50d0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/callbacks.c
// Function: DropCallback
static void DropCallback(GLFWwindow *window, int count, const char** paths)
    {
    int i;
    BEGIN(Drop);
    for(i = 0; i<count; i++)
        lua_pushstring(L, paths[i]);
    EXEC(count);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
movq 0x14be1(%rip), %r12     # 0x1bfd8
movq (%r12), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x14bdf(%rip), %rax     # 0x1bfe8
movq %r15, %rdi
callq *0x150(%rax)
movq %rax, %r15
movl %r15d, %edi
callq 0x5420
testq %rax, %rax
je 0x7496
movq (%r12), %rdi
movslq 0x74(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x7496
movq (%r12), %rdi
movslq %r15d, %rsi
callq 0x5310
testl %ebp, %ebp
jle 0x7464
movl %ebp, %r15d
xorl %r13d, %r13d
movq (%r12), %rdi
movq (%r14,%r13,8), %rsi
callq 0x5680
incq %r13
cmpq %r13, %r15
jne 0x744f
movq (%r12), %rdi
incl %ebp
movl %ebp, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5710
movq (%r12), %rdi
testl %eax, %eax
je 0x74c2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5570
movq (%r12), %rdi
leaq 0xbdb3(%rip), %rsi      # 0x13254
leaq 0xbdc6(%rip), %rdx      # 0x1326e
movl $0x140, %ecx            # imm = 0x140
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x55a0
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x50d0