// File: /workspace/github_c_makefile_star2_O0/stetre[P]moonassimp/src/bitfields.c
// Function: moonassimp_checkpostprocessflags
unsigned int checkpostprocessflags(lua_State *L, int arg)
/* Accepts an integer or a list of strings starting from index=arg */
    {
    unsigned int flags = 0;
    const char *s;
    
    if(lua_type(L, arg) == LUA_TNUMBER)
        return (unsigned int)luaL_checkinteger(L, arg);

    if(lua_isnone(L, arg))
        return luaL_argerror(L, arg, "missing flags");

    while(lua_isstring(L, arg))
        {
        s = lua_tostring(L, arg++);
#define CASE(CODE,str) if((strcmp(s, str)==0)) do { flags |= CODE; goto done; } while(0)
        CASE(0, "none");
        CASE(aiProcess_CalcTangentSpace,"calc tangent space");
        CASE(aiProcess_JoinIdenticalVertices,"join identical vertices");
        CASE(aiProcess_MakeLeftHanded,"make left handed");
        CASE(aiProcess_Triangulate,"triangulate");
        CASE(aiProcess_RemoveComponent,"remove component");
        CASE(aiProcess_GenNormals,"gen normals");
        CASE(aiProcess_GenSmoothNormals,"gen smooth normals");
        CASE(aiProcess_SplitLargeMeshes,"split large meshes");
        CASE(aiProcess_PreTransformVertices,"pre transform vertices");
        CASE(aiProcess_LimitBoneWeights,"limit bone weights");
        CASE(aiProcess_ValidateDataStructure,"validate data structure");
        CASE(aiProcess_ImproveCacheLocality,"improve cache locality");
        CASE(aiProcess_RemoveRedundantMaterials,"remove redundant materials");
        CASE(aiProcess_FixInfacingNormals,"fix infacing normals");
        CASE(aiProcess_SortByPType,"sort by p type");
        CASE(aiProcess_FindDegenerates,"find degenerates");
        CASE(aiProcess_FindInvalidData,"find invalid data");
        CASE(aiProcess_GenUVCoords,"gen uv coords");
        CASE(aiProcess_TransformUVCoords,"transform uv coords");
        CASE(aiProcess_FindInstances,"find instances");
        CASE(aiProcess_OptimizeMeshes ,"optimize meshes");
        CASE(aiProcess_OptimizeGraph ,"optimize graph");
        CASE(aiProcess_FlipUVs,"flip uvs");
        CASE(aiProcess_FlipWindingOrder ,"flip winding order");
        CASE(aiProcess_SplitByBoneCount ,"split by bone count");
        CASE(aiProcess_Debone ,"debone");
#undef CASE
        return (unsigned int)luaL_argerror(L, --arg, badvalue(L,s));
        done: ;
        }
    return flags;
    }

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl $0x0, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x68e0
cmpl $0x3, %eax
jne 0x858f
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x6440
movl %eax, 0x34(%rsp)
jmp 0x8aa6
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x68e0
cmpl $-0x1, %eax
jne 0x85c0
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
leaq 0xdce3(%rip), %rdx      # 0x16295
callq 0x61c0
movl %eax, 0x34(%rsp)
jmp 0x8aa6
jmp 0x85c2
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x69c0
cmpl $0x0, %eax
je 0x8a9e
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
xorl %eax, %eax
movl %eax, %edx
callq 0x61e0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0xdc2c(%rip), %rsi      # 0x16231
callq 0x6420
cmpl $0x0, %eax
jne 0x8621
jmp 0x8611
movl 0x20(%rsp), %eax
orl $0x0, %eax
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdc76(%rip), %rsi      # 0x162a3
callq 0x6420
cmpl $0x0, %eax
jne 0x8649
jmp 0x8639
movl 0x20(%rsp), %eax
orl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdc61(%rip), %rsi      # 0x162b6
callq 0x6420
cmpl $0x0, %eax
jne 0x8671
jmp 0x8661
movl 0x20(%rsp), %eax
orl $0x2, %eax
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdc51(%rip), %rsi      # 0x162ce
callq 0x6420
cmpl $0x0, %eax
jne 0x8699
jmp 0x8689
movl 0x20(%rsp), %eax
orl $0x4, %eax
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdc3a(%rip), %rsi      # 0x162df
callq 0x6420
cmpl $0x0, %eax
jne 0x86c1
jmp 0x86b1
movl 0x20(%rsp), %eax
orl $0x8, %eax
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdc1e(%rip), %rsi      # 0x162eb
callq 0x6420
cmpl $0x0, %eax
jne 0x86e9
jmp 0x86d9
movl 0x20(%rsp), %eax
orl $0x10, %eax
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdc07(%rip), %rsi      # 0x162fc
callq 0x6420
cmpl $0x0, %eax
jne 0x8711
jmp 0x8701
movl 0x20(%rsp), %eax
orl $0x20, %eax
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdbeb(%rip), %rsi      # 0x16308
callq 0x6420
cmpl $0x0, %eax
jne 0x8739
jmp 0x8729
movl 0x20(%rsp), %eax
orl $0x40, %eax
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdbd6(%rip), %rsi      # 0x1631b
callq 0x6420
cmpl $0x0, %eax
jne 0x8763
jmp 0x8751
movl 0x20(%rsp), %eax
orl $0x80, %eax
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdbbf(%rip), %rsi      # 0x1632e
callq 0x6420
cmpl $0x0, %eax
jne 0x878d
jmp 0x877b
movl 0x20(%rsp), %eax
orl $0x100, %eax            # imm = 0x100
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdbac(%rip), %rsi      # 0x16345
callq 0x6420
cmpl $0x0, %eax
jne 0x87b7
jmp 0x87a5
movl 0x20(%rsp), %eax
orl $0x200, %eax            # imm = 0x200
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdb95(%rip), %rsi      # 0x16358
callq 0x6420
cmpl $0x0, %eax
jne 0x87e1
jmp 0x87cf
movl 0x20(%rsp), %eax
orl $0x400, %eax            # imm = 0x400
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdb83(%rip), %rsi      # 0x16370
callq 0x6420
cmpl $0x0, %eax
jne 0x880b
jmp 0x87f9
movl 0x20(%rsp), %eax
orl $0x800, %eax            # imm = 0x800
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdb70(%rip), %rsi      # 0x16387
callq 0x6420
cmpl $0x0, %eax
jne 0x8835
jmp 0x8823
movl 0x20(%rsp), %eax
orl $0x1000, %eax           # imm = 0x1000
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdb61(%rip), %rsi      # 0x163a2
callq 0x6420
cmpl $0x0, %eax
jne 0x885f
jmp 0x884d
movl 0x20(%rsp), %eax
orl $0x2000, %eax           # imm = 0x2000
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdb4c(%rip), %rsi      # 0x163b7
callq 0x6420
cmpl $0x0, %eax
jne 0x8889
jmp 0x8877
movl 0x20(%rsp), %eax
orl $0x8000, %eax           # imm = 0x8000
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdb31(%rip), %rsi      # 0x163c6
callq 0x6420
cmpl $0x0, %eax
jne 0x88b3
jmp 0x88a1
movl 0x20(%rsp), %eax
orl $0x10000, %eax          # imm = 0x10000
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdb18(%rip), %rsi      # 0x163d7
callq 0x6420
cmpl $0x0, %eax
jne 0x88dd
jmp 0x88cb
movl 0x20(%rsp), %eax
orl $0x20000, %eax          # imm = 0x20000
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdb00(%rip), %rsi      # 0x163e9
callq 0x6420
cmpl $0x0, %eax
jne 0x8907
jmp 0x88f5
movl 0x20(%rsp), %eax
orl $0x40000, %eax          # imm = 0x40000
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdae4(%rip), %rsi      # 0x163f7
callq 0x6420
cmpl $0x0, %eax
jne 0x8931
jmp 0x891f
movl 0x20(%rsp), %eax
orl $0x80000, %eax          # imm = 0x80000
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdace(%rip), %rsi      # 0x1640b
callq 0x6420
cmpl $0x0, %eax
jne 0x895b
jmp 0x8949
movl 0x20(%rsp), %eax
orl $0x100000, %eax         # imm = 0x100000
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xdab3(%rip), %rsi      # 0x1641a
callq 0x6420
cmpl $0x0, %eax
jne 0x8985
jmp 0x8973
movl 0x20(%rsp), %eax
orl $0x200000, %eax         # imm = 0x200000
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xda99(%rip), %rsi      # 0x1642a
callq 0x6420
cmpl $0x0, %eax
jne 0x89af
jmp 0x899d
movl 0x20(%rsp), %eax
orl $0x400000, %eax         # imm = 0x400000
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xda7e(%rip), %rsi      # 0x16439
callq 0x6420
cmpl $0x0, %eax
jne 0x89d9
jmp 0x89c7
movl 0x20(%rsp), %eax
orl $0x800000, %eax         # imm = 0x800000
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xda5d(%rip), %rsi      # 0x16442
callq 0x6420
cmpl $0x0, %eax
jne 0x8a03
jmp 0x89f1
movl 0x20(%rsp), %eax
orl $0x1000000, %eax        # imm = 0x1000000
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xda46(%rip), %rsi      # 0x16455
callq 0x6420
cmpl $0x0, %eax
jne 0x8a2a
jmp 0x8a1b
movl 0x20(%rsp), %eax
orl $0x2000000, %eax        # imm = 0x2000000
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x18(%rsp), %rdi
leaq 0xda33(%rip), %rsi      # 0x16469
callq 0x6420
cmpl $0x0, %eax
jne 0x8a51
jmp 0x8a42
movl 0x20(%rsp), %eax
orl $0x4000000, %eax        # imm = 0x4000000
movl %eax, 0x20(%rsp)
jmp 0x8a99
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x24(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x14(%rsp)
movl %eax, 0x24(%rsp)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0xd7a3(%rip), %rsi      # 0x1621e
movb $0x0, %al
callq 0x63e0
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
movq %rax, %rdx
callq 0x61c0
movl %eax, 0x34(%rsp)
jmp 0x8aa6
jmp 0x85c2
movl 0x20(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nop