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

#define CASE(CODE,str) do { if( flags & CODE) { lua_pushstring(L, str); n++; } } while(0)
        CASE(VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, "top of pipe");
        CASE(VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT, "draw indirect");
        CASE(VK_PIPELINE_STAGE_VERTEX_INPUT_BIT, "vertex input");
        CASE(VK_PIPELINE_STAGE_VERTEX_SHADER_BIT, "vertex shader");
        CASE(VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT, "tessellation control shader");
        CASE(VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT, "tessellation evaluation shader");
        CASE(VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT, "geometry shader");
        CASE(VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, "fragment shader");
        CASE(VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT, "early fragment tests");
        CASE(VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT, "late fragment tests");
        CASE(VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, "color attachment output");
        CASE(VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, "compute shader");
        CASE(VK_PIPELINE_STAGE_TRANSFER_BIT, "transfer");
        CASE(VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, "bottom of pipe");
        CASE(VK_PIPELINE_STAGE_HOST_BIT, "host");
        CASE(VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT, "conditional rendering");
        CASE(VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT, "transform feedback");
        CASE(VK_PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT, "fragment density process");
        CASE(VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT, "acceleration structure build");
        CASE(VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT, "ray tracing shader");
        CASE(VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT, "fragment shading rate attachment");
        CASE(VK_PIPELINE_STAGE_NONE, "none");
        CASE(VK_PIPELINE_STAGE_COPY_BIT, "copy");
        CASE(VK_PIPELINE_STAGE_RESOLVE_BIT, "resolve");
        CASE(VK_PIPELINE_STAGE_BLIT_BIT, "blit");
        CASE(VK_PIPELINE_STAGE_CLEAR_BIT, "clear");
        CASE(VK_PIPELINE_STAGE_INDEX_INPUT_BIT, "index input");
        CASE(VK_PIPELINE_STAGE_VERTEX_ATTRIBUTE_INPUT_BIT, "vertex attribute input");
        CASE(VK_PIPELINE_STAGE_PRE_RASTERIZATION_SHADERS_BIT, "pre rasterization shaders");
    // These are not individual bits:
        CASE(VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, "all graphics");
        CASE(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, "all commands");
