LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_checkdevicesizelist
VkDeviceSize* checkdevicesizelist(lua_State *L, int arg, uint32_t *count, int *err)
    {
    const char *s;
    VkDeviceSize* list;
    uint32_t 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_EMPTY; return NULL; }

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

    for(i=0; i<*count; i++)
        {
        lua_rawgeti(L, arg, i+1);
        if(lua_type(L, -1) == LUA_TSTRING)
            {
            s = lua_tostring(L, -1);
            if(strcmp(s, "whole size") == 0)
                list[i] = VK_WHOLE_SIZE;
            else *err = ERR_VALUE;
            }
        else if(lua_isinteger(L, -1))
            list[i] = lua_tointeger(L, -1);
        else
            *err = ERR_TYPE;
        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 %rcx, %rbx
movl %esi, %ebp
movq %rdx, 0x10(%rsp)
andl $0x0, (%rdx)
movq %rdi, %r15
andl $0x0, (%rcx)
callq 0x1a110
testl %eax, %eax
jle 0x4c8b1
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a110
cmpl $0x5, %eax
jne 0x4c8b9
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a140
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
testl %eax, %eax
je 0x4c8c1
movl %eax, %esi
shlq $0x3, %rsi
callq 0x18050
testq %rax, %rax
je 0x4c8c9
movq %rax, 0x8(%rsp)
xorl %r12d, %r12d
pushq $-0x1
popq %r14
movq 0x10(%rsp), %rax
movl (%rax), %eax
cmpq %rax, %r12
jae 0x4c8e8
movq %r12, %r13
incq %r12
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x18970
movq %r15, %rdi
movl %r14d, %esi
callq 0x1a110
movq %r15, %rdi
cmpl $0x4, %eax
jne 0x4c84f
movl %r14d, %esi
xorl %edx, %edx
callq 0x18680
movq %rax, %rdi
leaq 0x45327(%rip), %rsi     # 0x91b65
callq 0x18fe0
testl %eax, %eax
je 0x4c873
movl $0xfffffffd, (%rbx)     # imm = 0xFFFFFFFD
jmp 0x4c885
movl %r14d, %esi
callq 0x1a5e0
testl %eax, %eax
je 0x4c87f
movq %r15, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x18640
movq 0x8(%rsp), %rcx
movq %rax, (%rcx,%r13,8)
jmp 0x4c885
movq 0x8(%rsp), %rax
orq $-0x1, (%rax,%r13,8)
jmp 0x4c885
movl $0xfffffffe, (%rbx)     # imm = 0xFFFFFFFE
movq %r15, %rdi
pushq $-0x2
popq %rsi
callq 0x18150
cmpl $0x0, (%rbx)
pushq $-0x1
popq %r14
je 0x4c7f4
movq 0x8(%rsp), %rsi
callq 0x182e0
movq 0x10(%rsp), %rax
andl $0x0, (%rax)
jmp 0x4c8d7
movl $0x1, (%rbx)
jmp 0x4c8d7
movl $0xfffffffc, (%rbx)     # imm = 0xFFFFFFFC
jmp 0x4c8d7
movl $0xfffffffb, (%rbx)     # imm = 0xFFFFFFFB
jmp 0x4c8d7
movq 0x10(%rsp), %rax
andl $0x0, (%rax)
movl $0xfffffffa, (%rbx)     # imm = 0xFFFFFFFA
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rax
jmp 0x4c8d9
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_pushdevicesizelist
void pushdevicesizelist(lua_State *L, VkDeviceSize *list, uint32_t count)
    {
    uint32_t i;
    lua_newtable(L);
    for(i=0; i<count; i++)
        {
        lua_pushinteger(L, list[i]);
        lua_rawseti(L, -2, i+1);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
movl %ebp, %r12d
negq %r12
pushq $0x1
popq %r15
pushq $-0x2
popq %rbp
leaq (%r12,%r15), %rax
cmpq $0x1, %rax
je 0x4c93e
movq -0x8(%rbx,%r15,8), %rsi
movq %r14, %rdi
callq 0x18b50
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x19120
incq %r15
jmp 0x4c915
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_checkfloatlist
float* checkfloatlist(lua_State *L, int arg, uint32_t *count, int *err)
    {
    float* list;
    uint32_t 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_EMPTY; return NULL; }

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movl %esi, %ebp
movq %rdx, (%rsp)
andl $0x0, (%rdx)
movq %rdi, %r15
andl $0x0, (%rcx)
callq 0x1a110
testl %eax, %eax
jle 0x4ca1d
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a110
cmpl $0x5, %eax
jne 0x4ca21
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a140
movq (%rsp), %rcx
movl %eax, (%rcx)
testl %eax, %eax
je 0x4ca25
movl %eax, %esi
shlq $0x2, %rsi
callq 0x18050
testq %rax, %rax
je 0x4ca3f
movq %rax, %r13
movl %ebp, 0xc(%rsp)
movq %rbx, 0x10(%rsp)
xorl %r14d, %r14d
pushq $-0x2
popq %rbp
pushq $-0x1
popq %r12
movq (%rsp), %rax
movl (%rax), %eax
cmpq %rax, %r14
jae 0x4ca2d
leaq 0x1(%r14), %rbx
movq %r15, %rdi
movl 0xc(%rsp), %esi
movq %rbx, %rdx
callq 0x18970
movq %r15, %rdi
movl %r12d, %esi
callq 0x18c00
testl %eax, %eax
je 0x4ca44
movq %r15, %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0x18ec0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r13,%r14,4)
movq %r15, %rdi
movl %ebp, %esi
callq 0x18150
movq %rbx, %r14
jmp 0x4c9c9
pushq $0x1
jmp 0x4ca27
pushq $-0x4
jmp 0x4ca27
pushq $-0x5
popq %rbp
movl %ebp, (%rbx)
xorl %r13d, %r13d
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x6
popq %rbp
jmp 0x4ca5b
movq %r15, %rdi
movl %ebp, %esi
callq 0x18150
movq %r13, %rsi
callq 0x182e0
movq 0x10(%rsp), %rbx
movq (%rsp), %rax
andl $0x0, (%rax)
jmp 0x4ca28
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_pushfloatlist
void pushfloatlist(lua_State *L, float *list, uint32_t count)
    {
    uint32_t i;
    lua_newtable(L);
    for(i=0; i<count; i++)
        {
        lua_pushnumber(L, list[i]);
        lua_rawseti(L, -2, i+1);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
xorl %esi, %esi
xorl %edx, %edx
callq 0x187d0
movl %ebp, %r12d
negq %r12
pushq $0x1
popq %r15
pushq $-0x2
popq %rbp
leaq (%r12,%r15), %rax
cmpq $0x1, %rax
je 0x4cab5
cvtss2sd -0x4(%rbx,%r15,4), %xmm0
movq %r14, %rdi
callq 0x19310
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x19120
incq %r15
jmp 0x4ca8a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_testboolean
int testboolean(lua_State *L, int arg, int *err)
    {
    if(!lua_isboolean(L, arg))
        { *err = ERR_TYPE; return 0; }
    *err = 0;
    return lua_toboolean(L, arg); // ? VK_TRUE : VK_FALSE;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x1a110
cmpl $0x1, %eax
jne 0x4cb88
andl $0x0, (%rbx)
movq %r14, %rdi
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x18320
movl $0xfffffffe, (%rbx)     # imm = 0xFFFFFFFE
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_checksizeorwholesize
VkDeviceSize checksizeorwholesize(lua_State *L, int arg)
    {
    const char* s;
    if(lua_type(L, arg) == LUA_TSTRING)
        {
        s = lua_tostring(L, arg);
        if(strcmp(s, "whole size") != 0)
            return luaL_argerror(L, arg, badvalue(L, s));
        return VK_WHOLE_SIZE;
        }
    return (VkDeviceSize)luaL_checkinteger(L, arg);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x1a110
cmpl $0x4, %eax
jne 0x4cc1a
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x18680
movq %rax, %r15
leaq 0x44f7c(%rip), %rsi     # 0x91b65
movq %rax, %rdi
callq 0x18fe0
testl %eax, %eax
je 0x4cc29
leaq 0x32dea(%rip), %rsi     # 0x7f9e6
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x18e90
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
callq 0x18420
cltq
jmp 0x4cc2c
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x190d0
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_testtimeout
uint64_t testtimeout(lua_State *L, int arg, int *err)
    {
    const char* s;
    uint64_t val;
    int isnum;
    int t = lua_type(L, arg);
    *err = 0;
    switch(t)
        {
        case LUA_TNONE:
        case LUA_TNIL:
                return UINT64_MAX;
        case LUA_TSTRING:   
                s = lua_tostring(L, arg);
                if(strcmp(s, "blocking") == 0) return UINT64_MAX;
                break;
        case LUA_TNUMBER:
                val = lua_tointegerx(L, arg, &isnum);
                if(isnum) return val;
        default:
            break;
        }
    *err = ERR_VALUE;
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
callq 0x1a110
andl $0x0, (%rbx)
pushq $-0x1
popq %r14
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x4ccac
cmpl $0x3, %eax
je 0x4cc85
cmpl $0x4, %eax
jne 0x4cca3
movq %r15, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x18680
leaq 0x44f0a(%rip), %rsi     # 0x91b81
movq %rax, %rdi
callq 0x18fe0
testl %eax, %eax
jne 0x4cca3
jmp 0x4ccac
leaq 0xc(%rsp), %r12
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x18640
cmpl $0x0, (%r12)
je 0x4cca3
movq %rax, %r14
jmp 0x4ccac
movl $0xfffffffd, (%rbx)     # imm = 0xFFFFFFFD
xorl %r14d, %r14d
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_checktimeout
uint64_t checktimeout(lua_State *L, int arg)
    {
    const char* s;
    int t = lua_type(L, arg);
    switch(t)
        {
        case LUA_TNONE:
        case LUA_TNIL:
                return UINT64_MAX;
        case LUA_TSTRING:   
                s = lua_tostring(L, arg);
                if(strcmp(s, "blocking") == 0) return UINT64_MAX;
                return luaL_argerror(L, arg, badvalue(L, s));
        default:
            break;
        }
    return (uint64_t)luaL_checkinteger(L, arg);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x1a110
pushq $-0x1
popq %r15
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x4cd25
cmpl $0x4, %eax
jne 0x4cd34
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x18680
movq %rax, %r12
leaq 0x44e8c(%rip), %rsi     # 0x91b81
movq %rax, %rdi
callq 0x18fe0
testl %eax, %eax
je 0x4cd25
leaq 0x32cde(%rip), %rsi     # 0x7f9e6
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x18e90
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
callq 0x18420
movslq %eax, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x190d0
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/validation_cache.c
// Function: MergeValidationCaches
static int MergeValidationCaches(lua_State *L)
    {
    int err;
    uint32_t count;
    VkResult ec;
    ud_t *ud;
    VkValidationCacheEXT *source;
    VkValidationCacheEXT destination = checkvalidation_cache(L, 1, &ud);
    VkDevice device = ud->device;

    CheckDevicePfn(L, ud, MergeValidationCachesEXT);

    source = checkvalidation_cachelist(L, 2, &count, &err, NULL);
    if(err) return argerrorc(L, 2, err);

    ec = ud->ddt->MergeValidationCachesEXT(device, destination, count, source);
    Free(L, source);
    CheckError(L, ec);
    return 0;
# undef first
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x31e7b(%rip), %rcx     # 0x7ef4b
pushq $0x1
popq %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdx
callq 0x1a500
movq %rax, %r15
movq (%r14), %rax
movq 0x50(%rax), %rcx
cmpq $0x0, 0x4f8(%rcx)
je 0x4d139
movq 0x20(%rax), %r12
leaq 0x31e4c(%rip), %r9      # 0x7ef4b
xorl %r14d, %r14d
pushq $0x2
popq %rsi
leaq 0x4(%rsp), %rdx
leaq 0x14(%rsp), %rbp
movq %rbx, %rdi
movq %rbp, %rcx
xorl %r8d, %r8d
callq 0x19130
movl (%rbp), %edi
testl %edi, %edi
je 0x4d14c
callq 0x19950
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
jmp 0x4d190
leaq 0x44bf9(%rip), %rsi     # 0x91d39
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
jmp 0x4d190
movq %rax, %r13
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
movl 0x4(%rsp), %edx
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rcx
callq *0x4f8(%rax)
movl %eax, %ebp
movq %rbx, %rdi
movq %r13, %rsi
callq 0x182e0
testl %ebp, %ebp
je 0x4d193
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
movl %eax, %r14d
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/validation_cache.c
// Function: GetValidationCacheData
static int GetValidationCacheData(lua_State *L)
    {
    VkResult ec;
    size_t size;
    char *data;
    ud_t *ud;
    VkValidationCacheEXT validation_cache = checkvalidation_cache(L, 1, &ud);
    VkDevice device = ud->device;
    
    CheckDevicePfn(L, ud, GetValidationCacheDataEXT);

    /* first, get the size */
    ec = ud->ddt->GetValidationCacheDataEXT(device, validation_cache, &size, NULL);
    CheckError(L, ec);

    if(size == 0)
        {
        lua_pushstring(L, "");
        return 1;
        }
    
    data = (char*)Malloc(L, size);
    ec = ud->ddt->GetValidationCacheDataEXT(device, validation_cache, &size, data);
    if(ec)
        {
        Free(L, data);
        CheckError(L, ec); /* raises an error */
        return 0;
        }

    lua_pushlstring(L, data, size);
    Free(L, data);
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x31d90(%rip), %rcx     # 0x7ef4b
pushq $0x1
popq %rbp
leaq 0x8(%rsp), %r15
movl %ebp, %esi
movq %r15, %rdx
callq 0x1a500
movq %rax, %r14
movq (%r15), %rcx
movq 0x50(%rcx), %rax
movq 0x500(%rax), %rax
testq %rax, %rax
je 0x4d20e
movq 0x20(%rcx), %r15
movq %rsp, %rdx
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq *%rax
testl %eax, %eax
je 0x4d230
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
jmp 0x4d21f
leaq 0x44b52(%rip), %rsi     # 0x91d67
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
movl %eax, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x4d27b
movq %rbx, %rdi
callq 0x191f0
movq %rax, %r12
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
movq %rsp, %rdx
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rcx
callq *0x500(%rax)
testl %eax, %eax
je 0x4d28c
movl %eax, %r14d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x182e0
movq %rbx, %rdi
xorl %esi, %esi
movl %r14d, %edx
jmp 0x4d1ff
leaq 0x3a855(%rip), %rsi     # 0x87ad7
movq %rbx, %rdi
callq 0x1a2e0
jmp 0x4d221
movq (%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19770
movq %rbx, %rdi
movq %r12, %rsi
callq 0x182e0
jmp 0x4d221
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/validation_cache.c
// Function: freevalidation_cache
static int freevalidation_cache(lua_State *L, ud_t *ud)
    {
    VkValidationCacheEXT validation_cache = (VkValidationCacheEXT)ud->handle;
    const VkAllocationCallbacks *allocator = ud->allocator;
    VkDevice device = ud->device;
    if(!freeuserdata(L, ud))
        return 0; /* double call */
    TRACE_DELETE(validation_cache, "validation_cache");
    UD(device)->ddt->DestroyValidationCacheEXT(device, validation_cache, allocator);
    return 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq (%rsi), %rbx
movq 0x20(%rsi), %r15
movq 0x40(%rsi), %r14
callq 0x18d20
testl %eax, %eax
je 0x4d2fc
movq 0x6dccd(%rip), %rax     # 0xbaf98
cmpl $0x0, (%rax)
je 0x4d2e1
leaq 0x44a40(%rip), %rdi     # 0x91d17
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18960
movq %r15, %rdi
callq 0x19eb0
movq 0x50(%rax), %rax
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq *0x4f0(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/versions.c
// Function: VersionNumbers
static int VersionNumbers(lua_State *L)
/* major, minor, patch = version_numbers(ver) */
    {
    uint32_t ver = luaL_checkinteger(L, 1);
    lua_pushinteger(L, VK_API_VERSION_MAJOR(ver));
    lua_pushinteger(L, VK_API_VERSION_MINOR(ver));
    lua_pushinteger(L, VK_API_VERSION_PATCH(ver));
    lua_pushinteger(L, VK_API_VERSION_VARIANT(ver));
    return 4;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0x190d0
movq %rax, %r14
movl %r14d, %esi
shrl $0x16, %esi
andl $0x7f, %esi
movq %rbx, %rdi
callq 0x18b50
movl %r14d, %esi
shrl $0xc, %esi
andl $0x3ff, %esi            # imm = 0x3FF
movq %rbx, %rdi
callq 0x18b50
movl %r14d, %esi
andl $0xfff, %esi            # imm = 0xFFF
movq %rbx, %rdi
callq 0x18b50
shrl $0x1d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x18b50
pushq $0x4
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/versions.c
// Function: VersionString
static int VersionString(lua_State *L)
/* "major.minor.patch" = version_string(ver) */
    {
    uint32_t ver = luaL_checkinteger(L, 1);
    lua_pushfstring(L, "%d.%d.%d", 
        VK_VERSION_MAJOR(ver), VK_VERSION_MINOR(ver), VK_VERSION_PATCH(ver));
    return 1;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x190d0
movl %eax, %edx
shrl $0x16, %edx
movl %eax, %ecx
shrl $0xc, %ecx
andl $0x3ff, %ecx            # imm = 0x3FF
andl $0xfff, %eax            # imm = 0xFFF
leaq 0x4497c(%rip), %rsi     # 0x91e88
movq %rbx, %rdi
movl %eax, %r8d
xorl %eax, %eax
callq 0x18e90
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/versions.c
// Function: MakeVersion
static int MakeVersion(lua_State *L)
/* ver = make_version(major, minor, patch, [variant=0]) */
    {
    uint32_t major = luaL_checkinteger(L, 1);
    uint32_t minor = luaL_checkinteger(L, 2);
    uint32_t patch = luaL_checkinteger(L, 3);
    uint32_t variant = luaL_optinteger(L, 4, 0);
    uint32_t version = VK_MAKE_API_VERSION(variant, major, minor, patch);
    lua_pushinteger(L, version);
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x190d0
movq %rax, %r15
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x190d0
movq %rax, %r12
pushq $0x3
popq %rsi
movq %r14, %rdi
callq 0x190d0
movq %rax, %r13
pushq $0x4
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x19400
shll $0x1d, %eax
shll $0x16, %r15d
shll $0xc, %r12d
orl %r15d, %r12d
orl %eax, %r13d
orl %r12d, %r13d
movq %r14, %rdi
movq %r13, %rsi
callq 0x18b50
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/versions.c
// Function: EnumerateInstanceVersion
static int EnumerateInstanceVersion(lua_State *L)
    {
    VkResult ec;
    uint32_t version = VK_API_VERSION_1_0;
    if(vk.EnumerateInstanceVersion)
        {
        ec = vk.EnumerateInstanceVersion(&version);
        CheckError(L, ec);
        }
    lua_pushinteger(L, version);
    return 1;
    }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x400000, 0xc(%rsp)    # imm = 0x400000
movq 0x6d9fc(%rip), %rax     # 0xbafc0
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x4d5ee
leaq 0xc(%rsp), %rdi
callq *%rax
testl %eax, %eax
je 0x4d5f5
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18980
movq %rbx, %rdi
callq 0x199c0
jmp 0x4d604
movl $0x400000, %esi         # imm = 0x400000
jmp 0x4d5f9
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0x18b50
pushq $0x1
popq %rax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/zcheck.c
// Function: GetNumberDef_
static lua_Number GetNumberDef_(lua_State *L, int arg, const char *sname, lua_Number defval, int *err)
    {
    lua_Number val = defval;
    int arg_ = pushfield(L, arg, sname);
    *err = 0;
    if(lua_isnumber(L, arg_)) val = lua_tonumber(L, arg_);
    else if(!lua_isnoneornil(L, arg_)) *err = ERR_TYPE;
    popfield(L, arg_);
    if(*err) pushfielderror(sname);
    return val;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r15
movsd %xmm0, (%rsp)
movq %rdx, %rbx
movq %rdi, %r14
callq 0x4e1c0
movl %eax, %ebp
andl $0x0, (%r15)
movq %r14, %rdi
movl %eax, %esi
callq 0x18c00
movq %r14, %rdi
movl %ebp, %esi
testl %eax, %eax
je 0x4d7ef
xorl %edx, %edx
callq 0x18ec0
movsd %xmm0, (%rsp)
jmp 0x4d7ff
callq 0x1a110
testl %eax, %eax
jle 0x4d7ff
movl $0xfffffffe, (%r15)     # imm = 0xFFFFFFFE
pushq $-0x1
popq %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x19710
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x18150
movl (%r15), %edi
testl %edi, %edi
je 0x4d83a
callq 0x19950
leaq 0x447b8(%rip), %rsi     # 0x91fe2
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x18e90
movsd (%rsp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/zcheck.c
// Function: moonvulkan_znewarray
void* znewarray(lua_State *L, VkStructureType sType, size_t sz, uint32_t count, int *err)
/* Same as znew(), but for an array of contiguous structures. */
    {
    void *p = MallocNoErr(L, sz*count);
    if(p==NULL) { *err = ERR_MEMORY; return NULL; }
    if(sType != (VkStructureType)-1)
        {
        uint32_t i;
        uintptr_t pp = (uintptr_t)p;
        for(i=0; i < count; i++)
            {
            ((VkBaseOutStructure*)pp)->sType = sType;
            pp = pp + sz;
            }
        }
    *err = 0;
    return p;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movl %esi, %r15d
movl %ecx, %esi
imulq %rdx, %rsi
callq 0x18050
testq %rax, %rax
je 0x4db26
xorl %ecx, %ecx
cmpl $-0x1, %r15d
je 0x4db29
movq %rax, %rdx
subl $0x1, %ebp
jb 0x4db29
movl %r15d, (%rdx)
addq %r14, %rdx
jmp 0x4db19
pushq $-0x6
popq %rcx
movl %ecx, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/zcheck.c
// Function: moonvulkan_zfreearray_untyped
void zfreearray_untyped(lua_State *L, const void *p, size_t sz, uint32_t count, int base, void (*clearfunc)(lua_State *L, const void *p))
    {
    size_t i;
    uintptr_t pp = (uintptr_t)p;
    if(!p) return;
    if(clearfunc)
        {
        for(i=0; i<count; i++)
            {
            clearfunc(L, (void*)pp);
            pp = pp + sz;
            }
        }
    if(base) Free(L, (void*)p);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x4db95
movq %r9, %r15
movq %rsi, %rbx
movq %rdi, %r14
movl %r8d, 0x4(%rsp)
testq %r9, %r9
je 0x4db75
movq %rdx, %r12
movl %ecx, %ebp
movq %rbx, %r13
subq $0x1, %rbp
jb 0x4db75
movq %r14, %rdi
movq %r13, %rsi
callq *%r15
addq %r12, %r13
jmp 0x4db61
cmpl $0x0, 0x4(%rsp)
je 0x4db95
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x182e0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/zcheck.c
// Function: GetInteger_
static lua_Integer GetInteger_(lua_State *L, int arg, const char *sname, lua_Integer defval, int *err)
    {
    int isnum;
    lua_Integer val = defval;
    int arg_ = pushfield(L, arg, sname);
    *err = 0;
    if(!lua_isnoneornil(L, arg_))
        {
        val = lua_tointegerx(L, arg_, &isnum);
        if(!isnum) *err = ERR_TYPE;
        }
    popfield(L, arg_);
    if(*err)
        pushfielderror(sname);
    return val;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r15
callq 0x4e1c0
movl %eax, %ebp
andl $0x0, (%r12)
movq %r15, %rdi
movl %eax, %esi
callq 0x1a110
testl %eax, %eax
jle 0x4dc77
leaq 0x4(%rsp), %r13
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x18640
movq %rax, %r14
cmpl $0x0, (%r13)
jne 0x4dc77
movl $0xfffffffe, (%r12)     # imm = 0xFFFFFFFE
pushq $-0x1
popq %rdx
movq %r15, %rdi
movl %ebp, %esi
callq 0x19710
pushq $-0x2
popq %rsi
movq %r15, %rdi
callq 0x18150
movl (%r12), %edi
testl %edi, %edi
je 0x4dcb3
callq 0x19950
leaq 0x4433f(%rip), %rsi     # 0x91fe2
movq %r15, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x18e90
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/zcheck.c
// Function: GetFlags_
static VkFlags64 GetFlags_(lua_State *L, int arg, const char *sname, int *err)
/* always opt., defaults to 0 */
    {
    int arg_ = pushfield(L, arg, sname);
    VkFlags64 flags = testflags(L, arg_, err);
    popfield(L, arg_);
    if(*err == ERR_NOTPRESENT) { *err=0; return 0; }
    if(*err) pushfielderror(sname);
    return flags;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %rbx
movq %rdi, %r15
callq 0x4e1c0
movl %eax, %ebp
movq %r15, %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x1a640
movq %rax, %r14
pushq $-0x1
popq %rdx
movq %r15, %rdi
movl %ebp, %esi
callq 0x19710
pushq $-0x2
popq %rsi
movq %r15, %rdi
callq 0x18150
movl (%r12), %edi
testl %edi, %edi
je 0x4eca1
cmpl $0x1, %edi
jne 0x4ec85
andl $0x0, (%r12)
xorl %r14d, %r14d
jmp 0x4eca1
callq 0x19950
leaq 0x43351(%rip), %rsi     # 0x91fe2
movq %r15, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x18e90
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/zcheck.c
// Function: moonvulkan_zfreearray
void zfreearray(lua_State *L, const void *p, size_t sz, uint32_t count, int base)
/* Same as zfree(), but for an array of contiguous structures. */
    {
    size_t i;
    uintptr_t pp = (uintptr_t)p;
    if(!p) return;
    for(i=0; i<count; i++)
        {
        zfreeaux(L, (void*)pp);
        pp = pp + sz;
        }
    if(base) Free(L, (void*)p);
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x533bd
movl %r8d, %ebp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movl %ecx, %r13d
movq %rsi, %r12
subq $0x1, %r13
jb 0x533a0
movq %r14, %rdi
movq %r12, %rsi
callq 0x7ba95
addq %r15, %r12
jmp 0x5338a
testl %ebp, %ebp
je 0x533bd
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x182e0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/zcheck.c
// Function: GetBoolean_
static int GetBoolean_(lua_State *L, int arg, const char *sname, int *err)
/* always opt., defaults to 0 (false) */
    {
    int val = 0;
    int arg_ = pushfield(L, arg, sname);
    *err = 0;
    if(lua_isboolean(L, arg_))
        val = lua_toboolean(L, arg_);
    else if(!lua_isnoneornil(L, arg_))
        *err = ERR_TYPE;
    popfield(L, arg_);
    if(*err)
        pushfielderror(sname);
    return val;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %rbx
movq %rdi, %r14
callq 0x4e1c0
movl %eax, %r12d
andl $0x0, (%r15)
movq %r14, %rdi
movl %eax, %esi
callq 0x1a110
movq %r14, %rdi
movl %r12d, %esi
cmpl $0x1, %eax
jne 0x53eee
callq 0x18320
movl %eax, %ebp
jmp 0x53f00
callq 0x1a110
xorl %ebp, %ebp
testl %eax, %eax
jle 0x53f00
movl $0xfffffffe, (%r15)     # imm = 0xFFFFFFFE
pushq $-0x1
popq %rdx
movq %r14, %rdi
movl %r12d, %esi
callq 0x19710
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x18150
movl (%r15), %edi
testl %edi, %edi
je 0x53f3c
callq 0x19950
leaq 0x3e0b6(%rip), %rsi     # 0x91fe2
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x18e90
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/zcheck.c
// Function: ispresent_
static int ispresent_(lua_State *L, int arg, const char *sname)
#define ispresent(sname_) ispresent_(L, arg, (sname_))
/* Checks if field 'sname' is present in the table at arg */
    {
    int rc;
    lua_pushstring(L, sname);
    lua_rawget(L, arg);
    rc = lua_isnoneornil(L, -1) ? 0 : 1;
    lua_pop(L, 1);
    return rc;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq %rdx, %rsi
callq 0x1a2e0
movq %r14, %rdi
movl %ebx, %esi
callq 0x19680
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x1a110
xorl %ebx, %ebx
testl %eax, %eax
setg %bl
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x18150
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/zcheck.c
// Function: GetString_
static const char *GetString_(lua_State *L, int arg, const char *sname, const char *defval, int *err, size_t *len)
/* The caller must Free() the returned string (if not NULL).
 * If len!=NULL, sets len with the string length or with 0 if defval is used. */
    {
    const char *val = NULL;
    int arg_ = pushfield(L, arg, sname);
    int t_ = lua_type(L, arg_);
    *err = 0;
    if(len) *len = 0;
    if(t_ == LUA_TSTRING)
        val = Strdup(L, lua_tolstring(L, arg_, len));
    else if((t_ == LUA_TNONE)||(t_ == LUA_TNIL))
        {
        if(defval)
            val = Strdup(L, defval);
        else
            *err = ERR_NOTPRESENT;
        }
    else
        *err = ERR_TYPE;
    popfield(L, arg_);
    if(*err)
        pushfielderror(sname);
    return val;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r13
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %rbx
movq %rdi, %r14
callq 0x4e1c0
movl %eax, %ebp
movq %r14, %rdi
movl %eax, %esi
callq 0x1a110
andl $0x0, (%r15)
testq %r13, %r13
je 0x63e19
andq $0x0, (%r13)
cmpl $0x4, %eax
jne 0x63e33
movq %r14, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x18680
movq %r14, %rdi
movq %rax, %rsi
jmp 0x63e45
incl %eax
cmpl $0x1, %eax
ja 0x63e4f
testq %r12, %r12
je 0x63e58
movq %r14, %rdi
movq %r12, %rsi
callq 0x19060
movq %rax, %r12
jmp 0x63e62
movl $0xfffffffe, (%r15)     # imm = 0xFFFFFFFE
jmp 0x63e5f
movl $0x1, (%r15)
xorl %r12d, %r12d
pushq $-0x1
popq %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x19710
pushq $-0x2
popq %rsi
movq %r14, %rdi
callq 0x18150
movl (%r15), %edi
testl %edi, %edi
je 0x63e9d
callq 0x19950
leaq 0x2e155(%rip), %rsi     # 0x91fe2
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x18e90
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/googletest/googletest/include/gtest/internal/gtest-internal.h
// Function: testing::internal::SuiteApiResolver<testing::Test>::GetSetUpCaseOrSuite(char const*, int)
static SetUpTearDownSuiteFuncType GetSetUpCaseOrSuite(const char* filename,
                                                        int line_num) {
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
    SetUpTearDownSuiteFuncType test_case_fp =
        GetNotDefaultOrNull(&T::SetUpTestCase, &Test::SetUpTestCase);
    SetUpTearDownSuiteFuncType test_suite_fp =
        GetNotDefaultOrNull(&T::SetUpTestSuite, &Test::SetUpTestSuite);

    GTEST_CHECK_(!test_case_fp || !test_suite_fp)
        << "Test can not provide both SetUpTestSuite and SetUpTestCase, please "
           "make sure there is only one present at "
        << filename << ":" << line_num;

    return test_case_fp != nullptr ? test_case_fp : test_suite_fp;
#else
    (void)(filename);
    (void)(line_num);
    return &T::SetUpTestSuite;
#endif
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
pushq $0x1
popq %rdi
callq 0x371bf
testb %al, %al
jne 0x13434
leaq 0x42f3b(%rip), %rdx     # 0x5630d
leaq 0x4(%rsp), %rdi
pushq $0x3
popq %rsi
movl $0x201, %ecx            # imm = 0x201
callq 0x39dd8
movq 0x70bfd(%rip), %rdi     # 0x83fe8
leaq 0x42f99(%rip), %rsi     # 0x5638b
callq 0xd550
leaq 0x42fc0(%rip), %rsi     # 0x563be
movq %rax, %rdi
callq 0xd550
movq %rax, %rdi
movq %r14, %rsi
callq 0xd550
leaq 0x448d8(%rip), %rsi     # 0x57cf0
movq %rax, %rdi
callq 0xd550
movq %rax, %rdi
movl %ebx, %esi
callq 0xda80
leaq 0x4(%rsp), %rdi
callq 0x39e9c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x4(%rsp), %rdi
callq 0x39e9c
movq %rbx, %rdi
callq 0xdaa0
nop
// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/googletest/googletest/include/gtest/internal/gtest-internal.h
// Function: testing::internal::SuiteApiResolver<testing::Test>::GetTearDownCaseOrSuite(char const*, int)
static SetUpTearDownSuiteFuncType GetTearDownCaseOrSuite(const char* filename,
                                                           int line_num) {
#ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
    SetUpTearDownSuiteFuncType test_case_fp =
        GetNotDefaultOrNull(&T::TearDownTestCase, &Test::TearDownTestCase);
    SetUpTearDownSuiteFuncType test_suite_fp =
        GetNotDefaultOrNull(&T::TearDownTestSuite, &Test::TearDownTestSuite);

    GTEST_CHECK_(!test_case_fp || !test_suite_fp)
        << "Test can not provide both TearDownTestSuite and TearDownTestCase,"
           " please make sure there is only one present at"
        << filename << ":" << line_num;

    return test_case_fp != nullptr ? test_case_fp : test_suite_fp;
#else
    (void)(filename);
    (void)(line_num);
    return &T::TearDownTestSuite;
#endif
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
pushq $0x1
popq %rdi
callq 0x371bf
testb %al, %al
jne 0x134d2
leaq 0x42e9d(%rip), %rdx     # 0x5630d
leaq 0x4(%rsp), %rdi
pushq $0x3
popq %rsi
movl $0x216, %ecx            # imm = 0x216
callq 0x39dd8
movq 0x70b5f(%rip), %rdi     # 0x83fe8
leaq 0x42efb(%rip), %rsi     # 0x5638b
callq 0xd550
leaq 0x42f8d(%rip), %rsi     # 0x56429
movq %rax, %rdi
callq 0xd550
movq %rax, %rdi
movq %r14, %rsi
callq 0xd550
leaq 0x4483a(%rip), %rsi     # 0x57cf0
movq %rax, %rdi
callq 0xd550
movq %rax, %rdi
movl %ebx, %esi
callq 0xda80
leaq 0x4(%rsp), %rdi
callq 0x39e9c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x4(%rsp), %rdi
callq 0x39e9c
movq %rbx, %rdi
callq 0xdaa0
nop
// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/googletest/googletest/include/gtest/gtest-printers.h
// Function: void testing::internal::ContainerPrinter::PrintValue<std::vector<double, std::allocator<double>>, void>(std::vector<double, std::allocator<double>> const&, std::ostream*)
static void PrintValue(const T& container, std::ostream* os) {
    const size_t kMaxCount = 32;  // The maximum number of elements to print.
    *os << '{';
    size_t count = 0;
    for (auto&& elem : container) {
      if (count > 0) {
        *os << ',';
        if (count == kMaxCount) {  // Enough has been printed.
          *os << " ...";
          break;
        }
      }
      *os << ' ';
      // We cannot call PrintTo(elem, os) here as PrintTo() doesn't
      // handle `elem` being a native array.
      internal::UniversalPrint(elem, os);
      ++count;
    }

    if (count > 0) {
      *os << ' ';
    }
    *os << '}';
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
pushq $0x7b
popq %rsi
movq %rbx, %rdi
callq 0xd690
movq (%r15), %r14
movq 0x8(%r15), %r13
xorl %r12d, %r12d
pushq $0x20
popq %rbp
pushq $0x2c
popq %r15
cmpq %r13, %r14
je 0x141ce
testq %r12, %r12
je 0x141b0
movq %rbx, %rdi
movl %r15d, %esi
callq 0xd690
cmpq $0x20, %r12
je 0x141d5
movq %rbx, %rdi
movl %ebp, %esi
callq 0xd690
movq %r14, %rdi
movq %rbx, %rsi
callq 0x14208
incq %r12
addq $0x8, %r14
jmp 0x14195
testq %r12, %r12
jne 0x141e4
jmp 0x141ef
leaq 0x485c7(%rip), %rsi     # 0x5c7a3
movq %rbx, %rdi
callq 0xd550
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0xd690
pushq $0x7d
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd690
// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/googletest/googletest/include/gtest/gtest-printers.h
// Function: testing::internal::PrintTo(double, std::ostream*)
inline void PrintTo(double d, ::std::ostream* os) {
  auto old_precision = os->precision();
  os->precision(AppropriateResolution(d));
  *os << d;
  os->precision(old_precision);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movsd %xmm0, 0x8(%rsp)
movq (%rdi), %rax
movq -0x18(%rax), %r14
movq 0x8(%rdi,%r14), %r15
callq 0x14262
cltq
movq %rax, 0x8(%rbx,%r14)
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
callq 0xda20
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq %r15, 0x8(%rbx,%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/test_maybe.cc
// Function: maybe_something_Test::TestBody()
TEST(maybe, something) {
    constexpr auto s = something;
    EXPECT_TRUE(s);
    EXPECT_TRUE(s.has_value());

    constexpr auto n = nothing;
    EXPECT_FALSE(maybe<int>(n));
    EXPECT_FALSE(maybe<int>(n).has_value());
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movb $0x1, %bpl
leaq 0x10(%rsp), %rbx
movb %bpl, -0x8(%rbx)
andq $0x0, (%rbx)
movq %rbx, %rdi
callq 0x13646
movb %bpl, -0x8(%rbx)
leaq 0x10(%rsp), %rbx
andq $0x0, (%rbx)
movq %rbx, %rdi
callq 0x13646
movb %bpl, -0x8(%rbx)
leaq 0x10(%rsp), %rbx
andq $0x0, (%rbx)
movq %rbx, %rdi
callq 0x13646
movb %bpl, -0x8(%rbx)
leaq 0x10(%rsp), %rdi
andq $0x0, (%rdi)
callq 0x13646
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/test_maybe.cc
// Function: maybe_conditional_void_assign_Test::TestBody()
TEST(maybe, conditional_void_assign) {
    int r = 0;

    EXPECT_TRUE(r << something);
    EXPECT_EQ(1, r);

    EXPECT_FALSE(r << maybe<void>());
    EXPECT_EQ(1, r);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
pushq $0x1
popq %rbp
leaq 0x2c(%rsp), %rbx
movl %ebp, (%rbx)
leaq 0x20(%rsp), %rdi
movb $0x1, -0x8(%rdi)
andq $0x0, (%rdi)
callq 0x13646
leaq 0x8(%rsp), %rcx
movl %ebp, (%rcx)
leaq 0x42f6f(%rip), %rsi     # 0x5803f
leaq 0x43372(%rip), %rdx     # 0x58449
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %r8
callq 0x13a52
cmpb $0x0, (%r14)
jne 0x1514d
leaq 0x8(%rsp), %rdi
callq 0x3d5f6
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x15106
movq (%rax), %r8
jmp 0x1510d
leaq 0x43f5d(%rip), %r8      # 0x5906a
leaq 0x419e2(%rip), %rdx     # 0x56af6
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x5a
popq %rcx
callq 0x3b5b6
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x39b08
leaq 0x10(%rsp), %rdi
callq 0x3b616
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1514d
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x13646
movb $0x1, -0x8(%rbx)
leaq 0x20(%rsp), %rdi
andq $0x0, (%rdi)
callq 0x13646
leaq 0x8(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x42ec1(%rip), %rsi     # 0x5803f
leaq 0x432c4(%rip), %rdx     # 0x58449
leaq 0x18(%rsp), %rbx
leaq 0x2c(%rsp), %r8
movq %rbx, %rdi
callq 0x13a52
cmpb $0x0, (%rbx)
jne 0x151fc
leaq 0x8(%rsp), %rdi
callq 0x3d5f6
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x151b5
movq (%rax), %r8
jmp 0x151bc
leaq 0x43eae(%rip), %r8      # 0x5906a
leaq 0x41933(%rip), %rdx     # 0x56af6
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x5d
popq %rcx
callq 0x3b5b6
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x39b08
leaq 0x10(%rsp), %rdi
callq 0x3b616
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x151fc
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x20(%rsp), %rdi
callq 0x13646
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x15213
jmp 0x15224
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3b616
jmp 0x15227
jmp 0x15239
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1523c
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x1523c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x13646
movq %rbx, %rdi
callq 0xdaa0
// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/test_maybe.cc
// Function: maybe_conv_Test::TestBody()
TEST(maybe, conv) {
    maybe<void> a(maybe<int>{});
    EXPECT_FALSE(a);

    maybe<void> b(maybe<int>{1});
    EXPECT_TRUE(b);

    maybe<double> c(maybe<int>{});
    EXPECT_FALSE(c);

    maybe<double> d(maybe<int>{1});
    EXPECT_TRUE(d);
    EXPECT_EQ(1., d.value());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movb $0x1, %bpl
leaq 0x30(%rsp), %rbx
movb %bpl, -0x8(%rbx)
andq $0x0, (%rbx)
movq %rbx, %rdi
callq 0x13646
movb %bpl, -0x8(%rbx)
leaq 0x30(%rsp), %rbx
andq $0x0, (%rbx)
movq %rbx, %rdi
callq 0x13646
movb %bpl, -0x8(%rbx)
leaq 0x30(%rsp), %rdi
andq $0x0, (%rdi)
callq 0x13646
leaq 0x30(%rsp), %rbx
movabsq $0x3ff0000000000000, %r15 # imm = 0x3FF0000000000000
movq %r15, (%rbx)
movb %bpl, -0x8(%rbx)
leaq 0x20(%rsp), %rdi
movb %bpl, -0x8(%rdi)
andq $0x0, (%rdi)
callq 0x13646
leaq 0x8(%rsp), %r14
movq %r15, (%r14)
leaq 0x28(%rsp), %rdi
callq 0x15f06
leaq 0x41156(%rip), %rsi     # 0x56bd8
leaq 0x41152(%rip), %rdx     # 0x56bdb
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
callq 0x15f5a
cmpb $0x0, (%r15)
jne 0x15b04
leaq 0x8(%rsp), %rdi
callq 0x3d5f6
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x15abb
movq (%rax), %r8
jmp 0x15ac2
leaq 0x435a8(%rip), %r8      # 0x5906a
leaq 0x4102d(%rip), %rdx     # 0x56af6
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
movl $0x97, %ecx
callq 0x3b5b6
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x39b08
leaq 0x10(%rsp), %rdi
callq 0x3b616
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15b04
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x20(%rsp), %rdi
callq 0x13646
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3b616
jmp 0x15b2b
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15b40
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x15b40
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x13646
movq %rbx, %rdi
callq 0xdaa0
// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/googletest/googletest/include/gtest/internal/gtest-type-util.h
// Function: testing::internal::GetTypeName[abi:cxx11](std::type_info const&)
inline std::string GetTypeName(const std::type_info& type) {
  const char* const name = type.name();
#if GTEST_HAS_CXXABI_H_ || defined(__HP_aCC)
  int status = 0;
  // gcc's implementation of typeid(T).name() mangles the type name,
  // so we have to demangle it.
#if GTEST_HAS_CXXABI_H_
  using abi::__cxa_demangle;
#endif  // GTEST_HAS_CXXABI_H_
  char* const readable_name = __cxa_demangle(name, nullptr, nullptr, &status);
  const std::string name_str(status == 0 ? readable_name : name);
  free(readable_name);
  return CanonicalizeForStdLibVersioning(name_str);
#elif defined(_MSC_VER)
  // Strip struct and class due to differences between
  // MSVC and other compilers. std::pair<int,bool> is printed as
  // "struct std::pair<int,bool>" when using MSVC vs "std::pair<int, bool>" with
  // other compilers.
  std::string s = name;
  // Only strip the leading "struct " and "class ", so uses rfind == 0 to
  // ensure that
  if (s.rfind("struct ", 0) == 0) {
    s = s.substr(strlen("struct "));
  } else if (s.rfind("class ", 0) == 0) {
    s = s.substr(strlen("class "));
  }
  return s;
#else
  return name;
#endif  // GTEST_HAS_CXXABI_H_ || __HP_aCC
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x8(%rsi), %rax
xorl %r14d, %r14d
cmpb $0x2a, (%rax)
sete %r14b
addq %rax, %r14
leaq 0x4(%rsp), %r15
andl $0x0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r15, %rcx
callq 0xd4c0
movq %rax, %r12
cmpl $0x0, (%r15)
cmoveq %rax, %r14
leaq 0x28(%rsp), %r15
leaq 0x3(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1337a
movq %r12, %rdi
callq 0xd6f0
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0xd880
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1dd8b
leaq 0x8(%rsp), %rdi
callq 0xdbe8
leaq 0x28(%rsp), %rdi
callq 0xdbe8
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xdbe8
jmp 0x1d2c7
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xdbe8
movq %rbx, %rdi
callq 0xdaa0
// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/googletest/googletest/include/gtest/internal/gtest-type-util.h
// Function: testing::internal::CanonicalizeForStdLibVersioning(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
inline std::string CanonicalizeForStdLibVersioning(std::string s) {
  static const char prefix[] = "std::__";
  if (s.compare(0, strlen(prefix), prefix) == 0) {
    std::string::size_type end = s.find("::", strlen(prefix));
    if (end != s.npos) {
      // Erase everything between the initial `std` and the second `::`.
      s.erase(strlen("std"), end - strlen("std"));
    }
  }

  // Strip redundant spaces in typename to match MSVC
  // For example, std::pair<int, bool> -> std::pair<int,bool>
  static const char to_search[] = ", ";
  static const char replace_str[] = ",";
  size_t pos = 0;
  while (true) {
    // Get the next occurrence from the current position
    pos = s.find(to_search, pos);
    if (pos == std::string::npos) {
      break;
    }
    // Replace this occurrence of substring
    s.replace(pos, strlen(to_search), replace_str);
    pos += strlen(replace_str);
  }
  return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3a11d(%rip), %rcx     # 0x57ec0
pushq $0x7
popq %rdx
movq %rsi, %rdi
xorl %esi, %esi
callq 0xd850
testl %eax, %eax
jne 0x1ddde
leaq 0x39f34(%rip), %rsi     # 0x57cef
pushq $0x7
popq %rdx
movq %r14, %rdi
callq 0xdbb0
cmpq $-0x1, %rax
je 0x1ddde
addq $-0x3, %rax
pushq $0x3
popq %rsi
movq %r14, %rdi
movq %rax, %rdx
callq 0xd120
xorl %r13d, %r13d
leaq 0x3a0e0(%rip), %r15     # 0x57ec8
leaq 0x3a0dc(%rip), %r12     # 0x57ecb
pushq $0x2
popq %rbp
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xdbb0
cmpq $-0x1, %rax
je 0x1de1f
movq %rax, %r13
movq %r14, %rdi
movq %rax, %rsi
movq %rbp, %rdx
movq %r12, %rcx
callq 0xd340
incq %r13
jmp 0x1ddf2
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd7e0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/googletest/googletest/include/gtest/gtest-printers.h
// Function: testing::internal::UniversalTersePrinter<char const*>::Print(char const*, std::ostream*)
static void Print(const char* str, ::std::ostream* os) {
    if (str == nullptr) {
      *os << "NULL";
    } else {
      UniversalPrint(std::string(str), os);
    }
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
testq %rdi, %rdi
je 0x1e00f
movq %rdi, %rsi
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x1337a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3aa03
leaq 0x8(%rsp), %rdi
callq 0xdbe8
addq $0x28, %rsp
popq %rbx
popq %r14
retq
leaq 0x39cdc(%rip), %rsi     # 0x57cf2
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0xd550
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xdbe8
movq %rbx, %rdi
callq 0xdaa0