// File: stetre[P]moonvulkan/src/flags.c
// Function: pushimagecreateflags
static int pushimagecreateflags(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_CREATE_SPARSE_BINDING_BIT, "sparse binding");
        CASE(VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT, "sparse residency");
        CASE(VK_IMAGE_CREATE_SPARSE_ALIASED_BIT, "sparse aliased");
        CASE(VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT, "mutable format");
        CASE(VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT, "cube compatible");
        CASE(VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, "block texel view compatible");
        CASE(VK_IMAGE_CREATE_EXTENDED_USAGE_BIT, "extended usage");
        CASE(VK_IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT, "sample locations compatible depth");
        CASE(VK_IMAGE_CREATE_DISJOINT_BIT, "disjoint");
        CASE(VK_IMAGE_CREATE_ALIAS_BIT, "alias");
        CASE(VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT,"split instance bind regions");
        CASE(VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT,"2d array compatible");
        CASE(VK_IMAGE_CREATE_PROTECTED_BIT, "protected");
        CASE(VK_IMAGE_CREATE_SUBSAMPLED_BIT, "subsampled");
#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 0x4c32d
movq 0x10(%rsp), %rdi
leaq 0x91f1f(%rip), %rsi     # 0xde23c
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4c32f
jmp 0x4c331
movl 0xc(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4c359
movq 0x10(%rsp), %rdi
leaq 0x91f02(%rip), %rsi     # 0xde24b
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4c35b
jmp 0x4c35d
movl 0xc(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4c385
movq 0x10(%rsp), %rdi
leaq 0x91ee7(%rip), %rsi     # 0xde25c
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4c387
jmp 0x4c389
movl 0xc(%rsp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x4c3b1
movq 0x10(%rsp), %rdi
leaq 0x922c3(%rip), %rsi     # 0xde664
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4c3b3
jmp 0x4c3b5
movl 0xc(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x4c3dd
movq 0x10(%rsp), %rdi
leaq 0x922a6(%rip), %rsi     # 0xde673
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4c3df
jmp 0x4c3e1
movl 0xc(%rsp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x4c40b
movq 0x10(%rsp), %rdi
leaq 0x92288(%rip), %rsi     # 0xde683
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4c40d
jmp 0x4c40f
movl 0xc(%rsp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x4c439
movq 0x10(%rsp), %rdi
leaq 0x92276(%rip), %rsi     # 0xde69f
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4c43b
jmp 0x4c43d
movl 0xc(%rsp), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x4c467
movq 0x10(%rsp), %rdi
leaq 0x92257(%rip), %rsi     # 0xde6ae
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4c469
jmp 0x4c46b
movl 0xc(%rsp), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x4c495
movq 0x10(%rsp), %rdi
leaq 0x8b8d2(%rip), %rsi     # 0xd7d57
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4c497
jmp 0x4c499
movl 0xc(%rsp), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x4c4c3
movq 0x10(%rsp), %rdi
leaq 0x91a0b(%rip), %rsi     # 0xddebe
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4c4c5
jmp 0x4c4c7
movl 0xc(%rsp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x4c4ef
movq 0x10(%rsp), %rdi
leaq 0x921f1(%rip), %rsi     # 0xde6d0
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4c4f1
jmp 0x4c4f3
movl 0xc(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x4c51b
movq 0x10(%rsp), %rdi
leaq 0x921e1(%rip), %rsi     # 0xde6ec
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4c51d
jmp 0x4c51f
movl 0xc(%rsp), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x4c549
movq 0x10(%rsp), %rdi
leaq 0x9d59a(%rip), %rsi     # 0xe9ad3
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4c54b
jmp 0x4c54d
movl 0xc(%rsp), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0x4c577
movq 0x10(%rsp), %rdi
leaq 0x92199(%rip), %rsi     # 0xde700
callq 0x1a420
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4c579
movl 0x8(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)