#undef CASE

    return n;
    }

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movq 0x8(%rsp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x4ad11
movq 0x10(%rsp), %rdi
leaq 0x93758(%rip), %rsi     # 0xde459
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4ad13
jmp 0x4ad15
movq 0x8(%rsp), %rax
andq $0x2, %rax
cmpq $0x0, %rax
je 0x4ad40
movq 0x10(%rsp), %rdi
leaq 0x93735(%rip), %rsi     # 0xde465
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4ad42
jmp 0x4ad44
movq 0x8(%rsp), %rax
andq $0x4, %rax
cmpq $0x0, %rax
je 0x4ad6f
movq 0x10(%rsp), %rdi
leaq 0x8bb2a(%rip), %rsi     # 0xd6889
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4ad71
jmp 0x4ad73
movq 0x8(%rsp), %rax
andq $0x8, %rax
cmpq $0x0, %rax
je 0x4ad9e
movq 0x10(%rsp), %rdi
leaq 0x936e5(%rip), %rsi     # 0xde473
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4ada0
jmp 0x4ada2
movq 0x8(%rsp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x4adcd
movq 0x10(%rsp), %rdi
leaq 0x936c4(%rip), %rsi     # 0xde481
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4adcf
jmp 0x4add1
movq 0x8(%rsp), %rax
andq $0x20, %rax
cmpq $0x0, %rax
je 0x4adfc
movq 0x10(%rsp), %rdi
leaq 0x936b1(%rip), %rsi     # 0xde49d
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4adfe
jmp 0x4ae00
movq 0x8(%rsp), %rax
andq $0x40, %rax
cmpq $0x0, %rax
je 0x4ae2b
movq 0x10(%rsp), %rdi
leaq 0x936a1(%rip), %rsi     # 0xde4bc
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4ae2d
jmp 0x4ae2f
movq 0x8(%rsp), %rax
andq $0x80, %rax
cmpq $0x0, %rax
je 0x4ae5c
movq 0x10(%rsp), %rdi
leaq 0x93680(%rip), %rsi     # 0xde4cc
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4ae5e
jmp 0x4ae60
movq 0x8(%rsp), %rax
andq $0x100, %rax            # imm = 0x100
cmpq $0x0, %rax
je 0x4ae8d
movq 0x10(%rsp), %rdi
leaq 0x9365f(%rip), %rsi     # 0xde4dc
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4ae8f
jmp 0x4ae91
movq 0x8(%rsp), %rax
andq $0x200, %rax            # imm = 0x200
cmpq $0x0, %rax
je 0x4aebe
movq 0x10(%rsp), %rdi
leaq 0x93643(%rip), %rsi     # 0xde4f1
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4aec0
jmp 0x4aec2
movq 0x8(%rsp), %rax
andq $0x400, %rax            # imm = 0x400
cmpq $0x0, %rax
je 0x4aeef
movq 0x10(%rsp), %rdi
leaq 0x93626(%rip), %rsi     # 0xde505
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4aef1
jmp 0x4aef3
movq 0x8(%rsp), %rax
andq $0x800, %rax            # imm = 0x800
cmpq $0x0, %rax
je 0x4af20
movq 0x10(%rsp), %rdi
leaq 0x9360d(%rip), %rsi     # 0xde51d
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4af22
jmp 0x4af24
movq 0x8(%rsp), %rax
andq $0x1000, %rax           # imm = 0x1000
cmpq $0x0, %rax
je 0x4af51
movq 0x10(%rsp), %rdi
leaq 0x935eb(%rip), %rsi     # 0xde52c
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4af53
jmp 0x4af55
movq 0x8(%rsp), %rax
andq $0x2000, %rax           # imm = 0x2000
cmpq $0x0, %rax
je 0x4af82
movq 0x10(%rsp), %rdi
leaq 0x935c3(%rip), %rsi     # 0xde535
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4af84
jmp 0x4af86
movq 0x8(%rsp), %rax
andq $0x4000, %rax           # imm = 0x4000
cmpq $0x0, %rax
je 0x4afb3
movq 0x10(%rsp), %rdi
leaq 0x8e425(%rip), %rsi     # 0xd93c8
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4afb5
jmp 0x4afb7
movq 0x8(%rsp), %rax
andq $0x40000, %rax          # imm = 0x40000
cmpq $0x0, %rax
je 0x4afe4
movq 0x10(%rsp), %rdi
leaq 0x9319f(%rip), %rsi     # 0xde173
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4afe6
jmp 0x4afe8
movq 0x8(%rsp), %rax
andq $0x1000000, %rax        # imm = 0x1000000
cmpq $0x0, %rax
je 0x4b015
movq 0x10(%rsp), %rdi
leaq 0x9353f(%rip), %rsi     # 0xde544
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4b017
jmp 0x4b019
movq 0x8(%rsp), %rax
andq $0x800000, %rax         # imm = 0x800000
cmpq $0x0, %rax
je 0x4b046
movq 0x10(%rsp), %rdi
leaq 0x93521(%rip), %rsi     # 0xde557
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4b048
jmp 0x4b04a
movq 0x8(%rsp), %rax
andq $0x2000000, %rax        # imm = 0x2000000
cmpq $0x0, %rax
je 0x4b077
movq 0x10(%rsp), %rdi
leaq 0x93509(%rip), %rsi     # 0xde570
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4b079
jmp 0x4b07b
movq 0x8(%rsp), %rax
andq $0x200000, %rax         # imm = 0x200000
cmpq $0x0, %rax
je 0x4b0a8
movq 0x10(%rsp), %rdi
leaq 0x934f5(%rip), %rsi     # 0xde58d
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4b0aa
jmp 0x4b0ac
movq 0x8(%rsp), %rax
andq $0x400000, %rax         # imm = 0x400000
cmpq $0x0, %rax
je 0x4b0d9
movq 0x10(%rsp), %rdi
leaq 0x934d7(%rip), %rsi     # 0xde5a0
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4b0db
jmp 0x4b0dd
movq 0x8(%rsp), %rax
andq $0x0, %rax
cmpq $0x0, %rax
je 0x4b108
movq 0x10(%rsp), %rdi
leaq 0x9d7be(%rip), %rsi     # 0xe88b6
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4b10a
jmp 0x4b10c
movabsq $0x100000000, %rax      # imm = 0x100000000
andq 0x8(%rsp), %rax
cmpq $0x0, %rax
je 0x4b13d
movq 0x10(%rsp), %rdi
leaq 0x8a96e(%rip), %rsi     # 0xd5a9b
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4b13f
jmp 0x4b141
movabsq $0x200000000, %rax      # imm = 0x200000000
andq 0x8(%rsp), %rax
cmpq $0x0, %rax
je 0x4b172
movq 0x10(%rsp), %rdi
leaq 0x9d765(%rip), %rsi     # 0xe88c7
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4b174
jmp 0x4b176
movabsq $0x400000000, %rax      # imm = 0x400000000
andq 0x8(%rsp), %rax
cmpq $0x0, %rax
je 0x4b1a7
movq 0x10(%rsp), %rdi
leaq 0x9342a(%rip), %rsi     # 0xde5c1
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4b1a9
jmp 0x4b1ab
movabsq $0x800000000, %rax      # imm = 0x800000000
andq 0x8(%rsp), %rax
cmpq $0x0, %rax
je 0x4b1dc
movq 0x10(%rsp), %rdi
leaq 0x8a88c(%rip), %rsi     # 0xd5a58
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4b1de
jmp 0x4b1e0
movabsq $0x1000000000, %rax     # imm = 0x1000000000
andq 0x8(%rsp), %rax
cmpq $0x0, %rax
je 0x4b211
movq 0x10(%rsp), %rdi
leaq 0x933c5(%rip), %rsi     # 0xde5c6
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4b213
jmp 0x4b215
movabsq $0x2000000000, %rax     # imm = 0x2000000000
andq 0x8(%rsp), %rax
cmpq $0x0, %rax
je 0x4b246
movq 0x10(%rsp), %rdi
leaq 0x9339c(%rip), %rsi     # 0xde5d2
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4b248
jmp 0x4b24a
movabsq $0x4000000000, %rax     # imm = 0x4000000000
andq 0x8(%rsp), %rax
cmpq $0x0, %rax
je 0x4b27b
movq 0x10(%rsp), %rdi
leaq 0x9337e(%rip), %rsi     # 0xde5e9
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4b27d
jmp 0x4b27f
movq 0x8(%rsp), %rax
andq $0x8000, %rax           # imm = 0x8000
cmpq $0x0, %rax
je 0x4b2ac
movq 0x10(%rsp), %rdi
leaq 0x92cc9(%rip), %rsi     # 0xddf65
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4b2ae
jmp 0x4b2b0
movq 0x8(%rsp), %rax
andq $0x10000, %rax          # imm = 0x10000
cmpq $0x0, %rax
je 0x4b2dd
movq 0x10(%rsp), %rdi
leaq 0x93336(%rip), %rsi     # 0xde603
callq 0x1a420
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x4b2df
movl 0x4(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)