// File: /workspace/github_c_makefile_star2_O2/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 0x8973
movq %rax, %rdi
callq 0x8f80
movq %rax, %r14
leaq 0xbcfb(%rip), %rsi      # 0x1d0e6
leaq 0x9317(%rip), %rbx      # 0x1a709
movq %rax, %rdi
movq %rbx, %rdx
callq 0x8ff5
leaq 0xe03bc(%rip), %rdi     # 0xf17c0
movl $0x100, %edx            # imm = 0x100
movq %rax, %rsi
callq 0xe97a
leaq 0xbcde(%rip), %rsi      # 0x1d0f6
movq %r14, %rdi
movq %rbx, %rdx
callq 0x8ff5
leaq 0xe0496(%rip), %rdi     # 0xf18c0
movl $0x100, %edx            # imm = 0x100
movq %rax, %rsi
callq 0xe97a
leaq 0xbcc7(%rip), %rsi      # 0x1d105
movq %r14, %rdi
movq %rbx, %rdx
callq 0x8ff5
leaq 0xe0570(%rip), %rdi     # 0xf19c0
movl $0x200, %edx            # imm = 0x200
movq %rax, %rsi
callq 0xe97a
leaq 0xbcb4(%rip), %rsi      # 0x1d118
movq %r14, %rdi
movq %rbx, %rdx
callq 0x8ff5
leaq 0xe074a(%rip), %rdi     # 0xf1bc0
movl $0x200, %edx            # imm = 0x200
movq %rax, %rsi
callq 0xe97a
leaq 0xbca1(%rip), %rsi      # 0x1d12b
movq %r14, %rdi
movq %rbx, %rdx
callq 0x8ff5
leaq 0xe0924(%rip), %rdi     # 0xf1dc0
movl $0x100, %edx            # imm = 0x100
movq %rax, %rsi
callq 0xe97a
leaq 0xbc8e(%rip), %rsi      # 0x1d13e
movq %r14, %rdi
movq %rbx, %rdx
callq 0x8ff5
leaq 0xe09fe(%rip), %rdi     # 0xf1ec0
movl $0x200, %edx            # imm = 0x200
movq %rax, %rsi
callq 0xe97a
leaq 0xbc7c(%rip), %rsi      # 0x1d152
movq %r14, %rdi
movq %rbx, %rdx
callq 0x8ff5
leaq 0xe0bd8(%rip), %rdi     # 0xf20c0
movl $0x200, %edx            # imm = 0x200
movq %rax, %rsi
callq 0xe97a
leaq 0xbc6a(%rip), %rsi      # 0x1d166
movq %r14, (%rsp)
movq %r14, %rdi
movq %rbx, %rdx
callq 0x8ff5
leaq 0xe0dae(%rip), %rdi     # 0xf22c0
movl $0x100, %edx            # imm = 0x100
movq %rax, %rsi
callq 0xe97a
xorl %ebp, %ebp
xorl %r14d, %r14d
movq (%rsp), %r15
cmpq $0x62a00, %r14          # imm = 0x62A00
je 0x116f6
movl $0x100, %esi            # imm = 0x100
leaq 0x10(%rsp), %r12
movq %r12, %rdi
leaq 0xbc31(%rip), %rdx      # 0x1d17a
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8190
leaq 0xe0e67(%rip), %rax     # 0xf23c0
leaq (%rax,%r14), %r13
movq %r13, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
leaq 0x919a(%rip), %rdx      # 0x1a709
callq 0x8ff5
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
movq %rax, %rsi
callq 0xe97a
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
leaq 0xbbfb(%rip), %rdx      # 0x1d18e
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8190
leaq 0xe0e1d(%rip), %rbx     # 0xf23c0
leaq (%r14,%rbx), %r13
addq $0x100, %r13            # imm = 0x100
movq %r15, %rdi
movq %r12, %rsi
leaq 0x914e(%rip), %rdx      # 0x1a709
callq 0x8ff5
movl $0x200, %edx            # imm = 0x200
movq %r13, %rdi
movq %rax, %rsi
callq 0xe97a
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
leaq 0xbbc3(%rip), %rdx      # 0x1d1a2
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8190
leaq (%r14,%rbx), %r13
addq $0x300, %r13            # imm = 0x300
movq %r15, %rdi
movq %r12, %rsi
leaq 0x9109(%rip), %rdx      # 0x1a709
callq 0x8ff5
movl $0x200, %edx            # imm = 0x200
movq %r13, %rdi
movq %rax, %rsi
callq 0xe97a
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
leaq 0xbb92(%rip), %rdx      # 0x1d1b6
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8190
leaq (%r14,%rbx), %r13
addq $0x500, %r13            # imm = 0x500
movq %r15, %rdi
movq %r12, %rsi
leaq 0x90c4(%rip), %rdx      # 0x1a709
callq 0x8ff5
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
movq %rax, %rsi
callq 0xe97a
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
leaq 0xbb61(%rip), %rdx      # 0x1d1ca
movl %ebp, %ecx
xorl %eax, %eax
callq 0x8190
leaq (%r14,%rbx), %r13
addq $0x600, %r13            # imm = 0x600
movq %r15, %rdi
movq %r12, %rsi
leaq 0x907f(%rip), %rdx      # 0x1a709
movq 0x8(%rsp), %rbx
callq 0x8ff5
movl $0x100, %edx            # imm = 0x100
movq %r13, %rdi
movq %rax, %rsi
callq 0xe97a
cmpb $0x0, (%r13)
je 0x116e8
cmpb $0x0, (%rbx)
je 0x116e8
leaq 0xe0d09(%rip), %rax     # 0xf23c0
leaq (%r14,%rax), %rsi
addq $0x700, %rsi            # imm = 0x700
movq %r13, %rdi
callq 0x106af
pushq $0x2
popq %rdi
leaq 0xb79b(%rip), %rsi      # 0x1ce6f
leaq 0xbb03(%rip), %rdx      # 0x1d1de
movq %rbx, %rcx
movl %eax, %r8d
xorl %eax, %eax
callq 0x1920b
addq $0x10700, %r14          # imm = 0x10700
incl %ebp
jmp 0x11528
movq (%rsp), %rdi
callq 0x8fd6
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq