// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x64cb(%rip), %rdx      # 0x10e90
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x66f0
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x6250
movq %r15, %rdi
movl %ebx, %esi
callq 0x67b0
movl %eax, %esi
movq %r14, %rdi
callq 0x6300
leaq 0x6685(%rip), %rdx      # 0x1107e
pushq $-0x2
popq %rbp
movq %r14, %rdi
movl %ebp, %esi
callq 0x62e0
pushq $0x2
popq %rsi
movq %r15, %rdi
callq 0x67b0
movl %eax, %esi
movq %r14, %rdi
callq 0x6300
leaq 0x6676(%rip), %rdx      # 0x11098
movq %r14, %rdi
movl %ebp, %esi
callq 0x62e0
pushq $0x3
popq %rsi
movq %r15, %rdi
callq 0x67b0
movl %eax, %esi
movq %r14, %rdi
callq 0x6300
leaq 0x6643(%rip), %rdx      # 0x1108b
movq %r14, %rdi
movl %ebp, %esi
callq 0x62e0
pushq $0x4
popq %rsi
movq %r15, %rdi
callq 0x67b0
movl %eax, %esi
movq %r14, %rdi
callq 0x6300
leaq 0x6638(%rip), %rdx      # 0x110a6
movq %r14, %rdi
movl %ebp, %esi
callq 0x62e0
pushq $0x5
popq %rsi
movq %r15, %rdi
callq 0x67b0
movl %eax, %esi
movq %r14, %rdi
callq 0x6300
leaq 0x5c7a(%rip), %rdx      # 0x1070e
movq %r14, %rdi
movl %ebp, %esi
callq 0x62e0
pushq $0x6
popq %rsi
movq %r15, %rdi
callq 0x67b0
movl %eax, %esi
movq %r14, %rdi
callq 0x6300
leaq 0x58f5(%rip), %rdx      # 0x103af
movq %r14, %rdi
movl %ebp, %esi
callq 0x62e0
pushq $0x7
popq %rsi
movq %r15, %rdi
callq 0x67b0
movl %eax, %esi
movq %r14, %rdi
callq 0x6300
leaq 0x655e(%rip), %rdx      # 0x1103e
movq %r14, %rdi
movl %ebp, %esi
callq 0x62e0
pushq $0x8
popq %rsi
movq %r15, %rdi
callq 0x67b0
movl %eax, %esi
movq %r14, %rdi
callq 0x6300
leaq 0x651a(%rip), %rdx      # 0x11020
movq %r14, %rdi
movl %ebp, %esi
callq 0x62e0
pushq $0x9
popq %rsi
movq %r15, %rdi
callq 0x67b0
movl %eax, %esi
movq %r14, %rdi
callq 0x6300
leaq 0x5be9(%rip), %rdx      # 0x10715
movq %r14, %rdi
movl %ebp, %esi
callq 0x62e0
pushq $0xa
popq %rsi
movq %r15, %rdi
callq 0x67b0
movl %eax, %esi
movq %r14, %rdi
callq 0x6300
leaq 0x5bd0(%rip), %rdx      # 0x10722
movq %r14, %rdi
movl %ebp, %esi
callq 0x62e0
pushq $0xb
popq %rsi
movq %r15, %rdi
callq 0x67b0
movl %eax, %esi
movq %r14, %rdi
callq 0x6300
leaq 0x5bb3(%rip), %rdx      # 0x1072b
movq %r14, %rdi
movl %ebp, %esi
callq 0x62e0
pushq $0x12
popq %rsi
movq %r15, %rdi
callq 0x67b0
movl %eax, %esi
movq %r14, %rdi
callq 0x6300
leaq 0x5b98(%rip), %rdx      # 0x10736
movq %r14, %rdi
movl %ebp, %esi
callq 0x62e0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq