// File: /workspace/github_cpp_makefile_star2_O2/stetre[P]moonvulkan/src/cmd.c
// Function: CmdBindTransformFeedbackBuffers
static int CmdBindTransformFeedbackBuffers(lua_State *L)
    {
    int err = 0, errargc=1;
    ud_t *ud;
    uint32_t first_binding, count, count1;
    VkBuffer* buffers = NULL;
    VkDeviceSize *offsets = NULL;
    VkDeviceSize *sizes = NULL;
    VkCommandBuffer cb = checkcommand_buffer(L, 1, &ud);
    CheckDevicePfn(L, ud, CmdBindTransformFeedbackBuffersEXT);

    first_binding = luaL_checkinteger(L, 2);

    buffers = checkbufferlist(L, 3, &count, &err);
    if(err) { errargc=3; goto failure; }

    offsets = checkdevicesizelist(L, 4, &count1, &err);
    if(err == ERR_NOTPRESENT) err = 0;
    else if(err) { errargc=4; goto failure; }
    if(count1 != count) { err=ERR_LENGTH; errargc=4; goto failure; }

    sizes = checkdevicesizelist(L, 5, &count1, &err);
    if(err == ERR_NOTPRESENT) err = 0;
    else if(err) { errargc=5; goto failure; }
    else if(count1 != count) { err=ERR_LENGTH; errargc=5; goto failure; }

    ud->ddt->CmdBindTransformFeedbackBuffersEXT(cb, first_binding, count, buffers, offsets, sizes);
failure:
    if(buffers) Free(L, buffers);
    if(offsets) Free(L, offsets);
    if(sizes) Free(L, sizes);
    return err ? argerrorc(L, errargc, err) : 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
andl $0x0, 0xc(%rsp)
leaq 0x5f086(%rip), %rcx     # 0x7d909
pushq $0x1
popq %rbp
leaq 0x20(%rsp), %r14
movl %ebp, %esi
movq %r14, %rdx
callq 0x1a500
movq (%r14), %rcx
movq 0x50(%rcx), %rcx
cmpq $0x0, 0x570(%rcx)
je 0x1e8f3
movq %rax, 0x18(%rsp)
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x190d0
movq %rax, %r12
leaq 0x5e740(%rip), %r8      # 0x7d000
pushq $0x3
popq %r13
leaq 0x14(%rsp), %rdx
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movl %r13d, %esi
movq %r15, %rcx
callq 0x199d0
movq %rax, %r14
cmpl $0x0, (%r15)
je 0x1e909
xorl %r15d, %r15d
movl %r13d, %ebp
xorl %r13d, %r13d
jmp 0x1e985
leaq 0x5f434(%rip), %rsi     # 0x7dd2e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19bc0
jmp 0x1e9d3
pushq $0x4
popq %rsi
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %r13
movq %rbx, %rdi
movq %r13, %rcx
callq 0x19e90
movq %rax, %r15
movl (%r13), %eax
testl %eax, %eax
je 0x1e936
cmpl $0x1, %eax
jne 0x1e97f
andl $0x0, 0xc(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x14(%rsp), %eax
jne 0x1e977
pushq $0x5
popq %rsi
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %rcx
movq %rbx, %rdi
callq 0x19e90
movq %rax, %r13
leaq 0xc(%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
je 0x1e9e2
cmpl $0x1, %eax
jne 0x1ea19
andl $0x0, 0xc(%rsp)
movl 0x14(%rsp), %edx
jmp 0x1e9ec
movl $0xfffffff9, 0xc(%rsp)  # imm = 0xFFFFFFF9
xorl %r13d, %r13d
pushq $0x4
popq %rbp
testq %r14, %r14
je 0x1e995
movq %rbx, %rdi
movq %r14, %rsi
callq 0x182e0
testq %r15, %r15
je 0x1e9a5
movq %rbx, %rdi
movq %r15, %rsi
callq 0x182e0
testq %r13, %r13
je 0x1e9b5
movq %rbx, %rdi
movq %r13, %rsi
callq 0x182e0
movl 0xc(%rsp), %edi
testl %edi, %edi
je 0x1e9d1
callq 0x19950
movq %rbx, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x1e9d3
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x10(%rsp), %edx
cmpl 0x14(%rsp), %edx
jne 0x1ea11
movq 0x20(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x18(%rsp), %rdi
movl %r12d, %esi
movq %r14, %rcx
movq %r15, %r8
movq %r13, %r9
callq *0x570(%rax)
jmp 0x1e985
movl $0xfffffff9, 0xc(%rsp)  # imm = 0xFFFFFFF9
pushq $0x5
jmp 0x1e984