// File: /workspace/github_c_makefile_star2_O3/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 0x8970
movq %rax, %rdi
callq 0x8ffc
movq %rax, %r14
leaq 0xc052(%rip), %rsi      # 0x1e0f6
leaq 0x965e(%rip), %rbx      # 0x1b709
movq %rax, %rdi
movq %rbx, %rdx
callq 0x9073
leaq 0xdf703(%rip), %rdi     # 0xf17c0
movl $0x100, %edx            # imm = 0x100
movq %rax, %rsi
callq 0xf384
leaq 0xc035(%rip), %rsi      # 0x1e106
movq %r14, %rdi
movq %rbx, %rdx
callq 0x9073
leaq 0xdf7dd(%rip), %rdi     # 0xf18c0
movl $0x100, %edx            # imm = 0x100
movq %rax, %rsi
callq 0xf384
leaq 0xc01e(%rip), %rsi      # 0x1e115
movq %r14, %rdi
movq %rbx, %rdx
callq 0x9073
leaq 0xdf8b7(%rip), %rdi     # 0xf19c0
movl $0x200, %edx            # imm = 0x200
movq %rax, %rsi
callq 0xf384
leaq 0xc00b(%rip), %rsi      # 0x1e128
movq %r14, %rdi
movq %rbx, %rdx
callq 0x9073
leaq 0xdfa91(%rip), %rdi     # 0xf1bc0
movl $0x200, %edx            # imm = 0x200
movq %rax, %rsi
callq 0xf384
leaq 0xbff8(%rip), %rsi      # 0x1e13b
movq %r14, %rdi
movq %rbx, %rdx
callq 0x9073
leaq 0xdfc6b(%rip), %rdi     # 0xf1dc0
movl $0x100, %edx            # imm = 0x100
movq %rax, %rsi
callq 0xf384
leaq 0xbfe5(%rip), %rsi      # 0x1e14e
movq %r14, %rdi
movq %rbx, %rdx
callq 0x9073
leaq 0xdfd45(%rip), %rdi     # 0xf1ec0
movl $0x200, %edx            # imm = 0x200
movq %rax, %rsi
callq 0xf384
leaq 0xbfd3(%rip), %rsi      # 0x1e162
movq %r14, %rdi
movq %rbx, %rdx
callq 0x9073
leaq 0xdff1f(%rip), %rdi     # 0xf20c0
movl $0x200, %edx            # imm = 0x200
movq %rax, %rsi
callq 0xf384
leaq 0xbfc1(%rip), %rsi      # 0x1e176
movq %r14, (%rsp)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x9073
leaq 0xe00f5(%rip), %rdi     # 0xf22c0
movl $0x100, %edx            # imm = 0x100
movq %rax, %rsi
callq 0xf384
xorl %r14d, %r14d
xorl %ebp, %ebp
movq (%rsp), %r15
movl $0x100, %esi            # imm = 0x100
leaq 0x10(%rsp), %r12
movq %r12, %rdi
leaq 0xbf95(%rip), %rdx      # 0x1e18a
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8190
leaq 0xe01bb(%rip), %rax     # 0xf23c0
leaq (%rax,%r14), %r13
movq %r13, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
leaq 0x94ee(%rip), %rdx      # 0x1b709
callq 0x9073
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
movq %rax, %rsi
callq 0xf384
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
leaq 0xbf5f(%rip), %rdx      # 0x1e19e
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8190
leaq 0xe0171(%rip), %rbx     # 0xf23c0
leaq (%r14,%rbx), %r13
addq $0x100, %r13            # imm = 0x100
movq %r15, %rdi
movq %r12, %rsi
leaq 0x94a2(%rip), %rdx      # 0x1b709
callq 0x9073
movl $0x200, %edx            # imm = 0x200
movq %r13, %rdi
movq %rax, %rsi
callq 0xf384
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
leaq 0xbf27(%rip), %rdx      # 0x1e1b2
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8190
leaq (%r14,%rbx), %r13
addq $0x300, %r13            # imm = 0x300
movq %r15, %rdi
movq %r12, %rsi
leaq 0x945d(%rip), %rbx      # 0x1b709
movq %rbx, %rdx
callq 0x9073
movl $0x200, %edx            # imm = 0x200
movq %r13, %rdi
movq %rax, %rsi
callq 0xf384
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
leaq 0xbef3(%rip), %rdx      # 0x1e1c6
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8190
leaq 0xe00dd(%rip), %rax     # 0xf23c0
leaq (%r14,%rax), %r13
addq $0x500, %r13            # imm = 0x500
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x9073
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
movq %rax, %rsi
callq 0xf384
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
leaq 0xbebf(%rip), %rdx      # 0x1e1da
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8190
leaq 0xe0095(%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 0x9073
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
movq %rax, %rsi
callq 0xf384
cmpb $0x0, (%r13)
je 0x1239f
cmpb $0x0, (%rbx)
je 0x1239f
leaq 0xe0054(%rip), %rax     # 0xf23c0
leaq (%r14,%rax), %rsi
addq $0x700, %rsi            # imm = 0x700
movq %r13, %rdi
callq 0x11296
movl $0x2, %edi
leaq 0xbaf4(%rip), %rsi      # 0x1de7f
leaq 0xbe5c(%rip), %rdx      # 0x1e1ee
movq %rbx, %rcx
movl %eax, %r8d
xorl %eax, %eax
callq 0x1a3e3
incl %ebp
addq $0x10700, %r14          # imm = 0x10700
cmpq $0x62a00, %r14          # imm = 0x62A00
jne 0x121e1
movq (%rsp), %rdi
callq 0x9054
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq