// File: stetre[P]moonvulkan/src/flags.c
// Function: pushpipelinecreateflags
static int pushpipelinecreateflags(lua_State *L, VkFlags flags)
    {
    int n = 0;

#define CASE(CODE,str) do { if( flags & CODE) { lua_pushstring(L, str); n++; } } while(0)
    CASE(VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT, "disable optimization");
    CASE(VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT, "allow derivatives");
    CASE(VK_PIPELINE_CREATE_DERIVATIVE_BIT, "derivative");
    CASE(VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT, "view index from device index");
    CASE(VK_PIPELINE_CREATE_DISPATCH_BASE, "dispatch base");
    CASE(VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT, "ray tracing no null any hit shaders");
    CASE(VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT, "ray tracing no null closest hit shaders");
    CASE(VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT, "ray tracing no null miss shaders");
    CASE(VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT, "ray tracing no null intersection shaders");
    CASE(VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT, "ray tracing skip triangles");
    CASE(VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT, "ray tracing skip aabbs");
    CASE(VK_PIPELINE_CREATE_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT, "ray tracing shader group handle capture replay");
    CASE(VK_PIPELINE_CREATE_CAPTURE_STATISTICS_BIT, "capture statistics");
    CASE(VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT, "capture internal representations");
    CASE(VK_PIPELINE_CREATE_LIBRARY_BIT, "library");
    CASE(VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT, "fail on pipeline compile required");
    CASE(VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT, "early return on failure");
#undef CASE

    return n;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movl 0xc(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x48ebd
movq 0x10(%rsp), %rdi
leaq 0x950c5(%rip), %rsi     # 0xddf72
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x48ebf
jmp 0x48ec1
movl 0xc(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x48ee9
movq 0x10(%rsp), %rdi
leaq 0x950ae(%rip), %rsi     # 0xddf87
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x48eeb
jmp 0x48eed
movl 0xc(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x48f15
movq 0x10(%rsp), %rdi
leaq 0x95094(%rip), %rsi     # 0xddf99
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x48f17
jmp 0x48f19
movl 0xc(%rsp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x48f41
movq 0x10(%rsp), %rdi
leaq 0x95073(%rip), %rsi     # 0xddfa4
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x48f43
jmp 0x48f45
movl 0xc(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x48f6d
movq 0x10(%rsp), %rdi
leaq 0x95064(%rip), %rsi     # 0xddfc1
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x48f6f
jmp 0x48f71
movl 0xc(%rsp), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0x48f9b
movq 0x10(%rsp), %rdi
leaq 0x95044(%rip), %rsi     # 0xddfcf
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x48f9d
jmp 0x48f9f
movl 0xc(%rsp), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0x48fc9
movq 0x10(%rsp), %rdi
leaq 0x9503a(%rip), %rsi     # 0xddff3
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x48fcb
jmp 0x48fcd
movl 0xc(%rsp), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
je 0x48ff7
movq 0x10(%rsp), %rdi
leaq 0x95034(%rip), %rsi     # 0xde01b
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x48ff9
jmp 0x48ffb
movl 0xc(%rsp), %eax
andl $0x20000, %eax          # imm = 0x20000
cmpl $0x0, %eax
je 0x49025
movq 0x10(%rsp), %rdi
leaq 0x95027(%rip), %rsi     # 0xde03c
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x49027
jmp 0x49029
movl 0xc(%rsp), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x49053
movq 0x10(%rsp), %rdi
leaq 0x95022(%rip), %rsi     # 0xde065
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x49055
jmp 0x49057
movl 0xc(%rsp), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x49081
movq 0x10(%rsp), %rdi
leaq 0x9500f(%rip), %rsi     # 0xde080
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x49083
jmp 0x49085
movl 0xc(%rsp), %eax
andl $0x80000, %eax          # imm = 0x80000
cmpl $0x0, %eax
je 0x490af
movq 0x10(%rsp), %rdi
leaq 0x94ff8(%rip), %rsi     # 0xde097
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x490b1
jmp 0x490b3
movl 0xc(%rsp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x490db
movq 0x10(%rsp), %rdi
leaq 0x94ffb(%rip), %rsi     # 0xde0c6
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x490dd
jmp 0x490df
movl 0xc(%rsp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x49109
movq 0x10(%rsp), %rdi
leaq 0x94fe0(%rip), %rsi     # 0xde0d9
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4910b
jmp 0x4910d
movl 0xc(%rsp), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x49137
movq 0x10(%rsp), %rdi
leaq 0x94fd3(%rip), %rsi     # 0xde0fa
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x49139
jmp 0x4913b
movl 0xc(%rsp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x49165
movq 0x10(%rsp), %rdi
leaq 0x94fad(%rip), %rsi     # 0xde102
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x49167
jmp 0x49169
movl 0xc(%rsp), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x49193
movq 0x10(%rsp), %rdi
leaq 0x94fa1(%rip), %rsi     # 0xde124
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x49195
movl 0x8(%rsp), %eax
addq $0x18, %rsp
retq
nop