// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/cmd.c
// Function: CmdSetVertexInput
static int CmdSetVertexInput(lua_State *L)
    {
    int err;
    ud_t *ud;
    uint32_t bcount, acount;
    const VkVertexInputBindingDescription2EXT *bdescr = NULL;
    const VkVertexInputAttributeDescription2EXT *adescr = NULL;
    VkCommandBuffer cb = checkcommand_buffer(L, 1, &ud);
    CheckDevicePfn(L, ud, CmdSetVertexInputEXT);
#define CLEANUP do {                                                                    \
    if(bdescr) zfreearrayVkVertexInputBindingDescription2EXT(L, bdescr, bcount, 1);     \
    if(adescr) zfreearrayVkVertexInputAttributeDescription2EXT(L, adescr, acount, 1);   \
} while(0)
    bdescr = zcheckarrayVkVertexInputBindingDescription2EXT(L, 2, &bcount, &err);
    if(err < 0 && err != ERR_EMPTY) { CLEANUP; return argerror(L, 2); }
    adescr = zcheckarrayVkVertexInputAttributeDescription2EXT(L, 3, &acount, &err);
    if(err < 0 && err != ERR_EMPTY) { CLEANUP; return argerror(L, 3); }
    ud->ddt->CmdSetVertexInputEXT(cb, bcount, bdescr, acount, adescr);
    CLEANUP;
#undef CLEANUP
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x5e080(%rip), %rcx     # 0x7d909
pushq $0x1
popq %rsi
leaq 0x10(%rsp), %r14
movq %r14, %rdx
callq 0x1a500
movq %rax, %r12
movq (%r14), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x810(%rax)
je 0x1f909
pushq $0x2
popq %rsi
leaq 0x4(%rsp), %rdx
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rcx
callq 0x19e40
movq %rax, %r14
movl (%r15), %eax
testl %eax, %eax
setns %cl
cmpl $-0x5, %eax
sete %al
orb %cl, %al
jne 0x1f91c
testq %r14, %r14
je 0x1f8f5
movl 0x4(%rsp), %ecx
pushq $0x20
popq %rdx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x197e0
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x2
jmp 0x1f98f
leaq 0x5e87e(%rip), %rsi     # 0x7e18e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
jmp 0x1f99b
pushq $0x3
popq %rsi
leaq 0x8(%rsp), %rdx
leaq 0xc(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rcx
callq 0x18610
movq %rax, %r15
movl (%r13), %eax
testl %eax, %eax
setns %cl
cmpl $-0x5, %eax
sete %al
orb %cl, %al
jne 0x1f9ae
testq %r14, %r14
je 0x1f965
movl 0x4(%rsp), %ecx
pushq $0x20
popq %rdx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x197e0
testq %r15, %r15
je 0x1f980
movl 0x8(%rsp), %ecx
pushq $0x20
popq %rdx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x197e0
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x18680
pushq $0x3
popq %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x18420
movl %eax, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
movl 0x4(%rsp), %esi
movl 0x8(%rsp), %ecx
movq %r12, %rdi
movq %r14, %rdx
movq %r15, %r8
callq *0x810(%rax)
testq %r14, %r14
je 0x1f9e9
movl 0x4(%rsp), %ecx
pushq $0x20
popq %rdx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x197e0
xorl %ebp, %ebp
testq %r15, %r15
je 0x1f99d
movl 0x8(%rsp), %ecx
pushq $0x20
popq %rdx
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x197e0
jmp 0x1f99d