LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x74fb(%rip), %rdi      # 0x2365b
movl $0x1, %esi
callq 0x5450
testl %eax, %eax
je 0x1c1b5
leaq 0x75c4(%rip), %rdx      # 0x23739
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 0x1bf3d
leaq 0x75aa(%rip), %rdx      # 0x2374b
movl $0x80, %esi
movq %r15, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x51c0
jmp 0x1c22b
leaq 0x74a8(%rip), %rdx      # 0x23664
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 0x1bf3d
movq %rbx, (%rsp)
leaq 0x7495(%rip), %rdx      # 0x23680
movl $0x80, %esi
movq %r15, %rdi
movl $0x6, %ecx
movq %r14, %r8
movl %ebp, %r9d
xorl %eax, %eax
callq 0x51c0
movq %r15, %rdi
callq 0x1bf3d
leaq 0x7505(%rip), %rdx      # 0x23719
movl $0x80, %esi
movq %r15, %rdi
movl $0x6, %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0x51c0
leaq 0x10(%rsp), %rdi
callq 0x1bf3d
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movdqu (%rdi), %xmm0
movdqa %xmm0, %xmm1
psllw $0x8, %xmm1
psrlw $0x8, %xmm0
por %xmm1, %xmm0
pextrw $0x0, %xmm0, %ecx
pextrw $0x1, %xmm0, %r8d
pextrw $0x2, %xmm0, %r9d
pextrw $0x3, %xmm0, %r10d
pextrw $0x4, %xmm0, %r11d
pextrw $0x5, %xmm0, %ebx
pextrw $0x6, %xmm0, %r14d
pextrw $0x7, %xmm0, %r15d
subq $0x8, %rsp
leaq 0xf6b8(%rip), %rdi      # 0x2c3f0
leaq 0x6bac(%rip), %rdx      # 0x238eb
movl $0x40, %esi
xorl %eax, %eax
pushq %r15
pushq %r14
pushq %rbx
pushq %r11
pushq %r10
callq 0x51c0
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1d1ba
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %r14
movq 0xcf22(%rip), %r13      # 0x29fc0
movq (%r13), %rbx
callq 0xea3b
leaq 0x1e98(%rip), %rsi      # 0x1ef46
movq %rbx, %rdi
movq %rax, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x52c0
leaq 0xdbe3(%rip), %rbp      # 0x2aca8
movq (%rbp), %rbx
testq %rbx, %rbx
je 0x1d0ea
callq 0xea3b
leaq 0x1e6c(%rip), %rsi      # 0x1ef46
movq %rbx, %rdi
movq %rax, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x52c0
leaq 0x5095(%rip), %rsi      # 0x22186
movq %r14, %rdi
callq 0x5460
movq %rax, %rbx
movq %r14, %rdi
callq 0x5040
testq %rbx, %rbx
je 0x1d1a9
movb $0x0, 0xfe(%rsp)
movq %rsp, %r14
movq %r14, %rdi
movl $0xfe, %esi
movq %rbx, %rdx
callq 0x5270
testq %rax, %rax
je 0x1d1a1
leaq 0x1e12(%rip), %r15      # 0x1ef46
movq %r14, %rdi
callq 0x5160
cmpq $0x2, %rax
jb 0x1d14f
cmpb $0xa, -0x1(%rax,%r14)
jne 0x1d14f
movb $0x0, -0x1(%rsp,%rax)
movq (%r13), %r12
callq 0xea3b
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x52c0
movq (%rbp), %r12
testq %r12, %r12
je 0x1d18c
callq 0xea3b
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 0x1d134
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_O3/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 0x1bd54
leaq 0xca(%rbx), %r14
cmpb $0x0, 0xca(%rbx)
cmoveq %r15, %r14
leaq 0x6643(%rip), %rdx      # 0x238bd
movq %rsp, %rbx
movl $0x80, %esi
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x51c0
movq %rbx, %rdi
callq 0x1bf3d
leaq 0x63ac(%rip), %rdx      # 0x2364a
movl $0x80, %esi
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x51c0
movq %rbx, %rdi
callq 0x1bf3d
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2120
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 0x2120
cmpl $0x0, (%rbx)
jne 0x13bb
cmpl $-0x7, %eax
jne 0x13cc
movq (%rsp), %rdi
callq 0x22db
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_O3/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 0x15a7f(%rip), %r15     # 0x1bfd8
movq (%r15), %rdi
callq 0x5080
movl %eax, %ebx
movq (%r15), %rdi
movslq 0x15e43(%rip), %rdx     # 0x1c3b0
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
movq (%r15), %rdi
cmpl $0x6, %eax
jne 0x65bf
movslq %ebp, %rsi
callq 0x5310
movq (%r15), %rdi
movq %r14, %rsi
callq 0x5690
movq (%r15), %rdi
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5720
movq (%r15), %rdi
testl %eax, %eax
je 0x65e3
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5580
leaq 0xcc8e(%rip), %rsi      # 0x13254
leaq 0xcca1(%rip), %rdx      # 0x1326e
movl $0x4a, %ecx
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_O3/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 0x159cd(%rip), %r12     # 0x1bfd8
movq (%r12), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x159cb(%rip), %rax     # 0x1bfe8
movq %r15, %rdi
callq *0x150(%rax)
movq %rax, %r15
movl %r15d, %edi
callq 0x5430
testq %rax, %rax
je 0x669e
movq (%r12), %rdi
movslq 0x34(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x669e
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 0x5720
movq (%r12), %rdi
testl %eax, %eax
je 0x66c4
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5580
movq (%r12), %rdi
leaq 0xcbab(%rip), %rsi      # 0x13254
leaq 0xcbbe(%rip), %rdx      # 0x1326e
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_O3/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 0x158ee(%rip), %r12     # 0x1bfd8
movq (%r12), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x158ec(%rip), %rax     # 0x1bfe8
movq %r15, %rdi
callq *0x150(%rax)
movq %rax, %r15
movl %r15d, %edi
callq 0x5430
testq %rax, %rax
je 0x677d
movq (%r12), %rdi
movslq 0x38(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x677d
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 0x5720
movq (%r12), %rdi
testl %eax, %eax
je 0x67a3
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5580
movq (%r12), %rdi
leaq 0xcacc(%rip), %rsi      # 0x13254
leaq 0xcadf(%rip), %rdx      # 0x1326e
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_O3/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 0x15440(%rip), %r15     # 0x1bfd8
movq (%r15), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x1543f(%rip), %rax     # 0x1bfe8
movq %r14, %rdi
callq *0x150(%rax)
movq %rax, %r14
movl %r14d, %edi
callq 0x5430
testq %rax, %rax
je 0x6c31
movq (%r15), %rdi
movslq 0x50(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x6c31
movq (%r15), %rdi
movslq %r14d, %rsi
callq 0x5310
movq (%r15), %rdi
xorps %xmm0, %xmm0
cvtss2sd 0x8(%rsp), %xmm0
callq 0x5460
movq (%r15), %rdi
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
callq 0x5460
movq (%r15), %rdi
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5720
movq (%r15), %rdi
testl %eax, %eax
je 0x6c57
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x5580
movq (%r15), %rdi
leaq 0xc619(%rip), %rsi      # 0x13254
leaq 0xc62c(%rip), %rdx      # 0x1326e
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_O3/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 0x1535a(%rip), %r12     # 0x1bfd8
movq (%r12), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x15358(%rip), %rax     # 0x1bfe8
movq %r15, %rdi
callq *0x150(%rax)
movq %rax, %r15
movl %r15d, %edi
callq 0x5430
testq %rax, %rax
je 0x6d11
movq (%r12), %rdi
movslq 0x54(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x6d11
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 0x5720
movq (%r12), %rdi
testl %eax, %eax
je 0x6d37
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5580
movq (%r12), %rdi
leaq 0xc538(%rip), %rsi      # 0x13254
leaq 0xc54b(%rip), %rdx      # 0x1326e
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_O3/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 0x15271(%rip), %rbx     # 0x1bfd8
movq (%rbx), %rdi
callq 0x5080
movl %eax, 0x4(%rsp)
movq 0x1526e(%rip), %rax     # 0x1bfe8
movq %r13, %rdi
callq *0x150(%rax)
movq %rax, %r13
movl %r13d, %edi
callq 0x5430
testq %rax, %rax
je 0x6e1b
movq (%rbx), %rdi
movslq 0x58(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x6e1b
movq (%rbx), %rdi
movslq %r13d, %rsi
callq 0x5310
movq (%rbx), %rdi
movl $0x2, %esi
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 0x6e5d
movq (%rbx), %rdi
movl $0x8, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5720
movq (%rbx), %rdi
testl %eax, %eax
je 0x6e46
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5580
movq (%rbx), %rdi
leaq 0xc42f(%rip), %rsi      # 0x13254
leaq 0xc442(%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 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_O3/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 0x15058(%rip), %r12     # 0x1bfd8
movq (%r12), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x15056(%rip), %rax     # 0x1bfe8
movq %r15, %rdi
callq *0x150(%rax)
movq %rax, %r15
movl %r15d, %edi
callq 0x5430
testq %rax, %rax
je 0x7012
movq (%r12), %rdi
movslq 0x60(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x7012
movq (%r12), %rdi
movslq %r15d, %rsi
callq 0x5310
movq (%r12), %rdi
movl %r14d, %esi
callq 0x5310
movq (%r12), %rdi
movl %ebp, %esi
callq 0x6e5d
movq (%r12), %rdi
movl $0x6, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5720
movq (%r12), %rdi
testl %eax, %eax
je 0x7038
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5580
movq (%r12), %rdi
leaq 0xc237(%rip), %rsi      # 0x13254
leaq 0xc24a(%rip), %rdx      # 0x1326e
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_O3/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 0x14f74(%rip), %r13     # 0x1bfd8
movq (%r13), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x14f72(%rip), %rax     # 0x1bfe8
movq %r12, %rdi
callq *0x150(%rax)
movq %rax, %r12
movl %r12d, %edi
callq 0x5430
testq %rax, %rax
je 0x7113
movq (%r13), %rdi
movslq 0x64(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x7113
movq (%r13), %rdi
movslq %r12d, %rsi
callq 0x5310
movq (%r13), %rdi
movl $0x1, %esi
movl %r15d, %edx
callq 0x55e0
movq (%r13), %rdi
xorl %esi, %esi
movl %r14d, %edx
callq 0x55e0
movq (%r13), %rdi
movl %ebp, %esi
callq 0x6e5d
movq (%r13), %rdi
movl $0x7, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5720
movq (%r13), %rdi
testl %eax, %eax
je 0x713f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5580
movq (%r13), %rdi
leaq 0xc136(%rip), %rsi      # 0x13254
leaq 0xc149(%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 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_O3/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 0x14e66(%rip), %r15     # 0x1bfd8
movq (%r15), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x14e65(%rip), %rax     # 0x1bfe8
movq %r14, %rdi
callq *0x150(%rax)
movq %rax, %r14
movl %r14d, %edi
callq 0x5430
testq %rax, %rax
je 0x7204
movq (%r15), %rdi
movslq 0x68(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x7204
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
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5720
movq (%r15), %rdi
testl %eax, %eax
je 0x722a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x5580
movq (%r15), %rdi
leaq 0xc046(%rip), %rsi      # 0x13254
leaq 0xc059(%rip), %rdx      # 0x1326e
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
// File: /workspace/github_c_makefile_star2_O3/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 0x14cb3(%rip), %r15     # 0x1bfd8
movq (%r15), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x14cb2(%rip), %rax     # 0x1bfe8
movq %r14, %rdi
callq *0x150(%rax)
movq %rax, %r14
movl %r14d, %edi
callq 0x5430
testq %rax, %rax
je 0x73b7
movq (%r15), %rdi
movslq 0x70(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x73b7
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
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5720
movq (%r15), %rdi
testl %eax, %eax
je 0x73dd
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x5580
movq (%r15), %rdi
leaq 0xbe93(%rip), %rsi      # 0x13254
leaq 0xbea6(%rip), %rdx      # 0x1326e
movl $0x134, %ecx            # imm = 0x134
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_O3/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 0x14bd1(%rip), %r12     # 0x1bfd8
movq (%r12), %rdi
callq 0x5080
movl %eax, %ebx
movq 0x14bcf(%rip), %rax     # 0x1bfe8
movq %r15, %rdi
callq *0x150(%rax)
movq %rax, %r15
movl %r15d, %edi
callq 0x5430
testq %rax, %rax
je 0x74a6
movq (%r12), %rdi
movslq 0x74(%rax), %rdx
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
cmpl $0x6, %eax
jne 0x74a6
movq (%r12), %rdi
movslq %r15d, %rsi
callq 0x5310
testl %ebp, %ebp
jle 0x7474
movl %ebp, %r15d
xorl %r13d, %r13d
movq (%r12), %rdi
movq (%r14,%r13,8), %rsi
callq 0x5690
incq %r13
cmpq %r13, %r15
jne 0x745f
movq (%r12), %rdi
incl %ebp
movl %ebp, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5720
movq (%r12), %rdi
testl %eax, %eax
je 0x74d2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5580
movq (%r12), %rdi
leaq 0xbda3(%rip), %rsi      # 0x13254
leaq 0xbdb6(%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 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_O3/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 0x14ada(%rip), %r13     # 0x1bfd8
movq (%r13), %rdi
callq 0x5080
movl %eax, %ebp
movq (%r13), %rdi
movslq 0x14ea0(%rip), %rdx     # 0x1c3b4
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
movq (%r13), %r15
cmpl $0x6, %eax
jne 0x754a
xorl %edi, %edi
callq 0x5180
movq $-0x1, %r12
testq %rax, %rax
je 0x7579
cmpq %r14, 0x28(%rax)
je 0x7575
movq %rax, %rdi
callq 0x51c0
jmp 0x7535
leaq 0xbd03(%rip), %rsi      # 0x13254
leaq 0xbd16(%rip), %rdx      # 0x1326e
movq %r15, %rdi
movl $0x55, %ecx
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 0xbd4a(%rip), %rax      # 0x132df
leaq 0xbd40(%rip), %rsi      # 0x132dc
cmoveq %rax, %rsi
callq 0x5690
movq (%r13), %rdi
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5720
movq (%r13), %rdi
testl %eax, %eax
je 0x75d8
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 0x5750
// File: /workspace/github_c_makefile_star2_O3/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 0x149cd(%rip), %r15     # 0x1bfd8
movq (%r15), %rdi
callq 0x5080
movl %eax, %ebx
movq (%r15), %rdi
movslq 0x14d99(%rip), %rdx     # 0x1c3b8
movl $0xfff0b9d8, %esi       # imm = 0xFFF0B9D8
callq 0x5290
movq (%r15), %rdi
cmpl $0x6, %eax
jne 0x7689
incl %r14d
movslq %r14d, %rsi
callq 0x5310
movq (%r15), %rdi
cmpl $0x40001, %ebp          # imm = 0x40001
leaq 0xbc93(%rip), %rax      # 0x132df
leaq 0xbc89(%rip), %rsi      # 0x132dc
cmoveq %rax, %rsi
callq 0x5690
movq (%r15), %rdi
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5720
movq (%r15), %rdi
testl %eax, %eax
je 0x76ad
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5580
leaq 0xbbc4(%rip), %rsi      # 0x13254
leaq 0xbbd7(%rip), %rdx      # 0x1326e
movl $0x69, %ecx
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
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/cur.c
// Function: moonglfw_cur_check
cur_t* cur_check(lua_State *L, int arg)
    {
    int id = luaL_checkinteger(L, arg);
    cur_t *cur = cur_search(id);
    if(!cur)
        luaL_error(L, "invalid cursor id");
    return cur;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x53e0
movq 0x144b0(%rip), %rbx     # 0x1c3c8
testq %rbx, %rbx
je 0x7f2d
cmpl %eax, 0x20(%rbx)
jg 0x7f28
jge 0x7f40
addq $0x8, %rbx
movq (%rbx), %rbx
jmp 0x7f18
leaq 0xb464(%rip), %rsi      # 0x13398
xorl %ebx, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0x55b0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/enums.c
// Function: moonglfw_enums_test
int enums_test(lua_State *L, int domain, int arg, int *err)
    {
    rec_t *rec;
    const char *s = luaL_optstring(L, arg, NULL);

    if(!s)
        { *err = ERR_NOTPRESENT; return 0; }

    rec = str_search(domain, s);
    if(!rec)
        { *err = ERR_VALUE; return 0; }
    
    *err = ERR_SUCCESS;
    return rec->code;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
movl %esi, %ebp
xorl %r14d, %r14d
movl %edx, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5260
testq %rax, %rax
je 0x8854
movl %ebp, %edi
movq %rax, %rsi
callq 0x886d
testq %rax, %rax
je 0x885c
movl $0x0, (%rbx)
movl 0x44(%rax), %r14d
jmp 0x8865
movl $0x1, (%rbx)
jmp 0x8865
movl $0xfffffffd, (%rbx)     # imm = 0xFFFFFFFD
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/enums.c
// Function: moonglfw_enums_check
int enums_check(lua_State *L, int domain, int arg)
    {
    rec_t *rec;
    const char *s = luaL_checkstring(L, arg);

    rec = str_search(domain, s);
    if(!rec)
        return luaL_argerror(L, arg, badvalue(L, s));
    
    return rec->code;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %edx, %esi
xorl %edx, %edx
callq 0x5340
movq %rax, %r15
movl %ebp, %edi
movq %rax, %rsi
callq 0x886d
testq %rax, %rax
je 0x88fe
movl 0x44(%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xaaa5(%rip), %rsi      # 0x133aa
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x5370
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5150
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/enums.c
// Function: moonglfw_enums_push
int enums_push(lua_State *L, int domain, int code)
    {
    rec_t *rec = code_search(domain, code);

    if(!rec)
        return unexpected(L);

    lua_pushstring(L, rec->str);
    return 1;
    }

// Assembly:
pushq %rax
movq 0x13a9f(%rip), %rax     # 0x1c3d0
testq %rax, %rax
je 0x8950
cmpl %esi, 0x40(%rax)
jne 0x893e
cmpl %edx, 0x44(%rax)
setl %cl
jg 0x894b
testb %cl, %cl
je 0x896c
addq $0x8, %rax
movq (%rax), %rax
jmp 0x8931
leaq 0xa8fd(%rip), %rsi      # 0x13254
leaq 0xaa5f(%rip), %rdx      # 0x133bd
movl $0xc9, %ecx
xorl %eax, %eax
popq %r8
jmp 0x55b0
movq 0x48(%rax), %rsi
callq 0x5690
movl $0x1, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/enums.c
// Function: moonglfw_enums_checklist
int* enums_checklist(lua_State *L, int domain, int arg, int *count, int *err)
    {
    int* list;
    int i;

    *count = 0;
    *err = 0;
    if(lua_isnoneornil(L, arg))
        { *err = ERR_NOTPRESENT; return NULL; }
    if(lua_type(L, arg) != LUA_TTABLE)
        { *err = ERR_TABLE; return NULL; }

    *count = luaL_len(L, arg);
    if(*count == 0)
        { *err = ERR_NOTPRESENT; return NULL; }

    list = (int*)MallocNoErr(L, sizeof(int) * (*count));
    if(!list)
        { *count = 0; *err = ERR_MEMORY; return NULL; }

    for(i=0; i<*count; i++)
        {
        lua_rawgeti(L, arg, i+1);
        list[i] = enums_test(L, domain, -1, err);
        lua_pop(L, 1);
        if(*err)
            { Free(L, list); *count = 0; return NULL; }
        }
    return list;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movl %edx, %ebp
movl %esi, 0x14(%rsp)
movq %rdi, %r15
xorl %eax, %eax
movq %rcx, 0x8(%rsp)
movl %eax, (%rcx)
movl %eax, (%r8)
movl %edx, %esi
callq 0x5630
testl %eax, %eax
jle 0x8b2a
movq %r15, %rdi
movl %ebp, %esi
callq 0x5630
cmpl $0x5, %eax
jne 0x8b33
movq %r15, %rdi
movl %ebp, %esi
callq 0x5650
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
testl %eax, %eax
je 0x8b2a
movslq %eax, %rsi
shlq $0x2, %rsi
movq %r15, %rdi
callq 0x5030
testq %rax, %rax
je 0x8b4f
movq %rax, %r13
xorl %r12d, %r12d
movq 0x8(%rsp), %rax
movslq (%rax), %rax
cmpq %rax, %r12
jge 0x8b3d
leaq 0x1(%r12), %rbx
movq %r15, %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x5290
movq %r15, %rdi
movl 0x14(%rsp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rcx
callq 0x5540
movl %eax, (%r13,%r12,4)
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x50d0
cmpl $0x0, (%r14)
movq %rbx, %r12
je 0x8ac4
movq %r15, %rdi
movq %r13, %rsi
callq 0x52f0
movq 0x8(%rsp), %rax
movl $0x0, (%rax)
jmp 0x8b3a
movl $0x1, (%r14)
jmp 0x8b3a
movl $0xfffffffc, (%r14)     # imm = 0xFFFFFFFC
xorl %r13d, %r13d
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rax
movl $0x0, (%rax)
movl $0xfffffffa, (%r14)     # imm = 0xFFFFFFFA
jmp 0x8b3a
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/enums.c
// Function: Enum
static int Enum(lua_State *L)
/* { strings } = glfw.enum('type') lists all the values for a given enum type */
    { 
    const char *s = luaL_checkstring(L, 1); 
#define CASE(xxx) if(strcmp(s, ""#xxx) == 0) return values##xxx(L)
    CASE(action);
    CASE(button);
    CASE(key);
    CASE(target);
    CASE(api);
    CASE(robustness);
    CASE(releasebehavior);
    CASE(profile);
    CASE(inputmode);
    CASE(cursormode);
    CASE(cursorshape);
    CASE(contextcreationapi);
//  CASE(gamepadbutton);
//  CASE(gamepadaxis);
    CASE(inithint);
    CASE(platform);
    CASE(waylandlibdecor);
    CASE(angleplatformtype);
#undef CASE
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
movl $0x1, %esi
xorl %edx, %edx
callq 0x5340
movq %rax, %r14
leaq 0x9247(%rip), %rsi      # 0x13ad3
movq %rax, %rdi
callq 0x53c0
testl %eax, %eax
je 0xaa65
leaq 0xa4b6(%rip), %rsi      # 0x14d59
movq %r14, %rdi
callq 0x53c0
movl $0x1, %r15d
testl %eax, %eax
je 0xaa65
leaq 0xa46d(%rip), %rsi      # 0x14d2d
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xa9ff
leaq 0x9203(%rip), %rsi      # 0x13ada
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xaa07
leaq 0x8e81(%rip), %rsi      # 0x1376f
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xaa0f
leaq 0x8ff0(%rip), %rsi      # 0x138f5
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xaa17
leaq 0x91c5(%rip), %rsi      # 0x13ae1
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xaa1f
leaq 0x8eca(%rip), %rsi      # 0x137fd
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xaa27
leaq 0x91a7(%rip), %rsi      # 0x13af1
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xaa2f
leaq 0x919a(%rip), %rsi      # 0x13afb
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xaa37
leaq 0x918e(%rip), %rsi      # 0x13b06
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xaa3f
leaq 0x9183(%rip), %rsi      # 0x13b12
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xaa47
leaq 0x917f(%rip), %rsi      # 0x13b25
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xaa4f
leaq 0xaa50(%rip), %rsi      # 0x1540d
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xaa57
leaq 0x915a(%rip), %rsi      # 0x13b2e
movq %r14, %rdi
callq 0x53c0
testl %eax, %eax
je 0xaa5f
leaq 0x9157(%rip), %rsi      # 0x13b3e
movq %r14, %rdi
callq 0x53c0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0xaa75
movl $0x11, %r15d
jmp 0xaa65
movl $0x2, %r15d
jmp 0xaa65
movl $0x3, %r15d
jmp 0xaa65
movl $0x4, %r15d
jmp 0xaa65
movl $0x5, %r15d
jmp 0xaa65
movl $0x6, %r15d
jmp 0xaa65
movl $0x7, %r15d
jmp 0xaa65
movl $0x8, %r15d
jmp 0xaa65
movl $0x9, %r15d
jmp 0xaa65
movl $0xa, %r15d
jmp 0xaa65
movl $0xb, %r15d
jmp 0xaa65
movl $0xe, %r15d
jmp 0xaa65
movl $0xf, %r15d
jmp 0xaa65
movl $0x10, %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5700
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/hint.c
// Function: VersionHint
static int VersionHint(lua_State *L) /* NONGLFW */
    {
    int major = luaL_checkinteger(L, 1);
    int minor = luaL_checkinteger(L, 2);
    int profile = checkprofile(L, 3);
    glfw.WindowHint(GLFW_CONTEXT_VERSION_MAJOR, major);
    glfw.WindowHint(GLFW_CONTEXT_VERSION_MINOR, minor);
    glfw.WindowHint(GLFW_OPENGL_PROFILE, profile);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x53e0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x53e0
movq %rax, %r15
movq %rbx, %rdi
movl $0x7, %esi
movl $0x3, %edx
callq 0x5450
movl %eax, %ebx
movq 0xfcf7(%rip), %r12      # 0x1bfe8
movl $0x22002, %edi          # imm = 0x22002
movl %r14d, %esi
callq *0x88(%r12)
movl $0x22003, %edi          # imm = 0x22003
movl %r15d, %esi
callq *0x88(%r12)
movl $0x22008, %edi          # imm = 0x22008
movl %ebx, %esi
callq *0x88(%r12)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/hint.c
// Function: SetWindowAttrib
static int SetWindowAttrib(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    int attrib = checktarget(L, 2);
    switch(attrib)
        {
        case GLFW_RESIZABLE:
        case GLFW_DECORATED:
        case GLFW_FLOATING:
        case GLFW_AUTO_ICONIFY:
        case GLFW_FOCUS_ON_SHOW:
        case GLFW_MOUSE_PASSTHROUGH:
            return SetBoolean(L, win->window, attrib);
        default:
            return luaL_error(L, "invalid attribute '%s'", lua_tostring(L, 2));
        }
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5570
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
movl $0x2, %edx
callq 0x5450
movl %eax, %r14d
leal -0x20003(%r14), %eax
cmpl $0xa, %eax
ja 0xc558
movl $0x61d, %ecx            # imm = 0x61D
btl %eax, %ecx
jae 0xc558
movq 0x28(%r15), %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x5070
movq 0xfada(%rip), %rcx      # 0x1bfe8
movq 0x320(%rcx), %rcx
testq %rcx, %rcx
je 0xc52d
movzbl %al, %edx
movq %r15, %rdi
movl %r14d, %esi
callq *%rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xc580
leaq 0x875e(%rip), %rsi      # 0x14ca7
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x51e0
leaq 0x86ec(%rip), %rsi      # 0x14c5a
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
leaq 0x86ea(%rip), %rsi      # 0x14c71
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/hint.c
// Function: Integer
static int Integer(lua_State *L, int target)
    {
    int hint = GLFW_DONT_CARE;
    const char *s;
    if(lua_type(L, 2) == LUA_TSTRING)
        {
        s = lua_tostring(L, 2);
        if(strncmp(s, "don't care", strlen(s)) != 0)
            return luaL_argerror(L, 2, "expected integer or \"don't care\"");
        }
    else
        {
        hint = luaL_checkinteger(L, 2);
#if 0
        if(hint < -1)
            return luaL_argerror(L, 2, "invalid value");
#endif
        }
    glfw.WindowHint( target, hint);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl $0x2, %esi
callq 0x5630
cmpl $0x4, %eax
jne 0xc605
movq %r14, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x51e0
movq %rax, %r15
movq %rax, %rdi
callq 0x5220
leaq 0x85d9(%rip), %rsi      # 0x14bb6
movq %r15, %rdi
movq %rax, %rdx
callq 0x50e0
testl %eax, %eax
je 0xc617
leaq 0x85ce(%rip), %rdx      # 0x14bc1
movq %r14, %rdi
movl $0x2, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x5150
movq %r14, %rdi
movl $0x2, %esi
callq 0x53e0
movq %rax, %rsi
jmp 0xc61c
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq 0xf9c5(%rip), %rax      # 0x1bfe8
movl %ebx, %edi
callq *0x88(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/id.c
// Function: moonglfw_id_free
void id_free(int key)
    {
    id_t* id = id_search(key);
    if(id)
        {
        id_remove(id);
        free(id);
        }
    }

// Assembly:
pushq %rbx
movq 0xff3f(%rip), %rbx      # 0x1c880
testq %rbx, %rbx
je 0xc956
cmpl %edi, 0x20(%rbx)
jg 0xc951
jge 0xc958
addq $0x8, %rbx
movq (%rbx), %rbx
jmp 0xc941
popq %rbx
retq
movq %rbx, %rdi
callq 0xc969
movq %rbx, %rdi
popq %rbx
jmp 0x50b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/id.c
// Function: moonglfw_id_free_all
void id_free_all(void)
    {
    id_t *id;
    while((id = id_first(0)))
        {
        id_remove(id);
        free(id);
        }
    }

// Assembly:
movq 0xfb17(%rip), %rax      # 0x1c880
testq %rax, %rax
je 0xcdb8
pushq %rbx
xorl %ebx, %ebx
cmpl $0x0, 0x20(%rax)
jle 0xcd89
movq %rax, %rbx
movq (%rax), %rax
testq %rax, %rax
jne 0xcd71
testq %rbx, %rbx
jne 0xcd8e
jmp 0xcdb7
js 0xcdb1
movq %rax, %rbx
movq %rbx, %rdi
callq 0xc969
movq %rbx, %rdi
callq 0x50b0
movq 0xfadb(%rip), %rax      # 0x1c880
movl $0x0, %ebx
testq %rax, %rax
jne 0xcd71
jmp 0xcdb7
addq $0x8, %rax
jmp 0xcd7a
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/input.c
// Function: GetInputMode
static int GetInputMode(lua_State *L)
    {
    int val;
    win_t *win = checkwindow(L, 1);
    int mode = checkinputmode(L, 2);
    val = glfw.GetInputMode(win->window,mode);
    switch(mode)
        {
        case GLFW_CURSOR:   pushcursormode(L, val); return 1;
        case GLFW_STICKY_KEYS:
        case GLFW_STICKY_MOUSE_BUTTONS:
        case GLFW_LOCK_KEY_MODS:
        case GLFW_RAW_MOUSE_MOTION:
                            lua_pushboolean(L, val); return 1;
        default:
            return unexpected(L);
        }
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5570
movq %rax, %r15
movq %rbx, %rdi
movl $0x8, %esi
movl $0x2, %edx
callq 0x5450
movl %eax, %r14d
movq 0xf1cc(%rip), %rax      # 0x1bfe8
movq 0x28(%r15), %rdi
movl %r14d, %esi
callq *0x1b0(%rax)
leal -0x33002(%r14), %ecx
cmpl $0x4, %ecx
jae 0xce41
movq %rbx, %rdi
movl %eax, %esi
callq 0x5480
jmp 0xce59
cmpl $0x33001, %r14d         # imm = 0x33001
jne 0xce64
movq %rbx, %rdi
movl $0x9, %esi
movl %eax, %edx
callq 0x55e0
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x63e9(%rip), %rsi      # 0x13254
leaq 0x807a(%rip), %rdx      # 0x14eec
movq %rbx, %rdi
movl $0x2f, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/input.c
// Function: SetInputMode
static int SetInputMode(lua_State *L)
    {
    int value;
    win_t *win = checkwindow(L, 1);
    int mode = checkinputmode(L, 2);
    switch(mode)
        {
        case GLFW_CURSOR:   value = checkcursormode(L, 3); break;
        case GLFW_STICKY_KEYS:
        case GLFW_STICKY_MOUSE_BUTTONS:
        case GLFW_LOCK_KEY_MODS:
        case GLFW_RAW_MOUSE_MOTION:
                            value = checkboolean(L, 3); break;
        default:
            return unexpected(L);
        }
    glfw.SetInputMode(win->window, mode, value);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movl $0x1, %esi
callq 0x5570
movq %rax, %rbx
movq %r15, %rdi
movl $0x8, %esi
movl $0x2, %edx
callq 0x5450
movl %eax, %r14d
leal -0x33002(%r14), %eax
cmpl $0x4, %eax
jae 0xcece
movq %r15, %rdi
movl $0x3, %esi
callq 0x5070
movzbl %al, %edx
jmp 0xceeb
cmpl $0x33001, %r14d         # imm = 0x33001
jne 0xcf07
movq %r15, %rdi
movl $0x9, %esi
movl $0x3, %edx
callq 0x5450
movl %eax, %edx
movq 0xf0f6(%rip), %rax      # 0x1bfe8
movq 0x28(%rbx), %rdi
movl %r14d, %esi
callq *0x1b8(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x6346(%rip), %rsi      # 0x13254
leaq 0x7fd7(%rip), %rdx      # 0x14eec
movq %r15, %rdi
movl $0x42, %ecx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55b0
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/input.c
// Function: GetKey
static int GetKey(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    int key = checkkey(L, 2);
    int state = glfw.GetKey(win->window, key);
    lua_pushstring(L, state==GLFW_PRESS ? "press" : "release");
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5570
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
movl $0x2, %edx
callq 0x5450
movq 0xf022(%rip), %rcx      # 0x1bfe8
movq 0x28(%r14), %rdi
movl %eax, %esi
callq *0x1c8(%rcx)
cmpl $0x1, %eax
leaq 0x63e9(%rip), %rax      # 0x133c5
leaq 0x63ef(%rip), %rsi      # 0x133d2
cmoveq %rax, %rsi
movq %rbx, %rdi
callq 0x5690
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/input.c
// Function: GetKeyName
static int GetKeyName(lua_State *L)
    {
    int key, scancode;
    const char *name = NULL;
    CheckPfn(L, GetKeyName, 3, 2, 0);
    if(lua_type(L, 1) == LUA_TSTRING)
        {
        key = checkkey(L, 1);
        name = glfw.GetKeyName(key, 0);
        }
    else if(lua_isinteger(L, 1))
        {
        scancode = lua_tointeger(L, 1);
        name = glfw.GetKeyName(GLFW_KEY_UNKNOWN, scancode);
        }
    else
        return luaL_argerror(L, 1, "expected key (a string) or scancode (an integer)");

    if(!name)
        return 0;
    lua_pushstring(L, name);
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xefde(%rip), %r14      # 0x1bfe8
cmpq $0x0, 0x1c0(%r14)
je 0xd03e
movq %rbx, %rdi
movl $0x1, %esi
callq 0x5630
movq %rbx, %rdi
cmpl $0x4, %eax
jne 0xd06b
movl $0x2, %esi
movl $0x1, %edx
callq 0x5450
movl %eax, %edi
xorl %esi, %esi
jmp 0xd08f
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xd0b7
leaq 0x7f37(%rip), %rsi      # 0x14f91
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x55b0
movl $0x1, %esi
callq 0x5730
testl %eax, %eax
je 0xd0dc
movq %rbx, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x51d0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl %eax, %esi
callq *0x1c0(%r14)
testq %rax, %rax
je 0xd0ad
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5690
movl $0x1, %eax
jmp 0xd0af
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7ea2(%rip), %rsi      # 0x14f60
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x55b0
leaq 0x7ecf(%rip), %rdx      # 0x14fb2
movq %rbx, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5150
// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonglfw/src/input.c
// Function: GetKeyScancode
static int GetKeyScancode(lua_State *L)
    {
    int key = checkkey(L, 1);
    CheckPfn(L, GetKeyScancode, 3, 3, 0);
    lua_pushinteger(L, glfw.GetKeyScancode(key));
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x2, %esi
movl $0x1, %edx
callq 0x5450
movq 0xeed7(%rip), %rcx      # 0x1bfe8
movq 0x340(%rcx), %rcx
testq %rcx, %rcx
je 0xd133
movl %eax, %edi
callq *%rcx
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x5310
movl $0x1, %eax
popq %rbx
retq
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x56a0
testl %eax, %eax
je 0xd15a
leaq 0x7ec9(%rip), %rsi      # 0x15018
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55b0
leaq 0x7e82(%rip), %rsi      # 0x14fe3
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55b0