// File: /workspace/github_cpp_makefile_star2_O3/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
movl $0x0, 0xc(%rsp)
leaq 0x6dc22(%rip), %rcx     # 0x8c909
leaq 0x20(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a4e0
movq %rax, %r12
movq (%r14), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x570(%rax)
je 0x1eda9
movq %rbx, %rdi
movl $0x2, %esi
callq 0x190e0
movq %rax, %r13
leaq 0x6d2d8(%rip), %r8      # 0x8c000
movl $0x3, %ebp
leaq 0x14(%rsp), %rdx
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movl $0x3, %esi
movq %r15, %rcx
callq 0x199b0
movq %rax, %r14
cmpl $0x0, (%r15)
je 0x1edbf
xorl %r15d, %r15d
xorl %r13d, %r13d
testq %r14, %r14
je 0x1ed66
movq %rbx, %rdi
movq %r14, %rsi
callq 0x182d0
testq %r15, %r15
je 0x1ed76
movq %rbx, %rdi
movq %r15, %rsi
callq 0x182d0
testq %r13, %r13
je 0x1ed86
movq %rbx, %rdi
movq %r13, %rsi
callq 0x182d0
movl 0xc(%rsp), %edi
testl %edi, %edi
je 0x1ee4a
callq 0x19930
movq %rbx, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x18410
jmp 0x1ee4c
leaq 0x6df7e(%rip), %rsi     # 0x8cd2e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19ba0
jmp 0x1ee4c
movq %r13, 0x18(%rsp)
movl $0x4, %ebp
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %r13
movq %rbx, %rdi
movl $0x4, %esi
movq %r13, %rcx
callq 0x19e70
movq %rax, %r15
movl (%r13), %eax
testl %eax, %eax
je 0x1edff
cmpl $0x1, %eax
jne 0x1ed53
movl $0x0, 0xc(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x14(%rsp), %eax
jne 0x1ee5b
movl $0x5, %ebp
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %rcx
movq %rbx, %rdi
movl $0x5, %esi
callq 0x19e70
movq %rax, %r13
leaq 0xc(%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
je 0x1ee68
cmpl $0x1, %eax
jne 0x1ed56
movl $0x0, 0xc(%rsp)
movl 0x14(%rsp), %edx
jmp 0x1ee72
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xfffffff9, 0xc(%rsp)  # imm = 0xFFFFFFF9
jmp 0x1ed53
movl 0x10(%rsp), %edx
cmpl 0x14(%rsp), %edx
jne 0x1ee9c
movq 0x20(%rsp), %rax
movq 0x50(%rax), %rax
movq %r12, %rdi
movq 0x18(%rsp), %rsi
movq %r14, %rcx
movq %r15, %r8
movq %r13, %r9
callq *0x570(%rax)
movl $0x1, %ebp
jmp 0x1ed56
movl $0xfffffff9, 0xc(%rsp)  # imm = 0xFFFFFFF9
jmp 0x1ed56