LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/utils.c
// Function: moonglfw_pushgammaramp
int pushgammaramp(lua_State *L, const GLFWgammaramp *ramp)
    {
    unsigned int i;
    int table;
#define Setfield(x, name)   do {            \
        lua_newtable(L);                    \
        table = lua_gettop(L);              \
        for(i=0; i<ramp->size; i++)         \
            {                               \
            lua_pushinteger(L, ramp->x[i]); \
            lua_seti(L, table, i+1);        \
            }                               \
} while(0)
    Setfield(red,"red");
    Setfield(green,"green");
    Setfield(blue,"blue");
#undef Setfield
    return 3;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0x5210
movq %r14, %rdi
callq 0x5080
cmpl $0x0, 0x18(%rbx)
je 0x101d6
movl %eax, %ebp
xorl %r15d, %r15d
movq (%rbx), %rax
movzwl (%rax,%r15,2), %esi
movq %r14, %rdi
callq 0x5310
incq %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x53a0
movl 0x18(%rbx), %eax
cmpq %rax, %r15
jb 0x101ae
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5210
movq %r14, %rdi
callq 0x5080
cmpl $0x0, 0x18(%rbx)
je 0x1021e
movl %eax, %ebp
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movzwl (%rax,%r15,2), %esi
movq %r14, %rdi
callq 0x5310
incq %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x53a0
movl 0x18(%rbx), %eax
cmpq %rax, %r15
jb 0x101f5
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5210
movq %r14, %rdi
callq 0x5080
cmpl $0x0, 0x18(%rbx)
je 0x10266
movl %eax, %ebp
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movzwl (%rax,%r15,2), %esi
movq %r14, %rdi
callq 0x5310
incq %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x53a0
movl 0x18(%rbx), %eax
cmpq %rax, %r15
jb 0x1023d
movl $0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/vulkan.c
// Function: GetRequiredInstanceExtensions
static int GetRequiredInstanceExtensions(lua_State *L)
    {
    uint32_t count, i;
    const char **names;
    CheckVulkanPfn(L, GetRequiredInstanceExtensions);
    names = glfw.GetRequiredInstanceExtensions(&count);
    lua_newtable(L);
    if((count == 0) || names==NULL)
        return 1;
    for(i=0; i< count; i++)
        {
        lua_pushstring(L, names[i]);
        lua_rawseti(L, -2, i+1);
        }
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0xba61(%rip), %rax      # 0x1bfe8
movq 0x3b0(%rax), %rax
testq %rax, %rax
je 0x105fa
leaq 0xc(%rsp), %r15
movq %r15, %rdi
callq *%rax
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5210
cmpl $0x0, (%r15)
setne %al
testq %r14, %r14
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x105eb
xorl %r15d, %r15d
movq (%r14,%r15,8), %rsi
movq %rbx, %rdi
callq 0x5680
incq %r15
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x5400
movl 0xc(%rsp), %eax
cmpq %rax, %r15
jb 0x105c3
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0x10629
leaq 0x5aab(%rip), %rsi      # 0x160c1
movq %rbx, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
leaq 0x5a4d(%rip), %rsi      # 0x1607d
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/vulkan.c
// Function: GetPhysicalDevicePresentationSupport
static int GetPhysicalDevicePresentationSupport(lua_State *L)
    {
    int result;
    VkInstance instance = (VkInstance)checkhandle(L, 1);
    VkPhysicalDevice device = (VkPhysicalDevice)checkhandle(L, 2);
    uint32_t queuefamily = luaL_checkinteger(L, 3);
    CheckVulkanPfn(L, GetPhysicalDevicePresentationSupport);
    result = glfw.GetPhysicalDevicePresentationSupport(instance, device, queuefamily);
    lua_pushboolean(L, result);
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x53d0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x53d0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x53d0
movq 0xb95f(%rip), %rcx      # 0x1bfe8
movq 0x3c0(%rcx), %rcx
testq %rcx, %rcx
je 0x106b4
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
callq *%rcx
movq %rbx, %rdi
movl %eax, %esi
callq 0x5470
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0x106df
leaq 0x5a70(%rip), %rsi      # 0x16140
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
leaq 0x5a0f(%rip), %rsi      # 0x160f5
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/win.c
// Function: moonglfw_win_check
win_t* win_check(lua_State *L, int arg)
    {
    int id = luaL_checkinteger(L, arg);
    win_t *win = win_search(id);
    if(!win)
        luaL_error(L, "invalid window id");
    return win;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x53d0
movq 0xb559(%rip), %r14      # 0x1c8b0
testq %r14, %r14
je 0x1136d
cmpl %eax, 0x20(%r14)
jg 0x11368
jge 0x11370
addq $0x8, %r14
movq (%r14), %r14
jmp 0x11357
xorl %r14d, %r14d
testq %r14, %r14
jne 0x11386
leaq 0x49eb(%rip), %rsi      # 0x15d67
movq %rbx, %rdi
xorl %eax, %eax
callq 0x55a0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: CreateWindow
static int CreateWindow(lua_State *L)
    {
    win_t *win, *share_win=NULL;
    mon_t *mon;
    intptr_t id;
    int width = luaL_checkinteger(L, 1);
    int height = luaL_checkinteger(L, 2);
    const char* title = luaL_optstring(L, 3, "");
    GLFWmonitor* monitor = testmonitor(L, 4, &mon) ? mon->monitor : NULL;
    GLFWwindow* share = testwindow(L, 5, &share_win) ? share_win->window : NULL;

    win = win_new();
    if(!win)
        return luaL_error(L, "cannot create window");
    
#ifdef MACOS
     glfw.WindowHint(GLFW_OPENGL_FORWARD_COMPAT,GLFW_TRUE); 
     glfw.WindowHint(GLFW_OPENGL_PROFILE,GLFW_OPENGL_CORE_PROFILE); 
#endif
    win->window = glfw.CreateWindow(width, height, title, monitor, share);
    if(win->window == NULL)
        {
        win_free(win);
        return luaL_error(L, "cannot create window");
        }
    /* this will allow us to retrieve the win_t* from the GLFWwindow*: */
    id = win->id;
    win->share_id =  share_win ? share_win->id : -1;
    glfw.SetWindowUserPointer(win->window, (void*)id);
    lua_pushinteger(L, win->id);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq $0x0, (%rsp)
movl $0x1, %esi
callq 0x53d0
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movl $0x2, %esi
callq 0x53d0
movq %rax, %r15
leaq 0x3f7c(%rip), %rdx      # 0x1537e
xorl %r12d, %r12d
movq %rbx, %rdi
movl $0x3, %esi
xorl %ecx, %ecx
callq 0x5260
movq %rax, %r13
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x4, %esi
callq 0x54e0
testl %eax, %eax
je 0x11436
movq 0x10(%rsp), %rax
movq 0x28(%rax), %r12
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x5, %esi
callq 0x5540
testl %eax, %eax
je 0x11454
movq (%rsp), %rax
movq 0x28(%rax), %r14
jmp 0x11457
xorl %r14d, %r14d
callq 0x53f0
testq %rax, %rax
je 0x114a8
movq %rax, %rbp
movq 0xab7d(%rip), %rax      # 0x1bfe8
movq 0x8(%rsp), %rdi
movl %r15d, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %r14, %r8
movq %rax, %r14
callq *0x90(%rax)
movq %rax, 0x28(%rbp)
testq %rax, %rax
je 0x114a0
movslq 0x20(%rbp), %rsi
movq (%rsp), %rcx
testq %rcx, %rcx
je 0x114bb
movl 0x20(%rcx), %ecx
jmp 0x114c0
movq %rbp, %rdi
callq 0x5240
leaq 0x512b(%rip), %rsi      # 0x165da
movq %rbx, %rdi
xorl %eax, %eax
callq 0x55a0
jmp 0x114de
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, 0x30(%rbp)
movq %rax, %rdi
callq *0x148(%r14)
movslq 0x20(%rbp), %rsi
movq %rbx, %rdi
callq 0x5310
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: FocusWindow
static int FocusWindow(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    CheckPfn(L, FocusWindow, 3, 2, 0);
    glfw.FocusWindow(win->window);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq 0xaabb(%rip), %rcx      # 0x1bfe8
movq 0x128(%rcx), %rcx
testq %rcx, %rcx
je 0x11543
movq 0x28(%rax), %rdi
callq *%rcx
xorl %eax, %eax
popq %rbx
retq
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0x1156a
leaq 0x50c2(%rip), %rsi      # 0x16621
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55a0
leaq 0x507e(%rip), %rsi      # 0x165ef
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: SetWindowAspectRatio
static int SetWindowAspectRatio(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    int numer = luaL_optinteger(L, 2, GLFW_DONT_CARE);
    int denom = luaL_optinteger(L, 3, GLFW_DONT_CARE);
    CheckPfn(L, SetWindowAspectRatio, 3, 2, 0);
    glfw.SetWindowAspectRatio(win->window, numer, denom);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
movq $-0x1, %rdx
callq 0x5480
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
movq $-0x1, %rdx
callq 0x5480
movq 0xaa18(%rip), %rcx      # 0x1bfe8
movq 0xe0(%rcx), %rcx
testq %rcx, %rcx
je 0x115ef
movq 0x28(%r14), %rdi
movl %r15d, %esi
movl %eax, %edx
callq *%rcx
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0x1161a
leaq 0x5073(%rip), %rsi      # 0x1667e
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
leaq 0x5022(%rip), %rsi      # 0x16643
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: SetWindowSizeLimits
static int SetWindowSizeLimits(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    int minwidth = luaL_optinteger(L, 2, GLFW_DONT_CARE);
    int minheight = luaL_optinteger(L, 3, GLFW_DONT_CARE);
    int maxwidth = luaL_optinteger(L, 4, GLFW_DONT_CARE);
    int maxheight = luaL_optinteger(L, 5, GLFW_DONT_CARE);
    CheckPfn(L, SetWindowSizeLimits, 3, 2, 0);
    glfw.SetWindowSizeLimits(win->window, minwidth, minheight, maxwidth, maxheight);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
movq $-0x1, %rdx
callq 0x5480
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
movq $-0x1, %rdx
callq 0x5480
movq %rax, %r12
movq %rbx, %rdi
movl $0x4, %esi
movq $-0x1, %rdx
callq 0x5480
movq %rax, %r13
movq %rbx, %rdi
movl $0x5, %esi
movq $-0x1, %rdx
callq 0x5480
movq 0xa932(%rip), %rcx      # 0x1bfe8
movq 0xd8(%rcx), %r9
testq %r9, %r9
je 0x116e1
movq 0x28(%r14), %rdi
movl %r15d, %esi
movl %r12d, %edx
movl %r13d, %ecx
movl %eax, %r8d
callq *%r9
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0x11710
leaq 0x4fe6(%rip), %rsi      # 0x166e3
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x55a0
leaq 0x4f92(%rip), %rsi      # 0x166a9
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: SetWindowIcon
static int SetWindowIcon(lua_State *L)
    {
    size_t len;
    int count, arg;
    GLFWimage images[32];
    win_t *win = checkwindow(L, 1);
    CheckPfn(L, SetWindowIcon, 3, 2, 0);
    count = 0;
    arg = 2;
    while(!lua_isnoneornil(L, arg))
        {
        images[count].width = luaL_checkinteger(L, arg++);
        images[count].height = luaL_checkinteger(L, arg++);
        images[count].pixels = (unsigned char*)luaL_checklstring(L, arg++, &len);
        count++;
        }
    if(count==0)
        luaL_checkinteger(L, arg); /* raises an error */
    glfw.SetWindowIcon(win->window, count, images);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq 0xa88c(%rip), %r14      # 0x1bfe8
cmpq $0x0, 0xb8(%r14)
je 0x117fb
movq %rax, %r12
movl $0x2, %r15d
movq %rbx, %rdi
movl $0x2, %esi
callq 0x5620
testl %eax, %eax
jle 0x11832
movq %r12, (%rsp)
movl $0x2, %r15d
xorl %ebp, %ebp
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r12
movl %r15d, %r13d
movq %rbx, %rdi
movl %r15d, %esi
callq 0x53d0
movl %eax, -0x8(%r14)
leal 0x1(%r13), %esi
movq %rbx, %rdi
callq 0x53d0
movl %eax, -0x4(%r14)
leal 0x3(%r13), %r15d
addl $0x2, %r13d
movq %rbx, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x5340
movq %rax, (%r14)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x5620
addq $0x10, %r14
incl %ebp
testl %eax, %eax
jg 0x1179e
movq 0xa7f3(%rip), %r14      # 0x1bfe8
movq (%rsp), %r12
jmp 0x11834
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0x1186a
leaq 0x4f2a(%rip), %rsi      # 0x16741
movq %rbx, %rdi
xorl %eax, %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x55a0
xorl %ebp, %ebp
testl %ebp, %ebp
jne 0x11843
movq %rbx, %rdi
movl %r15d, %esi
callq 0x53d0
movq 0x28(%r12), %rdi
leaq 0x10(%rsp), %rdx
movl %ebp, %esi
callq *0xb8(%r14)
xorl %eax, %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4e9c(%rip), %rsi      # 0x1670d
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: SetWindowMonitor
static int SetWindowMonitor(lua_State *L)
    {
    mon_t *mon;
    win_t *win = checkwindow(L, 1);
    GLFWmonitor* monitor = testmonitor(L, 2, &mon) ? mon->monitor : NULL;
    int xpos = luaL_checkinteger(L, 3);
    int ypos = luaL_checkinteger(L, 4);
    int width = luaL_checkinteger(L, 5);
    int height = luaL_checkinteger(L, 6);
    int refreshRate = luaL_optinteger(L, 7, GLFW_DONT_CARE);
    CheckPfn(L, SetWindowMonitor, 3, 2, 0);
    glfw.SetWindowMonitor(win->window, monitor, xpos, ypos, width, height, refreshRate);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x54e0
testl %eax, %eax
je 0x118da
movq 0x10(%rsp), %rax
movq 0x28(%rax), %r15
jmp 0x118dd
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x3, %esi
callq 0x53d0
movq %rax, %r12
movq %rbx, %rdi
movl $0x4, %esi
callq 0x53d0
movq %rax, %r13
movq %rbx, %rdi
movl $0x5, %esi
callq 0x53d0
movq %rax, %rbp
movq %rbx, %rdi
movl $0x6, %esi
callq 0x53d0
movq %rax, %r14
movq %rbx, %rdi
movl $0x7, %esi
movq $-0x1, %rdx
callq 0x5480
movq 0xa6b0(%rip), %rcx      # 0x1bfe8
movq 0x138(%rcx), %r10
testq %r10, %r10
je 0x11966
movq 0x8(%rsp), %rcx
movq 0x28(%rcx), %rdi
movl %eax, (%rsp)
movq %r15, %rsi
movl %r12d, %edx
movl %r13d, %ecx
movl %ebp, %r8d
movl %r14d, %r9d
callq *%r10
xorl %eax, %eax
jmp 0x119ac
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0x1198e
leaq 0x4e1a(%rip), %rsi      # 0x1679c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x55a0
jmp 0x119ac
leaq 0x4dd0(%rip), %rsi      # 0x16765
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x55a0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: WaitEventsTimeout
static int WaitEventsTimeout(lua_State *L)
    {
    double timeout = luaL_checknumber(L, 1);
    CheckPfn(L, WaitEventsTimeout, 3, 2, 0);
    glfw.WaitEventsTimeout(timeout);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5230
movq 0xa5f4(%rip), %rax      # 0x1bfe8
movq 0x1a0(%rax), %rax
testq %rax, %rax
je 0x11a06
callq *%rax
xorl %eax, %eax
popq %rbx
retq
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0x11a2d
leaq 0x4dd9(%rip), %rsi      # 0x167fb
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55a0
leaq 0x4d8f(%rip), %rsi      # 0x167c3
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: SetWindowShouldClose
static int SetWindowShouldClose(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    int value = checkboolean(L, 2);
    glfw.SetWindowShouldClose(win->window, value);
    return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x5070
movzbl %al, %esi
movq 0xa50f(%rip), %rax      # 0x1bfe8
movq 0x28(%r14), %rdi
callq *0xa8(%rax)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: SetWindowTitle
static int SetWindowTitle(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    const char *title = luaL_optstring(L, 2, "");
    glfw.SetWindowTitle(win->window, title);
    return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq %rax, %r14
leaq 0x3876(%rip), %rdx      # 0x1537e
movq %rbx, %rdi
movl $0x2, %esi
xorl %ecx, %ecx
callq 0x5260
movq 0xa4ca(%rip), %rcx      # 0x1bfe8
movq 0x28(%r14), %rdi
movq %rax, %rsi
callq *0xb0(%rcx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: GetWindowTitle
static int GetWindowTitle(lua_State *L)
    {
    const char *title;
    win_t *win = checkwindow(L, 1);
    CheckPfn(L, GetWindowTitle, 3, 4, 0);
    title = glfw.GetWindowTitle(win->window);
    lua_pushstring(L, title);
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq 0xa49e(%rip), %rcx      # 0x1bfe8
movq 0x388(%rcx), %rcx
testq %rcx, %rcx
je 0x11b6e
movq 0x28(%rax), %rdi
callq *%rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5680
movl $0x1, %eax
popq %rbx
retq
movl $0x3, %edi
movl $0x4, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0x11b95
leaq 0x4cce(%rip), %rsi      # 0x16858
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55a0
leaq 0x4c87(%rip), %rsi      # 0x16823
movq %rbx, %rdi
movl $0x3, %edx
movl $0x4, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: GetWindowPos
static int GetWindowPos(lua_State *L)
    {
    int xpos, ypos;
    win_t *win = checkwindow(L, 1);
    glfw.GetWindowPos(win->window, &xpos, &ypos);
    lua_pushinteger(L, xpos);
    lua_pushinteger(L, ypos);
    return 2;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq 0xa417(%rip), %rcx      # 0x1bfe8
movq 0x28(%rax), %rdi
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
callq *0xc0(%rcx)
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x5310
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x5310
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: SetWindowPos
static int SetWindowPos(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    int xpos = luaL_checkinteger(L, 2);
    int ypos = luaL_checkinteger(L, 3);
    glfw.SetWindowPos(win->window, xpos, ypos);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x53d0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x53d0
movq 0xa39f(%rip), %rcx      # 0x1bfe8
movq 0x28(%r14), %rdi
movl %r15d, %esi
movl %eax, %edx
callq *0xc8(%rcx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: GetWindowSize
static int GetWindowSize(lua_State *L)
    {
    int width, height;
    win_t *win = checkwindow(L, 1);
    glfw.GetWindowSize(win->window, &width, &height);
    lua_pushinteger(L, width);
    lua_pushinteger(L, height);
    return 2;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq 0xa36b(%rip), %rcx      # 0x1bfe8
movq 0x28(%rax), %rdi
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
callq *0xd0(%rcx)
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x5310
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x5310
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: SetWindowSize
static int SetWindowSize(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    int width = luaL_checkinteger(L, 2);
    int height = luaL_checkinteger(L, 3);
    glfw.SetWindowSize(win->window, width, height);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x53d0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x53d0
movq 0xa2f3(%rip), %rcx      # 0x1bfe8
movq 0x28(%r14), %rdi
movl %r15d, %esi
movl %eax, %edx
callq *0xe8(%rcx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: GetFramebufferSize
static int GetFramebufferSize(lua_State *L)
    {
    int width, height;
    win_t *win = checkwindow(L, 1);
    glfw.GetFramebufferSize(win->window, &width, &height);
    lua_pushinteger(L, width);
    lua_pushinteger(L, height);
    return 2;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq 0xa2bf(%rip), %rcx      # 0x1bfe8
movq 0x28(%rax), %rdi
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
callq *0xf0(%rcx)
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x5310
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x5310
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: GetWindowFrameSize
static int GetWindowFrameSize(lua_State *L)
    {
    int left, top, right, bottom;
    win_t *win = checkwindow(L, 1);
    (void)L;
    glfw.GetWindowFrameSize(win->window, &left, &top, &right, &bottom);
    lua_pushinteger(L, left);
    lua_pushinteger(L, top);
    lua_pushinteger(L, right);
    lua_pushinteger(L, bottom);
    return 4;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq 0xa25f(%rip), %r9       # 0x1bfe8
movq 0x28(%rax), %rdi
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movq %rsp, %r13
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
callq *0xf8(%r9)
movslq (%r14), %rsi
movq %rbx, %rdi
callq 0x5310
movslq (%r15), %rsi
movq %rbx, %rdi
callq 0x5310
movslq (%r12), %rsi
movq %rbx, %rdi
callq 0x5310
movslq (%r13), %rsi
movq %rbx, %rdi
callq 0x5310
movl $0x4, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: MaximizeWindow
static int MaximizeWindow(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    CheckPfn(L, MaximizeWindow, 3, 2, 0);
    glfw.MaximizeWindow(win->window);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq 0xa1a0(%rip), %rcx      # 0x1bfe8
movq 0x110(%rcx), %rcx
testq %rcx, %rcx
je 0x11e5e
movq 0x28(%rax), %rdi
callq *%rcx
xorl %eax, %eax
popq %rbx
retq
movl $0x3, %edi
movl $0x2, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0x11e85
leaq 0x4a38(%rip), %rsi      # 0x168b2
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55a0
leaq 0x49f1(%rip), %rsi      # 0x1687d
movq %rbx, %rdi
movl $0x3, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: GetWindowMonitor
static int GetWindowMonitor(lua_State *L)
    {
    int id;
    win_t *win = checkwindow(L, 1);
    GLFWmonitor *monitor = glfw.GetWindowMonitor(win->window);
    if(!monitor)
        return 0;
    id = monitorAdd(L, monitor);
    lua_pushinteger(L, id); 
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x1, %ebx
movl $0x1, %esi
callq 0x5560
movq 0xa0e7(%rip), %rcx      # 0x1bfe8
movq 0x28(%rax), %rdi
callq *0x130(%rcx)
testq %rax, %rax
je 0x11f28
movq %r14, %rdi
movq %rax, %rsi
callq 0x53e0
movslq %eax, %rsi
movq %r14, %rdi
callq 0x5310
jmp 0x11f2a
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: GetWindowContentScale
static int GetWindowContentScale(lua_State *L)
    {
    float xscale, yscale;
    win_t *win = checkwindow(L, 1);
    CheckPfn(L, GetWindowContentScale, 3, 3, 0);
    glfw.GetWindowContentScale(win->window, &xscale, &yscale);
    lua_pushnumber(L, xscale);
    lua_pushnumber(L, yscale);
    return 2;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq 0xa097(%rip), %rcx      # 0x1bfe8
movq 0x300(%rcx), %rcx
testq %rcx, %rcx
je 0x11f9f
movq 0x28(%rax), %rdi
leaq 0xc(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
callq *%rcx
cvtss2sd (%r14), %xmm0
movq %rbx, %rdi
callq 0x5450
xorps %xmm0, %xmm0
cvtss2sd (%r15), %xmm0
movq %rbx, %rdi
callq 0x5450
movl $0x2, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0x11fce
leaq 0x4958(%rip), %rsi      # 0x16913
movq %rbx, %rdi
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
leaq 0x4902(%rip), %rsi      # 0x168d7
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: GetWindowOpacity
static int GetWindowOpacity(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    CheckPfn(L, GetWindowOpacity, 3, 3, 0);
    lua_pushnumber(L, glfw.GetWindowOpacity(win->window));
    return 1;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq 0x9fde(%rip), %rcx      # 0x1bfe8
movq 0x308(%rcx), %rcx
testq %rcx, %rcx
je 0x1202f
movq 0x28(%rax), %rdi
callq *%rcx
cvtss2sd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x5450
movl $0x1, %eax
popq %rbx
retq
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0x12056
leaq 0x492b(%rip), %rsi      # 0x16976
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55a0
leaq 0x48e2(%rip), %rsi      # 0x1693f
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: SetWindowOpacity
static int SetWindowOpacity(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    float opacity = luaL_checknumber(L, 2);
    CheckPfn(L, SetWindowOpacity, 3, 3, 0);
    glfw.SetWindowOpacity(win->window, opacity);
    return 0;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x5230
movq 0x9f4b(%rip), %rax      # 0x1bfe8
movq 0x310(%rax), %rax
testq %rax, %rax
je 0x120bd
cvtsd2ss %xmm0, %xmm0
movq 0x28(%r14), %rdi
callq *%rax
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0x120ea
leaq 0x48fb(%rip), %rsi      # 0x169d4
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x55a0
leaq 0x48ac(%rip), %rsi      # 0x1699d
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/window.c
// Function: RequestWindowAttention
static int RequestWindowAttention(lua_State *L)
    {
    win_t *win = checkwindow(L, 1);
    CheckPfn(L, RequestWindowAttention, 3, 3, 0);
    glfw.RequestWindowAttention(win->window);
    return 0;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x5560
movq 0x9ec4(%rip), %rcx      # 0x1bfe8
movq 0x318(%rcx), %rcx
testq %rcx, %rcx
je 0x1213a
movq 0x28(%rax), %rdi
callq *%rcx
xorl %eax, %eax
popq %rbx
retq
movl $0x3, %edi
movl $0x3, %esi
xorl %edx, %edx
callq 0x5690
testl %eax, %eax
je 0x12161
leaq 0x48e2(%rip), %rsi      # 0x16a38
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x55a0
leaq 0x4893(%rip), %rsi      # 0x169fb
movq %rbx, %rdi
movl $0x3, %edx
movl $0x3, %ecx
xorl %r8d, %r8d
xorl %eax, %eax
popq %rbx
jmp 0x55a0
// File: /workspace/github_c_makefile_star2_O1/cirocosta[P]stress/src/print.c
// Function: thread_handler
void*
thread_handler(void* arg)
{
	thread_arg_t* targ = (thread_arg_t*)arg;
	char file_buffer[CHUNK_SIZE] = { 0 };
	unsigned long writes = targ->count * _STRESS_MB(1) / CHUNK_SIZE;

	memset(file_buffer, 65, CHUNK_SIZE);
	while (writes-- > 0) {
		_STRESS_MUST(write(targ->fd, file_buffer, CHUNK_SIZE) != -1,
		             "Couldn't properly write chunk to fd %d",
		             targ->fd);
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rdi, %rbx
movq %rsp, %r14
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rdi
xorl %esi, %esi
callq 0x10b0
movslq (%rbx), %r12
notq %r12
shlq $0x8, %r12
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rdi
movl $0x41, %esi
callq 0x10b0
movabsq $-0xfffffffffff01, %r15 # imm = 0xFFF00000000000FF
orq %r12, %r15
incq %r15
je 0x1b2a
movl 0x4(%rbx), %edi
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rsi
callq 0x1060
cmpq $-0x1, %rax
jne 0x1b07
movq %rbx, %rdi
callq 0x13ac
xorl %eax, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/cirocosta[P]stress/src/print.c
// Function: main
int
main(int argc, char** argv)
{
	stress_args_t args = { 0 };
	thread_arg_t stdout_arg = { .count = 0, .fd = STDOUT_FILENO };
	thread_arg_t stderr_arg = { .count = 0, .fd = STDERR_FILENO };
	pthread_t threads[2];

	setbuf(stdout, NULL);
	setbuf(stderr, NULL);

	stress_parse_args(argc, argv, &args);

	stdout_arg.count = args.n;
	stderr_arg.count = args.n;

	_STRESS_MUST(
	  (!pthread_create(&threads[0], NULL, &thread_handler, &stdout_arg)),
	  "Unexpected error creating stdout thread");
	_STRESS_MUST(
	  (!pthread_create(&threads[1], NULL, &thread_handler, &stderr_arg)),
	  "Unexpected error creating stderr thread");

	_STRESS_MUST((!pthread_join(threads[0], NULL)),
	             "Unexpected error waiting for stdout thread");

	_STRESS_MUST((!pthread_join(threads[1], NULL)),
	             "Unexpected error waiting for stderr thread");

	stress_wait_until_signalized();

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2038, %rsp           # imm = 0x2038
movq %rsi, %r14
movl %edi, %ebp
leaq 0x30(%rsp), %rbx
movl $0x2008, %edx           # imm = 0x2008
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10b0
movabsq $0x100000000, %rax      # imm = 0x100000000
leaq 0x28(%rsp), %r15
movq %rax, (%r15)
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, 0x8(%rsp)
movq 0x243f(%rip), %rax      # 0x3fc8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x1090
movq 0x245e(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x1090
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1889
movl (%rbx), %eax
movl %eax, (%r15)
movl %eax, 0x8(%rsp)
leaq -0x106(%rip), %rdx      # 0x1abb
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x10f0
testl %eax, %eax
jne 0x1c25
leaq 0x18(%rsp), %rdi
leaq -0x125(%rip), %rdx      # 0x1abb
leaq 0x8(%rsp), %rcx
xorl %esi, %esi
callq 0x10f0
testl %eax, %eax
jne 0x1c2a
movq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x1140
testl %eax, %eax
jne 0x1c2f
movq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x1140
testl %eax, %eax
jne 0x1c34
callq 0x19b2
xorl %eax, %eax
addq $0x2038, %rsp           # imm = 0x2038
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x1466
callq 0x151c
callq 0x15d2
callq 0x1688
// File: /workspace/github_c_makefile_star2_O1/esheldon[P]xshear/src/cosmo.c
// Function: cosmo_print
void cosmo_print(Cosmo* c) {
    wlog("    H0: %lf\n", c->H0);
    wlog("    DH: %lf\n", c->DH);
    wlog("    flat: %d\n", c->flat);
    wlog("    omega_m: %lf\n", c->omega_m);
    wlog("    omega_l: %lf\n", c->omega_l);
    wlog("    omega_k: %lf\n", c->omega_k);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xbc92(%rip), %r14      # 0xdff8
movq (%r14), %rdi
movsd 0x8(%rbx), %xmm0
leaq 0x6e0b(%rip), %rsi      # 0x9180
movb $0x1, %al
callq 0x21a0
movq (%r14), %rdi
movsd 0x10(%rbx), %xmm0
leaq 0x6e02(%rip), %rsi      # 0x918d
movb $0x1, %al
callq 0x21a0
movq (%r14), %rdi
movl (%rbx), %edx
leaq 0x6dfc(%rip), %rsi      # 0x919a
xorl %eax, %eax
callq 0x21a0
movq (%r14), %rdi
movsd 0x18(%rbx), %xmm0
leaq 0x6df4(%rip), %rsi      # 0x91a8
movb $0x1, %al
callq 0x21a0
movq (%r14), %rdi
movsd 0x20(%rbx), %xmm0
leaq 0x6df0(%rip), %rsi      # 0x91ba
movb $0x1, %al
callq 0x21a0
movq (%r14), %rdi
movsd 0x28(%rbx), %xmm0
leaq 0x6dec(%rip), %rsi      # 0x91cc
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21a0
// File: /workspace/github_c_makefile_star2_O1/esheldon[P]xshear/src/lens.c
// Function: lcat_print_one
void lcat_print_one(LensCatalog* lcat, size_t el) {
    Lens* lens = &lcat->data[el];
    wlog("element %ld of lcat:\n", el);
    wlog("    ra:        %lf\n", lens->ra);
    wlog("    dec:       %lf\n", lens->dec);
    wlog("    z:         %lf\n", lens->z);
    wlog("    da:        %lf\n", lens->da);
    wlog("    maskflags: %ld\n", lens->maskflags);
    wlog("    sinlam:    %lf\n", lens->sinlam);
    wlog("    coslam:    %lf\n", lens->coslam);
    wlog("    sineta:    %lf\n", lens->sineta);
    wlog("    coseta:    %lf\n", lens->coseta);
    wlog("    n(hpix):   %lu", lens->hpix->size);
    wlog(" hpix[0]: %ld hpix[%lu]: %ld\n", 
            lens->hpix->data[0],
            lens->hpix->size-1,
            lens->hpix->data[lens->hpix->size-1]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rdx
movq 0x8(%rdi), %rbx
movq %rsi, %r14
shlq $0x7, %r14
movq 0xb8d2(%rip), %r15      # 0xdff8
movq (%r15), %rdi
leaq 0x6bea(%rip), %rsi      # 0x931a
xorl %eax, %eax
callq 0x21a0
movq (%r15), %rdi
movsd 0x8(%rbx,%r14), %xmm0
leaq 0x6be8(%rip), %rsi      # 0x9330
movb $0x1, %al
callq 0x21a0
movq (%r15), %rdi
movsd 0x10(%rbx,%r14), %xmm0
leaq 0x6be4(%rip), %rsi      # 0x9344
movb $0x1, %al
callq 0x21a0
movq (%r15), %rdi
movsd 0x18(%rbx,%r14), %xmm0
leaq 0x6be0(%rip), %rsi      # 0x9358
movb $0x1, %al
callq 0x21a0
movq (%r15), %rdi
movsd 0x20(%rbx,%r14), %xmm0
leaq 0x6bdc(%rip), %rsi      # 0x936c
movb $0x1, %al
callq 0x21a0
movq (%r15), %rdi
movq 0x48(%rbx,%r14), %rdx
leaq 0x6bda(%rip), %rsi      # 0x9380
xorl %eax, %eax
callq 0x21a0
movq (%r15), %rdi
movsd 0x60(%rbx,%r14), %xmm0
leaq 0x6bd6(%rip), %rsi      # 0x9394
movb $0x1, %al
callq 0x21a0
movq (%r15), %rdi
movsd 0x68(%rbx,%r14), %xmm0
leaq 0x6bd2(%rip), %rsi      # 0x93a8
movb $0x1, %al
callq 0x21a0
movq (%r15), %rdi
movsd 0x70(%rbx,%r14), %xmm0
leaq 0x6bce(%rip), %rsi      # 0x93bc
movb $0x1, %al
callq 0x21a0
movq (%r15), %rdi
movsd 0x78(%rbx,%r14), %xmm0
leaq 0x6bca(%rip), %rsi      # 0x93d0
movb $0x1, %al
callq 0x21a0
movq (%r15), %rdi
movq 0x50(%rbx,%r14), %rax
movq (%rax), %rdx
leaq 0x6bc5(%rip), %rsi      # 0x93e4
xorl %eax, %eax
callq 0x21a0
movq (%r15), %rdi
movq 0x50(%rbx,%r14), %rax
movq (%rax), %rcx
movq 0x10(%rax), %rax
movq (%rax), %rdx
movq -0x8(%rax,%rcx,8), %r8
decq %rcx
leaq 0x6bb0(%rip), %rsi      # 0x93f7
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x21a0
// File: /workspace/github_c_makefile_star2_O1/esheldon[P]xshear/src/lensum.c
// Function: lensum_print
void lensum_print(Lensum* self) {

    wlog("  index:    %lld\n", self->index);
    wlog("  weight:   %g\n",  self->weight);
    wlog("  totpairs: %lld\n", self->totpairs);
    wlog("  nbin:     %lld\n", self->nbin);                            
    wlog("  bin       npair          wsum          ssum       meanr          dsum          osum");
    wlog("     dsensum_w     osensum_w     dsensum_s     osensum_s  DeltaSigma");
    wlog("\n");

    for (size_t i=0; i<self->nbin; i++) {
        //wlog("  %3lu %11ld %15.6lf %15.6lf %15.6lf %15.6lf", 
        wlog("  %3lu %11lld %13.6g %13.6g %11.6g %13.6g %13.6g %13.6g %13.6g %13.6g %13.6g %11.6g", 
             i,
             self->npair[i],
             self->wsum[i],
             self->ssum[i],
             self->rsum[i]/max(self->wsum[i],DBL_MIN),
             self->dsum[i],
             self->osum[i],
             self->dsensum_w[i],
             self->osensum_w[i],
             self->dsensum_s[i],
             self->osensum_s[i],
             self->dsum[i]/max(self->dsensum_w[i],DBL_MIN)
              );
        wlog("\n");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0xb4cb(%rip), %r12      # 0xdff8
movq (%r12), %rdi
movq 0x10(%rbx), %rdx
leaq 0x69a5(%rip), %rsi      # 0x94e1
xorl %eax, %eax
callq 0x21a0
movq (%r12), %rdi
movsd 0x18(%rbx), %xmm0
leaq 0x69a0(%rip), %rsi      # 0x94f3
movb $0x1, %al
callq 0x21a0
movq (%r12), %rdi
movq 0x20(%rbx), %rdx
leaq 0x699a(%rip), %rsi      # 0x9503
xorl %eax, %eax
callq 0x21a0
movq (%r12), %rdi
movq 0x28(%rbx), %rdx
leaq 0x6996(%rip), %rsi      # 0x9515
xorl %eax, %eax
callq 0x21a0
movq (%r12), %rcx
leaq 0x6996(%rip), %rdi      # 0x9527
pushq $0x55
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
callq 0x2290
movq (%r12), %rcx
leaq 0x69d2(%rip), %rdi      # 0x957d
pushq $0x44
popq %rsi
movq %r14, %rdx
callq 0x2290
movq (%r12), %rsi
pushq $0xa
popq %rdi
callq 0x2150
cmpq $0x0, 0x28(%rbx)
je 0x2c9c
xorl %r14d, %r14d
leaq 0x69eb(%rip), %r15      # 0x95c2
pushq $0xa
popq %rbp
movq (%r12), %rdi
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rdx
movq (%rax,%r14,8), %rcx
movq 0x40(%rbx), %rax
movsd (%rax,%r14,8), %xmm0
movq 0x48(%rbx), %rax
movsd (%rax,%r14,8), %xmm1
movsd (%rdx,%r14,8), %xmm2
movapd %xmm0, %xmm3
movsd 0x6807(%rip), %xmm10    # 0x9418
maxsd %xmm10, %xmm3
divsd %xmm3, %xmm2
movq 0x50(%rbx), %rax
movsd (%rax,%r14,8), %xmm3
movq 0x58(%rbx), %rax
movsd (%rax,%r14,8), %xmm4
movq 0x60(%rbx), %rax
movsd (%rax,%r14,8), %xmm5
movq 0x68(%rbx), %rax
movsd (%rax,%r14,8), %xmm6
movq 0x70(%rbx), %rax
movsd (%rax,%r14,8), %xmm7
movq 0x78(%rbx), %rax
movsd (%rax,%r14,8), %xmm8
movapd %xmm5, %xmm9
maxsd %xmm10, %xmm9
movapd %xmm3, %xmm10
divsd %xmm9, %xmm10
movsd %xmm10, 0x8(%rsp)
movsd %xmm8, (%rsp)
movq %r15, %rsi
movq %r14, %rdx
movb $0x8, %al
callq 0x21a0
movq (%r12), %rsi
movl %ebp, %edi
callq 0x2150
incq %r14
cmpq 0x28(%rbx), %r14
jb 0x2bda
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/esheldon[P]xshear/src/healpix.c
// Function: hpix_new
HealPix* hpix_new(int64 nside) {
    HealPix* hpix;

    if (nside < 1 || nside > NS_MAX) {
        fprintf(stderr,"nside %ld out of range [%d, %d]\n", nside, 1, NS_MAX);
        exit(EXIT_FAILURE);
    }

    hpix = malloc(sizeof(HealPix));
    if (hpix == NULL) {
        printf("Could not allocate HealPix\n");
        exit(EXIT_FAILURE);
    }

    hpix->nside = nside;
    hpix->npix = hpix_npix(nside);
    hpix->half_npix = hpix->npix/2;
    hpix->area = hpix_area(nside);
    hpix->ncap = 2*nside*(nside-1); // number of pixels in the north polar cap

    return hpix;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq $-0x10000001, %rax      # imm = 0xEFFFFFFF
leaq (%rdi,%rax), %rcx
cmpq %rax, %rcx
jbe 0x3d6e
movl $0x28, %edi
callq 0x2200
testq %rax, %rax
je 0x3d76
movq %rbx, (%rax)
movq %rbx, %rcx
imulq %rbx, %rcx
shlq $0x2, %rcx
leaq (%rcx,%rcx,2), %rcx
movq %rcx, 0x8(%rax)
cvtsi2sd %rcx, %xmm0
shrq %rcx
movq %rcx, 0x10(%rax)
movsd 0x52b4(%rip), %xmm1     # 0x9008
divsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rax)
leaq -0x1(%rbx), %rcx
imulq %rbx, %rcx
addq %rcx, %rcx
movq %rcx, 0x18(%rax)
popq %rbx
retq
movq %rbx, %rdi
callq 0x22e0
leaq 0x53c7(%rip), %rdi      # 0x9144
callq 0x2080
movl $0x1, %edi
callq 0x2280
// File: /workspace/github_c_makefile_star2_O1/esheldon[P]xshear/src/healpix.c
// Function: hpix_eq2xyz
void hpix_eq2xyz(double ra, double dec, double* x, double* y, double* z) {

    double theta=0, phi=0;

    hpix_radec_degrees_to_thetaphi_radians(ra, dec, &theta, &phi);

    double sintheta = sin(theta);
    *x = sintheta * cos(phi);
    *y = sintheta * sin(phi);
    *z = cos(theta);

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %eax, %eax
leaq 0x28(%rsp), %r12
movq %rax, (%r12)
leaq 0x20(%rsp), %r13
movq %rax, (%r13)
movq %r12, %rdi
movq %r13, %rsi
callq 0x47d8
movsd (%r12), %xmm0
movsd %xmm0, 0x18(%rsp)
callq 0x2250
movsd %xmm0, 0x8(%rsp)
movsd (%r13), %xmm0
movsd %xmm0, 0x10(%rsp)
callq 0x2140
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, (%r15)
movsd 0x10(%rsp), %xmm0
callq 0x2250
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, (%r14)
movsd 0x18(%rsp), %xmm0
callq 0x2140
movsd %xmm0, (%rbx)
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/esheldon[P]xshear/src/healpix.c
// Function: hpix_ring_num
int64 hpix_ring_num(const HealPix* hpix, double z) {
    int64 nside=hpix->nside;

    // rounds double to nearest long long int
    int64 iring = llrintl( nside*(2.-1.5*z) );

    // north cap
    if (z > M_TWOTHIRD) {
        iring = llrintl( nside* sqrt(3.*(1.-z)) );
        if (iring == 0) {
            iring = 1;
        }
    } else if (z < -M_TWOTHIRD) {
        iring = llrintl( nside* sqrt(3.*(1.+z)) );

        if (iring == 0) {
            iring = 1;
        }
        iring = 4*nside - iring;
    }

    return iring;
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movsd %xmm0, 0x20(%rsp)
movq (%rdi), %rbx
cvtsi2sd %rbx, %xmm1
movsd 0x4e17(%rip), %xmm2     # 0x9058
mulsd %xmm0, %xmm2
addsd 0x4ddb(%rip), %xmm2     # 0x9028
movsd %xmm1, 0x18(%rsp)
mulsd %xmm1, %xmm2
movsd %xmm2, 0x38(%rsp)
fldl 0x38(%rsp)
fstpt (%rsp)
callq 0x21e0
movsd 0x20(%rsp), %xmm1
ucomisd 0x4de9(%rip), %xmm1     # 0x9060
jbe 0x429d
movsd 0x4d9f(%rip), %xmm0     # 0x9020
subsd %xmm1, %xmm0
mulsd 0x4d8b(%rip), %xmm0     # 0x9018
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x42ce
sqrtsd %xmm0, %xmm0
jmp 0x42d3
movsd 0x4dc3(%rip), %xmm0     # 0x9068
ucomisd %xmm1, %xmm0
jbe 0x4324
addsd 0x4d6d(%rip), %xmm1     # 0x9020
mulsd 0x4d5d(%rip), %xmm1     # 0x9018
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x42f5
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
jmp 0x42fe
callq 0x22b0
mulsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
fldl 0x28(%rsp)
fstpt (%rsp)
callq 0x21e0
cmpq $0x1, %rax
adcq $0x0, %rax
jmp 0x4324
movapd %xmm1, %xmm0
callq 0x22b0
mulsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
fldl 0x30(%rsp)
fstpt (%rsp)
callq 0x21e0
shlq $0x2, %rbx
cmpq $0x1, %rax
sbbq %rax, %rbx
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/esheldon[P]xshear/src/healpix.c
// Function: hpix_radec_degrees_to_thetaphi_radians
void hpix_radec_degrees_to_thetaphi_radians(double ra, double dec, double* theta, double* phi) {

    if (ra < 0.0 || ra > 360.) {
        printf("ra %g out of range [0,360.]\n", ra);
        exit(EXIT_FAILURE);
    }
    if (dec < -90. || dec > 90.) {
        printf("dec %g out of range [-90.,90.]\n", dec);
        exit(EXIT_FAILURE);
    }

    *phi = ra*D2R;
    *theta = -dec*D2R + M_PI_2;
}

// Assembly:
pushq %rax
xorpd %xmm2, %xmm2
ucomisd %xmm0, %xmm2
ja 0x4829
ucomisd 0x48ad(%rip), %xmm0     # 0x9098
ja 0x4829
movapd 0x48cb(%rip), %xmm2     # 0x90c0
andpd %xmm1, %xmm2
ucomisd 0x489f(%rip), %xmm2     # 0x90a0
ja 0x4832
movsd 0x489d(%rip), %xmm2     # 0x90a8
mulsd %xmm2, %xmm0
movsd %xmm0, (%rsi)
mulsd %xmm2, %xmm1
movsd 0x4811(%rip), %xmm0     # 0x9030
subsd %xmm1, %xmm0
movsd %xmm0, (%rdi)
popq %rax
retq
leaq 0x48d7(%rip), %rdi      # 0x9107
jmp 0x483d
leaq 0x48eb(%rip), %rdi      # 0x9124
movapd %xmm1, %xmm0
movb $0x1, %al
callq 0x20f0
movl $0x1, %edi
callq 0x2280
nop
// File: /workspace/github_c_makefile_star2_O1/esheldon[P]xshear/src/cosmo.c
// Function: cosmo_new
Cosmo* cosmo_new(
        double H0, 
        int flat,
        double omega_m,
        double omega_l,
        double omega_k) {

    Cosmo* c;
    c=(Cosmo* ) calloc(1,sizeof(Cosmo));

    if (c == NULL) {
        return NULL;
    }

    c->H0=H0;
    c->DH=CLIGHT/H0;
    c->flat=flat;
    c->omega_m=omega_m;
    c->omega_l=omega_l;
    c->omega_k=omega_k;

    c->tcfac = 0;
    if (c->flat != 1) {
        if (c->omega_k > 0) {
            c->tcfac = sqrt(c->omega_k)/c->DH;
        } else {
            c->tcfac = sqrt(-c->omega_k)/c->DH;
        }
    }

    gauleg(-1.0,1.0, NPTS,  c->x,  c->w);
    gauleg(-1.0,1.0, VNPTS, c->vx, c->vw);

    return c;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movaps %xmm3, (%rsp)
movsd %xmm2, 0x20(%rsp)
movsd %xmm1, 0x18(%rsp)
movl %edi, %ebp
movsd %xmm0, 0x10(%rsp)
movl $0x1, %edi
movl $0x128, %esi            # imm = 0x128
callq 0x2170
testq %rax, %rax
je 0x48f0
movq %rax, %rbx
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x8(%rax)
movsd 0x48c8(%rip), %xmm2     # 0x9160
divsd %xmm0, %xmm2
movsd %xmm2, 0x10(%rax)
movl %ebp, (%rax)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x18(%rax)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x20(%rax)
movapd (%rsp), %xmm0
movsd %xmm0, 0x28(%rax)
movq $0x0, 0x30(%rax)
cmpl $0x1, %ebp
je 0x490c
movapd 0x47d8(%rip), %xmm1     # 0x90b0
xorpd %xmm0, %xmm1
maxsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x48f4
sqrtsd %xmm0, %xmm0
jmp 0x4903
xorl %ebx, %ebx
jmp 0x4959
movsd %xmm2, (%rsp)
callq 0x22b0
movsd (%rsp), %xmm2
divsd %xmm2, %xmm0
movsd %xmm0, 0x30(%rbx)
leaq 0x38(%rbx), %rsi
leaq 0x60(%rbx), %rdx
movsd 0x471c(%rip), %xmm0     # 0x9038
movsd 0x46fc(%rip), %xmm1     # 0x9020
movl $0x5, %edi
callq 0x4963
leaq 0x88(%rbx), %rsi
movq %rbx, %rdx
addq $0xd8, %rdx
movsd 0x46f1(%rip), %xmm0     # 0x9038
movsd 0x46d1(%rip), %xmm1     # 0x9020
movl $0xa, %edi
callq 0x4963
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/esheldon[P]xshear/src/cosmo.c
// Function: ez_inverse_integral
double ez_inverse_integral(Cosmo* c, double zmin, double zmax) {
    int i;
    double f1, f2, z, ezinv_int=0, ezinv;

    f1 = (zmax-zmin)/2.;
    f2 = (zmax+zmin)/2.;

    ezinv_int = 0.0;

    for (i=0;i<NPTS;i++) {
        z = c->x[i]*f1 + f2;

        ezinv = ez_inverse(c, z);
        ezinv_int += f1*ezinv*c->w[i];
    }

    return ezinv_int;

}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movapd %xmm1, %xmm3
subsd %xmm0, %xmm3
movsd 0x448e(%rip), %xmm2     # 0x9070
mulsd %xmm2, %xmm3
movsd %xmm3, 0x8(%rsp)
addsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
movsd %xmm0, 0x10(%rsp)
xorpd %xmm0, %xmm0
movl $0x7, %r14d
movsd %xmm0, (%rsp)
movsd (%rbx,%r14,8), %xmm0
mulsd 0x8(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movq %rbx, %rdi
callq 0x4d50
mulsd 0x8(%rsp), %xmm0
mulsd 0x28(%rbx,%r14,8), %xmm0
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%rsp), %xmm0
incq %r14
cmpq $0xc, %r14
jne 0x4c04
addq $0x18, %rsp
popq %rbx
popq %r14
retq