// File: /workspace/github_cpp_makefile_star2_O1/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 0x70b7c(%rip), %rcx     # 0x8f909
leaq 0x20(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x1a520
movq %rax, %r12
movq (%r14), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x570(%rax)
je 0x1ee4f
movq %rbx, %rdi
movl $0x2, %esi
callq 0x190f0
movq %rax, %r13
leaq 0x70232(%rip), %r8      # 0x8f000
movl $0x3, %ebp
leaq 0x14(%rsp), %rdx
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movl $0x3, %esi
movq %r15, %rcx
callq 0x199f0
movq %rax, %r14
cmpl $0x0, (%r15)
je 0x1ee65
xorl %r15d, %r15d
xorl %r13d, %r13d
testq %r14, %r14
je 0x1ee0c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x182e0
testq %r15, %r15
je 0x1ee1c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x182e0
testq %r13, %r13
je 0x1ee2c
movq %rbx, %rdi
movq %r13, %rsi
callq 0x182e0
movl 0xc(%rsp), %edi
testl %edi, %edi
je 0x1eeec
callq 0x19970
movq %rbx, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x18420
jmp 0x1eeee
leaq 0x70ed8(%rip), %rsi     # 0x8fd2e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x19be0
jmp 0x1eeee
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 0x19eb0
movq %rax, %r15
movl (%r13), %eax
testl %eax, %eax
je 0x1eea5
cmpl $0x1, %eax
jne 0x1edf9
movl $0x0, 0xc(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x14(%rsp), %eax
jne 0x1eefd
movl $0x5, %ebp
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %rcx
movq %rbx, %rdi
movl $0x5, %esi
callq 0x19eb0
movq %rax, %r13
leaq 0xc(%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
je 0x1ef0a
cmpl $0x1, %eax
jne 0x1edfc
movl $0x0, 0xc(%rsp)
jmp 0x1ef14
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 0x1edf9
movl 0x10(%rsp), %eax
cmpl 0x14(%rsp), %eax
jne 0x1ef42
movq 0x20(%rsp), %rax
movq 0x50(%rax), %rax
movl 0x14(%rsp), %edx
movq %r12, %rdi
movq 0x18(%rsp), %rsi
movq %r14, %rcx
movq %r15, %r8
movq %r13, %r9
callq *0x570(%rax)
movl $0x1, %ebp
jmp 0x1edfc
movl $0xfffffff9, 0xc(%rsp)  # imm = 0xFFFFFFF9
jmp 0x1edfc