LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/stetre[P]moonvulkan/src/utils.c
// Function: moonvulkan_checkdevicesize
VkDeviceSize checkdevicesize(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 VK_WHOLE_SIZE;
        else
            return argerrorc(L, arg, ERR_VALUE);
        }
    return (VkDeviceSize)luaL_checkinteger(L, arg);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
callq 0x1a130
cmpl $0x4, %eax
jne 0x4fe55
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x18690
leaq 0x53d11(%rip), %rsi     # 0xa3b45
movq %rax, %rdi
callq 0x19000
testl %eax, %eax
je 0x4fe66
leaq 0x53d55(%rip), %rdx     # 0xa3b9c
movq %r14, %rdi
movl %ebx, %esi
callq 0x18420
cltq
jmp 0x4fe6d
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x190f0
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
xorl %eax, %eax
movl %eax, (%rdx)
movl %eax, (%rcx)
callq 0x1a130
testl %eax, %eax
jle 0x500f8
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a130
movl $0xfffffffc, %r13d      # imm = 0xFFFFFFFC
cmpl $0x5, %eax
jne 0x501d4
movq %r15, %rdi
movl %ebp, %esi
callq 0x1a160
movl %eax, (%r14)
testl %eax, %eax
je 0x50103
movl %eax, %r13d
shlq $0x2, %r13
movq 0x742e2(%rip), %rax     # 0xc43c0
testq %rax, %rax
je 0x5010e
movq 0x742de(%rip), %rdi     # 0xc43c8
xorl %esi, %esi
xorl %edx, %edx
movq %r13, %rcx
callq *%rax
movq %rax, %r12
jmp 0x50111
movl $0x1, %r13d
jmp 0x501d4
movl $0xfffffffb, %r13d      # imm = 0xFFFFFFFB
jmp 0x501d4
xorl %r12d, %r12d
testq %r12, %r12
je 0x50125
movq %r12, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x18b50
jmp 0x50128
xorl %r12d, %r12d
testq %r12, %r12
je 0x50192
cmpl $0x0, (%r14)
je 0x501da
movq %rbx, (%rsp)
xorl %ebx, %ebx
leaq 0x1(%rbx), %r13
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x18980
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x18c10
testl %eax, %eax
je 0x5019a
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x18ee0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%r12,%rbx,4)
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl (%r14), %eax
movq %r13, %rbx
cmpq %rax, %r13
jb 0x5013d
jmp 0x501da
movl $0xfffffffa, %r13d      # imm = 0xFFFFFFFA
jmp 0x501cd
movl $0xfffffffe, %r13d      # imm = 0xFFFFFFFE
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movq 0x7420c(%rip), %rax     # 0xc43c0
testq %rax, %rax
je 0x501c9
movq 0x74208(%rip), %rdi     # 0xc43c8
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq *%rax
movq (%rsp), %rbx
movl $0x0, (%r14)
movl %r13d, (%rbx)
xorl %r12d, %r12d
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_O1/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 0x187e0
testl %ebp, %ebp
je 0x50247
movl %ebp, %r12d
negq %r12
movl $0x1, %r15d
xorps %xmm0, %xmm0
cvtss2sd -0x4(%rbx,%r15,4), %xmm0
movq %r14, %rdi
callq 0x19330
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r15, %rdx
callq 0x19140
leaq (%r12,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x50215
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1a130
cmpl $0x1, %eax
jne 0x50322
movl $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_O1/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 0x1a130
cmpl $0x4, %eax
jne 0x503b4
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x18690
movq %rax, %r15
leaq 0x537c2(%rip), %rsi     # 0xa3b45
movq %rax, %rdi
callq 0x19000
testl %eax, %eax
je 0x503c3
leaq 0x41650(%rip), %rsi     # 0x919e6
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x18eb0
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
callq 0x18420
cltq
jmp 0x503ca
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x190f0
movq $-0x1, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1a130
movl $0x0, (%rbx)
movq $-0x1, %r14
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x50450
cmpl $0x3, %eax
je 0x50429
cmpl $0x4, %eax
jne 0x50447
movq %r15, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x18690
leaq 0x53746(%rip), %rsi     # 0xa3b61
movq %rax, %rdi
callq 0x19000
testl %eax, %eax
jne 0x50447
jmp 0x50450
leaq 0xc(%rsp), %r12
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x18640
cmpl $0x0, (%r12)
je 0x50447
movq %rax, %r14
jmp 0x50450
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_O1/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 0x1a130
movq $-0x1, %r15
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x504cc
cmpl $0x4, %eax
jne 0x504db
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x18690
movq %rax, %r12
leaq 0x536c5(%rip), %rsi     # 0xa3b61
movq %rax, %rdi
callq 0x19000
testl %eax, %eax
je 0x504cc
leaq 0x41537(%rip), %rsi     # 0x919e6
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x18eb0
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 0x190f0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x406c0(%rip), %rcx     # 0x90f4b
leaq 0x8(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a520
movq %rax, %r15
movq (%r14), %rax
movq 0x50(%rax), %rcx
cmpq $0x0, 0x4f8(%rcx)
je 0x508fa
movq 0x20(%rax), %r12
leaq 0x4068f(%rip), %r9      # 0x90f4b
xorl %r14d, %r14d
leaq 0x4(%rsp), %rdx
leaq 0x14(%rsp), %rbp
movq %rbx, %rdi
movl $0x2, %esi
movq %rbp, %rcx
xorl %r8d, %r8d
callq 0x19150
movl (%rbp), %edi
testl %edi, %edi
je 0x5090d
callq 0x19970
movq %rbx, %rdi
movl $0x2, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x50951
leaq 0x53418(%rip), %rsi     # 0xa3d19
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
jmp 0x50951
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 0x50954
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
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_O1/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 0x405cf(%rip), %rcx     # 0x90f4b
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x1a520
movq %rax, %r14
movq (%r15), %rcx
movq 0x50(%rcx), %rax
movq 0x500(%rax), %rax
testq %rax, %rax
je 0x509d2
movq 0x20(%rcx), %r15
movq %rsp, %rdx
movq %r15, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq *%rax
testl %eax, %eax
je 0x509e5
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
jmp 0x50a5e
leaq 0x5336e(%rip), %rsi     # 0xa3d47
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
jmp 0x50a5e
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x50a2e
movq %rbx, %rdi
callq 0x19210
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 0x50a3f
movl %eax, %ebp
movq %rbx, %rdi
movq %r12, %rsi
callq 0x182e0
movq %rbx, %rdi
xorl %esi, %esi
movl %ebp, %edx
jmp 0x509c0
leaq 0x490a2(%rip), %rsi     # 0x99ad7
movq %rbx, %rdi
callq 0x1a300
jmp 0x50a59
movq (%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19790
movq %rbx, %rdi
movq %r12, %rsi
callq 0x182e0
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x18d30
testl %eax, %eax
je 0x50abc
movq 0x7253d(%rip), %rax     # 0xc2fc8
cmpl $0x0, (%rax)
je 0x50aa1
leaq 0x53260(%rip), %rdi     # 0xa3cf7
movq %rbx, %rsi
xorl %eax, %eax
callq 0x18970
movq %r15, %rdi
callq 0x19ed0
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_O1/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
movl $0x1, %esi
callq 0x190f0
movq %rax, %r14
movl %r14d, %esi
shrl $0x16, %esi
andl $0x7f, %esi
movq %rbx, %rdi
callq 0x18b60
movl %r14d, %esi
shrl $0xc, %esi
andl $0x3ff, %esi            # imm = 0x3FF
movq %rbx, %rdi
callq 0x18b60
movl %r14d, %esi
andl $0xfff, %esi            # imm = 0xFFF
movq %rbx, %rdi
callq 0x18b60
shrl $0x1d, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x18b60
movl $0x4, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x190f0
movl %eax, %edx
shrl $0x16, %edx
movl %eax, %ecx
shrl $0xc, %ecx
andl $0x3ff, %ecx            # imm = 0x3FF
andl $0xfff, %eax            # imm = 0xFFF
leaq 0x5318d(%rip), %rsi     # 0xa3e68
movq %rbx, %rdi
movl %eax, %r8d
xorl %eax, %eax
callq 0x18eb0
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x190f0
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
callq 0x190f0
movq %rax, %r15
movq %rbx, %rdi
movl $0x3, %esi
callq 0x190f0
movq %rax, %r12
movq %rbx, %rdi
movl $0x4, %esi
xorl %edx, %edx
callq 0x19420
shll $0x1d, %eax
shll $0x16, %r14d
shll $0xc, %r15d
orl %r14d, %r15d
orl %eax, %r12d
orl %r15d, %r12d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18b60
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x72243(%rip), %rax     # 0xc2fe0
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x50dc7
leaq 0xc(%rsp), %rdi
callq *%rax
testl %eax, %eax
je 0x50dc7
movq %rbx, %rdi
xorl %esi, %esi
movl %eax, %edx
callq 0x18990
movq %rbx, %rdi
callq 0x199e0
jmp 0x50dd8
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0x18b60
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movl %esi, %ebp
movq %rdi, %r14
movq %rdx, %rsi
callq 0x1a300
movq %r14, %rdi
movl %ebp, %esi
callq 0x196a0
movq %r14, %rdi
callq 0x180a0
movl %eax, %ebp
movl $0x0, (%r15)
movq %r14, %rdi
movl %eax, %esi
callq 0x18c10
movq %r14, %rdi
movl %ebp, %esi
testl %eax, %eax
je 0x51003
xorl %edx, %edx
callq 0x18ee0
movsd %xmm0, (%rsp)
jmp 0x51013
callq 0x1a130
testl %eax, %eax
jle 0x51013
movl $0xfffffffe, (%r15)     # imm = 0xFFFFFFFE
movq %r14, %rdi
movl %ebp, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19730
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl (%r15), %edi
testl %edi, %edi
je 0x51052
callq 0x19970
leaq 0x52fb0(%rip), %rsi     # 0xa3ff2
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x18eb0
movsd (%rsp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
movq %r8, %rbx
movl %ecx, %r15d
movq %rdx, %r14
movl %esi, %ebp
movl %ecx, %r12d
movq %r12, %rsi
imulq %rdx, %rsi
callq 0x18050
testq %rax, %rax
je 0x5147f
cmpl $-0x1, %ebp
sete %cl
testl %r15d, %r15d
sete %dl
orb %cl, %dl
jne 0x5147b
leaq 0x3(%r12), %rcx
andq $-0x4, %rcx
decq %r12
movq %r12, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq (%r14,%r14,2), %rdx
leaq (,%r14,4), %rsi
xorl %edi, %edi
movdqa 0x52ad6(%rip), %xmm1    # 0xa3e80
movdqa 0x52ade(%rip), %xmm2    # 0xa3e90
movdqa 0x52ae6(%rip), %xmm3    # 0xa3ea0
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rax, %r8
movq %rdi, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %r9d
notl %r9d
testb $0x1, %r9b
je 0x5140d
movl %ebp, (%r8)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %r9d
testb $0x1, %r9b
je 0x51421
movl %ebp, (%r14,%r8)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %r9d
testb $0x1, %r9b
je 0x5145b
movl %ebp, (%r8,%r14,2)
pextrw $0x4, %xmm5, %r9d
testb $0x1, %r9b
je 0x5146b
movl %ebp, (%rdx,%r8)
addq $0x4, %rdi
addq %rsi, %r8
cmpq %rdi, %rcx
jne 0x513c5
xorl %ecx, %ecx
jmp 0x51486
movl $0xfffffffa, %ecx       # imm = 0xFFFFFFFA
xorl %eax, %eax
movl %ecx, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x514f1
movq %r9, %r15
movq %rsi, %rbx
movq %rdi, %r14
movl %r8d, 0x4(%rsp)
testq %r9, %r9
je 0x514d1
testl %ecx, %ecx
je 0x514d1
movq %rdx, %r12
movl %ecx, %ebp
movq %rbx, %r13
movq %r14, %rdi
movq %r13, %rsi
callq *%r15
addq %r12, %r13
decq %rbp
jne 0x514c0
cmpl $0x0, 0x4(%rsp)
je 0x514f1
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_O1/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
movl %esi, %ebp
movq %rdi, %r15
movq %rdx, %rsi
callq 0x1a300
movq %r15, %rdi
movl %ebp, %esi
callq 0x196a0
movq %r15, %rdi
callq 0x180a0
movl %eax, %ebp
movl $0x0, (%r12)
movq %r15, %rdi
movl %eax, %esi
callq 0x1a130
testl %eax, %eax
jle 0x51601
leaq 0x4(%rsp), %r13
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x18640
movq %rax, %r14
cmpl $0x0, (%r13)
jne 0x51601
movl $0xfffffffe, (%r12)     # imm = 0xFFFFFFFE
movq %r15, %rdi
movl %ebp, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19730
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl (%r12), %edi
testl %edi, %edi
je 0x51641
callq 0x19970
leaq 0x529c1(%rip), %rsi     # 0xa3ff2
movq %r15, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x18eb0
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_O1/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
movl %esi, %ebp
movq %rdi, %r14
movq %rdx, %rsi
callq 0x1a300
movq %r14, %rdi
movl %ebp, %esi
callq 0x196a0
movq %r14, %rdi
callq 0x180a0
movl %eax, %ebp
movq %r14, %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x1a660
movq %rax, %r15
movq %r14, %rdi
movl %ebp, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19730
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl (%r12), %edi
testl %edi, %edi
je 0x5281b
cmpl $0x1, %edi
jne 0x527ff
movl $0x0, (%r12)
xorl %r15d, %r15d
jmp 0x5281b
callq 0x19970
leaq 0x517e7(%rip), %rsi     # 0xa3ff2
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x18eb0
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5770b
movl %r8d, %ebp
movq %rsi, %rbx
movq %rdi, %r14
testl %ecx, %ecx
je 0x576ee
movq %rdx, %r15
movl %ecx, %r13d
movq %rbx, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x8d6e9
addq %r15, %r12
decq %r13
jne 0x576db
testl %ebp, %ebp
je 0x5770b
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_O1/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
movl %esi, %ebp
movq %rdi, %r14
movq %rdx, %rsi
callq 0x1a300
movq %r14, %rdi
movl %ebp, %esi
callq 0x196a0
movq %r14, %rdi
callq 0x180a0
movl %eax, %r12d
movl $0x0, (%r15)
movq %r14, %rdi
movl %eax, %esi
callq 0x1a130
movq %r14, %rdi
movl %r12d, %esi
cmpl $0x1, %eax
jne 0x585b7
callq 0x18320
movl %eax, %ebp
jmp 0x585c9
callq 0x1a130
xorl %ebp, %ebp
testl %eax, %eax
jle 0x585c9
movl $0xfffffffe, (%r15)     # imm = 0xFFFFFFFE
movq %r14, %rdi
movl %r12d, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19730
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl (%r15), %edi
testl %edi, %edi
je 0x58609
callq 0x19970
leaq 0x4b9f9(%rip), %rsi     # 0xa3ff2
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x18eb0
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1a300
movq %r14, %rdi
movl %ebx, %esi
callq 0x196a0
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1a130
xorl %ebx, %ebx
testl %eax, %eax
setg %bl
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movl %esi, %ebp
movq %rdi, %r14
movq %rdx, %rsi
callq 0x1a300
movq %r14, %rdi
movl %ebp, %esi
callq 0x196a0
movq %r14, %rdi
callq 0x180a0
movl %eax, %ebp
movq %r14, %rdi
movl %eax, %esi
callq 0x1a130
movl $0x0, (%r15)
testq %r13, %r13
je 0x6edd6
movq $0x0, (%r13)
cmpl $0x4, %eax
jne 0x6edf0
movq %r14, %rdi
movl %ebp, %esi
movq %r13, %rdx
callq 0x18690
movq %r14, %rdi
movq %rax, %rsi
jmp 0x6ee02
incl %eax
cmpl $0x1, %eax
ja 0x6ee0c
testq %r12, %r12
je 0x6ee15
movq %r14, %rdi
movq %r12, %rsi
callq 0x19080
movq %rax, %r12
jmp 0x6ee1f
movl $0xfffffffe, (%r15)     # imm = 0xFFFFFFFE
jmp 0x6ee1c
movl $0x1, (%r15)
xorl %r12d, %r12d
movq %r14, %rdi
movl %ebp, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x19730
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x18150
movl (%r15), %edi
testl %edi, %edi
je 0x6ee5e
callq 0x19970
leaq 0x351a4(%rip), %rsi     # 0xa3ff2
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x18eb0
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_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r14
movl $0x1, %edi
callq 0x42d64
testb %al, %al
jne 0x153f1
leaq 0x58f8c(%rip), %rdx     # 0x6e2cd
leaq 0xc(%rsp), %rdi
movl $0x3, %esi
movl $0x201, %ecx            # imm = 0x201
callq 0x48796
movq 0x80c94(%rip), %rdi     # 0x95ff0
leaq 0x58fe8(%rip), %rsi     # 0x6e34b
movl $0x32, %edx
callq 0xd600
movq 0x80c7c(%rip), %r15     # 0x95ff0
leaq 0x59003(%rip), %rsi     # 0x6e37e
movl $0x6a, %edx
movq %r15, %rdi
callq 0xd600
testq %r14, %r14
je 0x153a9
movq %r14, %rdi
callq 0xd210
movq 0x80c54(%rip), %rdi     # 0x95ff0
movq %r14, %rsi
movq %rax, %rdx
callq 0xd600
jmp 0x153c1
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0xda10
movq 0x80c28(%rip), %rdi     # 0x95ff0
leaq 0x5a8b1(%rip), %rsi     # 0x6fc80
movl $0x1, %edx
callq 0xd600
movq 0x80c10(%rip), %rdi     # 0x95ff0
movl %ebx, %esi
callq 0xda30
leaq 0xc(%rsp), %rdi
callq 0x488d8
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0xc(%rsp), %rdi
callq 0x488d8
movq %rbx, %rdi
callq 0xda70
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %r14
movl $0x1, %edi
callq 0x42d64
testb %al, %al
jne 0x154e9
leaq 0x58e94(%rip), %rdx     # 0x6e2cd
leaq 0xc(%rsp), %rdi
movl $0x3, %esi
movl $0x216, %ecx            # imm = 0x216
callq 0x48796
movq 0x80b9c(%rip), %rdi     # 0x95ff0
leaq 0x58ef0(%rip), %rsi     # 0x6e34b
movl $0x32, %edx
callq 0xd600
movq 0x80b84(%rip), %r15     # 0x95ff0
leaq 0x58f76(%rip), %rsi     # 0x6e3e9
movl $0x6f, %edx
movq %r15, %rdi
callq 0xd600
testq %r14, %r14
je 0x154a1
movq %r14, %rdi
callq 0xd210
movq 0x80b5c(%rip), %rdi     # 0x95ff0
movq %r14, %rsi
movq %rax, %rdx
callq 0xd600
jmp 0x154b9
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0xda10
movq 0x80b30(%rip), %rdi     # 0x95ff0
leaq 0x5a7b9(%rip), %rsi     # 0x6fc80
movl $0x1, %edx
callq 0xd600
movq 0x80b18(%rip), %rdi     # 0x95ff0
movl %ebx, %esi
callq 0xda30
leaq 0xc(%rsp), %rdi
callq 0x488d8
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0xc(%rsp), %rdi
callq 0x488d8
movq %rbx, %rdi
callq 0xda70
// File: /workspace/github_cpp_makefile_star2_O1/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
leaq 0x5(%rsp), %rsi
movb $0x7b, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0xd600
movq (%r15), %r14
movq 0x8(%r15), %rbp
cmpq %rbp, %r14
je 0x162f5
xorl %r13d, %r13d
leaq 0x4(%rsp), %r15
leaq 0x3(%rsp), %r12
testq %r13, %r13
je 0x162a9
movb $0x2c, 0x3(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd600
cmpq $0x20, %r13
jne 0x162a9
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x5e4b9(%rip), %rsi     # 0x74753
callq 0xd600
movl $0x20, %r13d
movb $0x1, %al
jmp 0x162ce
movb $0x20, 0x4(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd600
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1631a
incq %r13
xorl %eax, %eax
testb %al, %al
jne 0x162db
addq $0x8, %r14
cmpq %rbp, %r14
jne 0x1626b
testq %r13, %r13
je 0x162f5
leaq 0x6(%rsp), %rsi
movb $0x20, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0xd600
leaq 0x7(%rsp), %rsi
movb $0x7d, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0xd600
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/halfflat[P]tinyopt/test/googletest/googletest/include/gtest/gtest-printers.h
// Function: testing::internal::UniversalPrinter<double>::Print(double const&, std::ostream*)
static void Print(const T& value, ::std::ostream* os) {
    // By default, ::testing::internal::PrintTo() is used for printing
    // the value.
    //
    // Thanks to Koenig look-up, if T is a class and has its own
    // PrintTo() function defined in its namespace, that function will
    // be visible here.  Since it is more specific than the generic ones
    // in ::testing::internal, it will be picked by the compiler in the
    // following statement - exactly what we want.
    PrintTo(value, os);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movsd (%rdi), %xmm0
movsd %xmm0, 0x8(%rsp)
movq (%rsi), %rax
movq -0x18(%rax), %r14
movq 0x8(%rsi,%r14), %r15
callq 0x1636c
cltq
movq %rax, 0x8(%rbx,%r14)
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
callq 0xd9c0
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_O1/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 %rbx
subq $0x30, %rsp
movl $0x1, %eax
leaq 0x2c(%rsp), %r8
movl %eax, (%r8)
leaq 0x8(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x58da1(%rip), %rsi     # 0x6ffcf
leaq 0x5919f(%rip), %rdx     # 0x703d4
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x15aba
cmpb $0x0, (%rbx)
jne 0x172ab
leaq 0x8(%rsp), %rdi
callq 0x4e2e8
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x17260
movq (%rax), %r8
jmp 0x17267
leaq 0x59d91(%rip), %r8      # 0x70ff8
leaq 0x57831(%rip), %rdx     # 0x6ea9f
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x5a, %ecx
callq 0x4a84c
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x481aa
leaq 0x10(%rsp), %rdi
callq 0x4a8b8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x172ab
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x172bf
leaq 0x20(%rsp), %rdi
callq 0x156d0
leaq 0x8(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x58cfe(%rip), %rsi     # 0x6ffcf
leaq 0x590fc(%rip), %rdx     # 0x703d4
leaq 0x18(%rsp), %rbx
leaq 0x2c(%rsp), %r8
movq %rbx, %rdi
callq 0x15aba
cmpb $0x0, (%rbx)
jne 0x17353
leaq 0x8(%rsp), %rdi
callq 0x4e2e8
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x17308
movq (%rax), %r8
jmp 0x1730f
leaq 0x59ce9(%rip), %r8      # 0x70ff8
leaq 0x57789(%rip), %rdx     # 0x6ea9f
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x5d, %ecx
callq 0x4a84c
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x481aa
leaq 0x10(%rsp), %rdi
callq 0x4a8b8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17353
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x17367
leaq 0x20(%rsp), %rdi
callq 0x156d0
addq $0x30, %rsp
popq %rbx
retq
jmp 0x17371
jmp 0x17382
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4a8b8
jmp 0x17385
jmp 0x173a0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17395
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
jmp 0x173a3
movq %rax, %rbx
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x173b7
leaq 0x20(%rsp), %rdi
callq 0x156d0
movq %rbx, %rdi
callq 0xda70
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x30, %rsp
leaq 0x20(%rsp), %rdi
movb $0x1, (%rdi)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x8(%rdi)
movq %rax, (%rsp)
callq 0x18036
leaq 0x28(%rsp), %r8
leaq 0x56fcd(%rip), %rsi     # 0x6eb81
leaq 0x56fc9(%rip), %rdx     # 0x6eb84
leaq 0x10(%rsp), %rdi
movq %rsp, %rcx
callq 0x1808c
cmpb $0x0, 0x10(%rsp)
jne 0x17c2e
movq %rsp, %rdi
callq 0x4e2e8
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x17be6
movq (%rax), %r8
jmp 0x17bed
leaq 0x5940b(%rip), %r8      # 0x70ff8
leaq 0x56eab(%rip), %rdx     # 0x6ea9f
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x97, %ecx
callq 0x4a84c
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x481aa
leaq 0x8(%rsp), %rdi
callq 0x4a8b8
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x17c2e
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x17c42
leaq 0x18(%rsp), %rdi
callq 0x156d0
addq $0x30, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4a8b8
jmp 0x17c5a
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x17c69
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, (%rsp)
jmp 0x17c76
movq %rax, %rbx
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x17c8a
leaq 0x18(%rsp), %rdi
callq 0x156d0
movq $0x0, 0x18(%rsp)
jmp 0x17c98
movq %rax, %rbx
movq %rbx, %rdi
callq 0xda70
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x0, (%r15)
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r15, %rcx
callq 0xd470
movq %rax, %r12
cmpl $0x0, (%r15)
cmoveq %rax, %r14
leaq 0x28(%rsp), %r15
leaq 0x3(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x208e8
movq %r12, %rdi
callq 0xd6a0
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x155e4
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x225a8
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x21923
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xd530
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2193e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xd530
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x2196c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x2196c
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21987
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xd530
movq %rbx, %rdi
callq 0xda70
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x4d892(%rip), %rcx     # 0x6fe50
movl $0x7, %edx
movq %rsi, %rdi
xorl %esi, %esi
callq 0xd7e0
testl %eax, %eax
jne 0x22604
leaq 0x4d6a7(%rip), %rsi     # 0x6fc7f
movl $0x7, %edx
movl $0x2, %ecx
movq %rbx, %rdi
callq 0xda40
cmpq $-0x1, %rax
je 0x22604
addq $-0x3, %rax
movl $0x3, %esi
movq %rbx, %rdi
movq %rax, %rdx
callq 0xd110
leaq 0x4d84d(%rip), %rsi     # 0x6fe58
movl $0x2, %ecx
movq %rbx, %rdi
xorl %edx, %edx
callq 0xda40
cmpq $-0x1, %rax
je 0x22669
movq %rax, %r15
leaq 0x4d831(%rip), %r12     # 0x6fe5b
leaq 0x4d827(%rip), %r13     # 0x6fe58
movl $0x2, %edx
movl $0x1, %r8d
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rcx
callq 0xd5e0
incq %r15
movl $0x2, %ecx
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0xda40
movq %rax, %r15
cmpq $-0x1, %rax
jne 0x22631
leaq 0x10(%r14), %rcx
movq %rcx, (%r14)
movq (%rbx), %rdx
leaq 0x10(%rbx), %rax
cmpq %rax, %rdx
je 0x22688
movq %rdx, (%r14)
movq (%rax), %rcx
movq %rcx, 0x10(%r14)
jmp 0x2268e
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%r14)
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq