// File: /workspace/github_c_makefile_star2_O1/schroeder-lvb[P]sissm/src/api.c
// Function: apiInitAuth
void apiInitAuth( void )
{
    int i, count;
    char varImg[256];
    cfsPtr cP ;

    cP = cfsCreate( sissmGetConfigPath() );

    // read the AUTH related permission block
    //
    strlcpy( rootguids,       cfsFetchStr( cP, "sissm.rootguids", ""),      API_LINE_STRING_MAX );
    strlcpy( rootname,        cfsFetchStr( cP, "sissm.rootname",  ""),      API_LINE_STRING_MAX );

    strlcpy( everyoneCmds,    cfsFetchStr( cP, "sissm.everyonecmds", "" ),  API_CMDS_STRING_MAX );
    strlcpy( everyoneMacros,  cfsFetchStr( cP, "sissm.everyonemcrs", "" ),  API_CMDS_STRING_MAX );
    strlcpy( everyoneAttr,    cfsFetchStr( cP, "sissm.everyoneattr", "" ),  API_LINE_STRING_MAX );

    strlcpy( soloAdminCmds,   cfsFetchStr( cP, "sissm.soloadmincmds", "" ), API_CMDS_STRING_MAX );
    strlcpy( soloAdminMacros, cfsFetchStr( cP, "sissm.soloadminmcrs", "" ), API_CMDS_STRING_MAX );
    strlcpy( soloAdminAttr,   cfsFetchStr( cP, "sissm.soloadminattr", "" ), API_LINE_STRING_MAX );

    for (i=0; i<API_MAX_GROUPS; i++) {
        snprintf( varImg, 256, "sissm.groupname[%d]", i);
            strlcpy( groups[i].groupname, cfsFetchStr( cP, varImg, "" ), API_LINE_STRING_MAX );
        snprintf( varImg, 256, "sissm.groupcmds[%d]", i);
            strlcpy( groups[i].groupcmds, cfsFetchStr( cP, varImg, "" ), API_CMDS_STRING_MAX );
        snprintf( varImg, 256, "sissm.groupmcrs[%d]", i);
            strlcpy( groups[i].groupmacros, cfsFetchStr( cP, varImg, "" ), API_CMDS_STRING_MAX );
        snprintf( varImg, 256, "sissm.groupattr[%d]", i);
            strlcpy( groups[i].groupattr, cfsFetchStr( cP, varImg, "" ), API_LINE_STRING_MAX );
        snprintf( varImg, 256, "sissm.groupguid[%d]", i);
            strlcpy( groups[i].groupguid, cfsFetchStr( cP, varImg, "" ), API_LINE_STRING_MAX );

        if (( 0 != strlen( groups[i].groupguid ) ) && ( 0 != strlen( groups[i].groupname ) )) {
            count = apiIdListRead( groups[i].groupguid, groups[i].groupIdList );
            logPrintf(LOG_LEVEL_INFO, "api", "Read Group List ::%s:: count %d", groups[i].groupname, count );
        }
    }
    cfsDestroy( cP );

    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
callq 0x8969
movq %rax, %rdi
callq 0x9004
movq %rax, %r14
leaq 0xc3df(%rip), %rsi      # 0x1e106
leaq 0x99e3(%rip), %rbx      # 0x1b711
movq %rax, %rdi
movq %rbx, %rdx
callq 0x907b
leaq 0xdfa80(%rip), %rdi     # 0xf17c0
movl $0x100, %edx            # imm = 0x100
movq %rax, %rsi
callq 0xf038
leaq 0xc3c2(%rip), %rsi      # 0x1e116
movq %r14, %rdi
movq %rbx, %rdx
callq 0x907b
leaq 0xdfb5a(%rip), %rdi     # 0xf18c0
movl $0x100, %edx            # imm = 0x100
movq %rax, %rsi
callq 0xf038
leaq 0xc3ab(%rip), %rsi      # 0x1e125
movq %r14, %rdi
movq %rbx, %rdx
callq 0x907b
leaq 0xdfc34(%rip), %rdi     # 0xf19c0
movl $0x200, %edx            # imm = 0x200
movq %rax, %rsi
callq 0xf038
leaq 0xc398(%rip), %rsi      # 0x1e138
movq %r14, %rdi
movq %rbx, %rdx
callq 0x907b
leaq 0xdfe0e(%rip), %rdi     # 0xf1bc0
movl $0x200, %edx            # imm = 0x200
movq %rax, %rsi
callq 0xf038
leaq 0xc385(%rip), %rsi      # 0x1e14b
movq %r14, %rdi
movq %rbx, %rdx
callq 0x907b
leaq 0xdffe8(%rip), %rdi     # 0xf1dc0
movl $0x100, %edx            # imm = 0x100
movq %rax, %rsi
callq 0xf038
leaq 0xc372(%rip), %rsi      # 0x1e15e
movq %r14, %rdi
movq %rbx, %rdx
callq 0x907b
leaq 0xe00c2(%rip), %rdi     # 0xf1ec0
movl $0x200, %edx            # imm = 0x200
movq %rax, %rsi
callq 0xf038
leaq 0xc360(%rip), %rsi      # 0x1e172
movq %r14, %rdi
movq %rbx, %rdx
callq 0x907b
leaq 0xe029c(%rip), %rdi     # 0xf20c0
movl $0x200, %edx            # imm = 0x200
movq %rax, %rsi
callq 0xf038
leaq 0xc34e(%rip), %rsi      # 0x1e186
movq %r14, (%rsp)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x907b
leaq 0xe0472(%rip), %rdi     # 0xf22c0
movl $0x100, %edx            # imm = 0x100
movq %rax, %rsi
callq 0xf038
xorl %r14d, %r14d
xorl %ebp, %ebp
movq (%rsp), %r15
movl $0x100, %esi            # imm = 0x100
leaq 0x10(%rsp), %r12
movq %r12, %rdi
leaq 0xc322(%rip), %rdx      # 0x1e19a
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8190
leaq 0xe0538(%rip), %rax     # 0xf23c0
leaq (%rax,%r14), %r13
movq %r13, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
leaq 0x9873(%rip), %rdx      # 0x1b711
callq 0x907b
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
movq %rax, %rsi
callq 0xf038
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
leaq 0xc2ec(%rip), %rdx      # 0x1e1ae
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8190
leaq 0xe04ee(%rip), %rbx     # 0xf23c0
leaq (%r14,%rbx), %r13
addq $0x100, %r13            # imm = 0x100
movq %r15, %rdi
movq %r12, %rsi
leaq 0x9827(%rip), %rdx      # 0x1b711
callq 0x907b
movl $0x200, %edx            # imm = 0x200
movq %r13, %rdi
movq %rax, %rsi
callq 0xf038
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
leaq 0xc2b4(%rip), %rdx      # 0x1e1c2
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8190
leaq (%r14,%rbx), %r13
addq $0x300, %r13            # imm = 0x300
movq %r15, %rdi
movq %r12, %rsi
leaq 0x97e2(%rip), %rbx      # 0x1b711
movq %rbx, %rdx
callq 0x907b
movl $0x200, %edx            # imm = 0x200
movq %r13, %rdi
movq %rax, %rsi
callq 0xf038
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
leaq 0xc280(%rip), %rdx      # 0x1e1d6
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8190
leaq 0xe045a(%rip), %rax     # 0xf23c0
leaq (%r14,%rax), %r13
addq $0x500, %r13            # imm = 0x500
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x907b
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
movq %rax, %rsi
callq 0xf038
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
leaq 0xc24c(%rip), %rdx      # 0x1e1ea
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8190
leaq 0xe0412(%rip), %rax     # 0xf23c0
leaq (%r14,%rax), %r13
addq $0x600, %r13            # imm = 0x600
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq 0x8(%rsp), %rbx
callq 0x907b
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
movq %rax, %rsi
callq 0xf038
cmpb $0x0, (%r13)
je 0x12022
cmpb $0x0, (%rbx)
je 0x12022
leaq 0xe03d1(%rip), %rax     # 0xf23c0
leaq (%r14,%rax), %rsi
addq $0x700, %rsi            # imm = 0x700
movq %r13, %rdi
callq 0x10f88
movl $0x2, %edi
leaq 0xbe81(%rip), %rsi      # 0x1de8f
leaq 0xc1e9(%rip), %rdx      # 0x1e1fe
movq %rbx, %rcx
movl %eax, %r8d
xorl %eax, %eax
callq 0x1a227
incl %ebp
addq $0x10700, %r14          # imm = 0x10700
cmpq $0x62a00, %r14          # imm = 0x62A00
jne 0x11e64
movq (%rsp), %rdi
callq 0x905c
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq