// File: /workspace/github_c_makefile_star2_O3/stetre[P]moonassimp/src/material.c
// Function: AllTextureCounts
static int AllTextureCounts(lua_State *L)
    {
    unsigned int count;
    material_t *material = checkmaterial(L, 1);
    lua_newtable(L);
#define ADD(t, s) do {                                                  \
    count = aiGetMaterialTextureCount(material, aiTextureType_##t);     \
    lua_pushinteger(L, count);                                          \
    lua_setfield(L, -2, s);                                             \
} while(0)
//  ADD(NONE, "none");
    ADD(DIFFUSE, "diffuse");
    ADD(SPECULAR, "specular");
    ADD(AMBIENT, "ambient");
    ADD(EMISSIVE, "emissive");
    ADD(HEIGHT, "height");
    ADD(NORMALS, "normals");
    ADD(SHININESS, "shininess");
    ADD(OPACITY, "opacity");
    ADD(DISPLACEMENT, "displacement");
    ADD(LIGHTMAP, "lightmap");
    ADD(REFLECTION, "reflection");
    ADD(UNKNOWN, "unknown");
#undef ADD
    return 1;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x62b9(%rip), %rdx      # 0x10e90
movl $0x1, %esi
callq 0x66f0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
movq %r14, %rdi
movl $0x1, %esi
callq 0x67b0
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
leaq 0x6470(%rip), %rdx      # 0x1107e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x62e0
movq %r14, %rdi
movl $0x2, %esi
callq 0x67b0
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
leaq 0x645f(%rip), %rdx      # 0x11098
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x62e0
movq %r14, %rdi
movl $0x3, %esi
callq 0x67b0
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
leaq 0x6427(%rip), %rdx      # 0x1108b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x62e0
movq %r14, %rdi
movl $0x4, %esi
callq 0x67b0
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
leaq 0x6417(%rip), %rdx      # 0x110a6
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x62e0
movq %r14, %rdi
movl $0x5, %esi
callq 0x67b0
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
leaq 0x5a54(%rip), %rdx      # 0x1070e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x62e0
movq %r14, %rdi
movl $0x6, %esi
callq 0x67b0
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
leaq 0x56ca(%rip), %rdx      # 0x103af
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x62e0
movq %r14, %rdi
movl $0x7, %esi
callq 0x67b0
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
leaq 0x632e(%rip), %rdx      # 0x1103e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x62e0
movq %r14, %rdi
movl $0x8, %esi
callq 0x67b0
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
leaq 0x62e5(%rip), %rdx      # 0x11020
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x62e0
movq %r14, %rdi
movl $0x9, %esi
callq 0x67b0
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
leaq 0x59af(%rip), %rdx      # 0x10715
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x62e0
movq %r14, %rdi
movl $0xa, %esi
callq 0x67b0
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
leaq 0x5991(%rip), %rdx      # 0x10722
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x62e0
movq %r14, %rdi
movl $0xb, %esi
callq 0x67b0
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
leaq 0x596f(%rip), %rdx      # 0x1072b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x62e0
movq %r14, %rdi
movl $0x12, %esi
callq 0x67b0
movl %eax, %esi
movq %rbx, %rdi
callq 0x6300
leaq 0x594f(%rip), %rdx      # 0x10736
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x62e0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq