// File: stetre[P]moonvulkan/src/flags.c
// Function: pushquerypipelinestatisticflags
static int pushquerypipelinestatisticflags(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_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT, "input assembly vertices");
    CASE(VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT, "input assembly primitives");
    CASE(VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT, "vertex shader invocations");
    CASE(VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT, "geometry shader invocations");
    CASE(VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT, "geometry shader primitives");
    CASE(VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, "clipping invocations");
    CASE(VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT, "clipping primitives");
    CASE(VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT, "fragment shader invocations");
    CASE(VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT, "tessellation control shader patches");
    CASE(VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT, "tessellation evaluation shader invocations");
    CASE(VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT, "compute shader invocations");
#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 0x4a00d
movq 0x10(%rsp), %rdi
leaq 0x942a6(%rip), %rsi     # 0xde2a3
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a00f
jmp 0x4a011
movl 0xc(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4a039
movq 0x10(%rsp), %rdi
leaq 0x94292(%rip), %rsi     # 0xde2bb
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a03b
jmp 0x4a03d
movl 0xc(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4a065
movq 0x10(%rsp), %rdi
leaq 0x94280(%rip), %rsi     # 0xde2d5
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a067
jmp 0x4a069
movl 0xc(%rsp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x4a091
movq 0x10(%rsp), %rdi
leaq 0x9426e(%rip), %rsi     # 0xde2ef
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a093
jmp 0x4a095
movl 0xc(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x4a0bd
movq 0x10(%rsp), %rdi
leaq 0x9425e(%rip), %rsi     # 0xde30b
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a0bf
jmp 0x4a0c1
movl 0xc(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x4a0e9
movq 0x10(%rsp), %rdi
leaq 0x9424d(%rip), %rsi     # 0xde326
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a0eb
jmp 0x4a0ed
movl 0xc(%rsp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x4a115
movq 0x10(%rsp), %rdi
leaq 0x94236(%rip), %rsi     # 0xde33b
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a117
jmp 0x4a119
movl 0xc(%rsp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x4a143
movq 0x10(%rsp), %rdi
leaq 0x9421c(%rip), %rsi     # 0xde34f
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a145
jmp 0x4a147
movl 0xc(%rsp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x4a171
movq 0x10(%rsp), %rdi
leaq 0x9420a(%rip), %rsi     # 0xde36b
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a173
jmp 0x4a175
movl 0xc(%rsp), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x4a19f
movq 0x10(%rsp), %rdi
leaq 0x94200(%rip), %rsi     # 0xde38f
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a1a1
jmp 0x4a1a3
movl 0xc(%rsp), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x4a1cd
movq 0x10(%rsp), %rdi
leaq 0x941fd(%rip), %rsi     # 0xde3ba
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a1cf
movl 0x8(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)