// File: stetre[P]moonvulkan/src/flags.c
// Function: pushimageaspectflags
static int pushimageaspectflags(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_IMAGE_ASPECT_COLOR_BIT, "color");
    CASE(VK_IMAGE_ASPECT_DEPTH_BIT, "depth");
    CASE(VK_IMAGE_ASPECT_STENCIL_BIT, "stencil");
    CASE(VK_IMAGE_ASPECT_METADATA_BIT, "metadata");
    CASE(VK_IMAGE_ASPECT_PLANE_0_BIT, "plane 0");
    CASE(VK_IMAGE_ASPECT_PLANE_1_BIT, "plane 1");
    CASE(VK_IMAGE_ASPECT_PLANE_2_BIT, "plane 2");
    CASE(VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT, "memory plane 0");
    CASE(VK_IMAGE_ASPECT_MEMORY_PLANE_1_BIT, "memory plane 1");
    CASE(VK_IMAGE_ASPECT_MEMORY_PLANE_2_BIT, "memory plane 2");
    CASE(VK_IMAGE_ASPECT_MEMORY_PLANE_3_BIT, "memory plane 3");
#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 0x4a88d
movq 0x10(%rsp), %rdi
leaq 0x8b5aa(%rip), %rsi     # 0xd5e27
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a88f
jmp 0x4a891
movl 0xc(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4a8b9
movq 0x10(%rsp), %rdi
leaq 0x93e21(%rip), %rsi     # 0xde6ca
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a8bb
jmp 0x4a8bd
movl 0xc(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4a8e5
movq 0x10(%rsp), %rdi
leaq 0x93b40(%rip), %rsi     # 0xde415
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a8e7
jmp 0x4a8e9
movl 0xc(%rsp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x4a911
movq 0x10(%rsp), %rdi
leaq 0x98f1a(%rip), %rsi     # 0xe381b
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a913
jmp 0x4a915
movl 0xc(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x4a93d
movq 0x10(%rsp), %rdi
leaq 0x93af7(%rip), %rsi     # 0xde424
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a93f
jmp 0x4a941
movl 0xc(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x4a969
movq 0x10(%rsp), %rdi
leaq 0x93ada(%rip), %rsi     # 0xde433
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a96b
jmp 0x4a96d
movl 0xc(%rsp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x4a995
movq 0x10(%rsp), %rdi
leaq 0x93abd(%rip), %rsi     # 0xde442
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a997
jmp 0x4a999
movl 0xc(%rsp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x4a9c3
movq 0x10(%rsp), %rdi
leaq 0x93a6a(%rip), %rsi     # 0xde41d
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a9c5
jmp 0x4a9c7
movl 0xc(%rsp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x4a9f1
movq 0x10(%rsp), %rdi
leaq 0x93a4b(%rip), %rsi     # 0xde42c
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4a9f3
jmp 0x4a9f5
movl 0xc(%rsp), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x4aa1f
movq 0x10(%rsp), %rdi
leaq 0x93a2c(%rip), %rsi     # 0xde43b
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4aa21
jmp 0x4aa23
movl 0xc(%rsp), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x4aa4d
movq 0x10(%rsp), %rdi
leaq 0x93a0d(%rip), %rsi     # 0xde44a
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4aa4f
movl 0x8(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)