// File: /workspace/github_c_makefile_star2_O3/schroeder-lvb[P]sissm/src/piwebgen.c
// Function: piwebgenInitConfig
int piwebgenInitConfig( void )
{
    cfsPtr cP;

    cP = cfsCreate( sissmGetConfigPath() );

    // read "piwebgen.pluginstate" variable from the .cfg file
    piwebgenConfig.pluginState = (int) cfsFetchNum( cP, "piwebgen.pluginState", 0.0 );  // disabled by default

    piwebgenConfig.utf8Encoding = (int) cfsFetchNum( cP, "piwebgen.utf8Encoding", 1.0 );  // enabled by default

    // read "piwebgen.StringParameterExample" variable from the .cfg file
    strlcpy( piwebgenConfig.webFileName,  cfsFetchStr( cP, "piwebgen.webFileName",  "sissm.html" ), CFS_FETCH_MAX );
    piwebgenConfig.updateIntervalSec = (int) cfsFetchNum( cP, "piwebgen.updateIntervalSec", 60 );
    piwebgenConfig.updateOnChange    = (int) cfsFetchNum( cP, "piwebgen.updateOnChange", 1 );
    piwebgenConfig.autoRefreshHeader = (int) cfsFetchNum( cP, "piwebgen.autoRefreshHeader", 0 );
    strlcpy( piwebgenConfig.webminURL, cfsFetchStr( cP, "piwebgen.webminURL", "" ), 128 );
    strlcpy( piwebgenConfig.directConnect, cfsFetchStr( cP, "piwebgen.directConnect", ""), CFS_FETCH_MAX );
    strlcpy( piwebgenConfig.line2, cfsFetchStr( cP, "piwebgen.line2", ""), CFS_FETCH_MAX );
    piwebgenConfig.hyperlinkFormat   = (int) cfsFetchNum( cP, "piwebgen.hyperlinkFormat", 1 );
    piwebgenConfig.commTimeoutSec    = (int) cfsFetchNum( cP, "piwebgen.commTimeoutSec", 120 );
    piwebgenConfig.showSessionID     = (int) cfsFetchNum( cP, "piwebgen.showSessionID", 0 );
    piwebgenConfig.showUpTime        = (int) cfsFetchNum( cP, "piwebgen.showUpTime", 1.0 );
    piwebgenConfig.showLastReboot    = (int) cfsFetchNum( cP, "piwebgen.showLastReboot", 0 );
    piwebgenConfig.showCurrentTime   = (int) cfsFetchNum( cP, "piwebgen.showCurrentTime", 0 );
    piwebgenConfig.showGameMode      = (int) cfsFetchNum( cP, "piwebgen.showGameMode", 0 );
    piwebgenConfig.showMutators      = (int) cfsFetchNum( cP, "piwebgen.showMutators", 0 );
    piwebgenConfig.reReadHostName    = (int) cfsFetchNum( cP, "piwebgen.reReadHostName", 0 );

    cfsDestroy( cP );

    strlcpy( gameMode, "Unknown", API_LINE_STRING_MAX );
    strlcpy( gameMutators, "Unknown", API_LINE_STRING_MAX );

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x8970
movq %rax, %rdi
callq 0x8ffc
movq %rax, %rbx
leaq 0xd459(%rip), %rsi      # 0x1d840
xorpd %xmm0, %xmm0
movq %rax, %rdi
callq 0x926a
cvttsd2si %xmm0, %eax
movl %eax, 0xbbeb3(%rip)     # 0xcc2b0
leaq 0xd451(%rip), %rsi      # 0x1d855
movsd 0xac1c(%rip), %xmm0     # 0x1b028
movq %rbx, %rdi
callq 0x926a
cvttsd2si %xmm0, %eax
movl %eax, 0xbbe96(%rip)     # 0xcc2b4
leaq 0xd446(%rip), %rsi      # 0x1d86b
leaq 0xd454(%rip), %rdx      # 0x1d880
movq %rbx, %rdi
callq 0x9073
leaq 0xbbe7d(%rip), %rdi     # 0xcc2b8
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
callq 0xf384
leaq 0xd43c(%rip), %rsi      # 0x1d88b
movsd 0xc6b1(%rip), %xmm0     # 0x1cb08
movq %rbx, %rdi
callq 0x926a
cvttsd2si %xmm0, %eax
movl %eax, 0xbc24f(%rip)     # 0xcc6b8
leaq 0xd436(%rip), %rsi      # 0x1d8a6
movq %rbx, %rdi
movsd 0xabad(%rip), %xmm0     # 0x1b028
callq 0x926a
cvttsd2si %xmm0, %eax
movl %eax, 0xbc232(%rip)     # 0xcc6bc
leaq 0xd42d(%rip), %rsi      # 0x1d8be
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x926a
cvttsd2si %xmm0, %eax
movl %eax, 0xbca9d(%rip)     # 0xccf44
leaq 0xd42b(%rip), %rsi      # 0x1d8d9
leaq 0xb254(%rip), %r14      # 0x1b709
movq %rbx, %rdi
movq %r14, %rdx
callq 0x9073
leaq 0xbc1f9(%rip), %rdi     # 0xcc6c0
movl $0x80, %edx
movq %rax, %rsi
callq 0xf384
leaq 0xd411(%rip), %rsi      # 0x1d8ec
movq %rbx, %rdi
movq %r14, %rdx
callq 0x9073
leaq 0xbc253(%rip), %rdi     # 0xcc740
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
callq 0xf384
leaq 0xd402(%rip), %rsi      # 0x1d903
movq %rbx, %rdi
movq %r14, %rdx
callq 0x9073
leaq 0xbc62d(%rip), %rdi     # 0xccb40
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
callq 0xf384
leaq 0xd3eb(%rip), %rsi      # 0x1d912
movq %rbx, %rdi
movsd 0xaaf6(%rip), %xmm0     # 0x1b028
callq 0x926a
cvttsd2si %xmm0, %eax
movl %eax, 0xbc9ff(%rip)     # 0xccf40
leaq 0xd3e3(%rip), %rsi      # 0x1d92b
movsd 0xd2e8(%rip), %xmm0     # 0x1d838
movq %rbx, %rdi
callq 0x926a
cvttsd2si %xmm0, %eax
movl %eax, 0xbc9e6(%rip)     # 0xccf48
leaq 0xd3da(%rip), %rsi      # 0x1d943
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x926a
cvttsd2si %xmm0, %eax
movl %eax, 0xbc9cd(%rip)     # 0xccf4c
leaq 0xd3d4(%rip), %rsi      # 0x1d95a
movq %rbx, %rdi
movsd 0xaa97(%rip), %xmm0     # 0x1b028
callq 0x926a
cvttsd2si %xmm0, %eax
movl %eax, 0xbc9b4(%rip)     # 0xccf54
leaq 0xd3c7(%rip), %rsi      # 0x1d96e
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x926a
cvttsd2si %xmm0, %eax
movl %eax, 0xbc99b(%rip)     # 0xccf58
leaq 0xd3c2(%rip), %rsi      # 0x1d986
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x926a
cvttsd2si %xmm0, %eax
movl %eax, 0xbc982(%rip)     # 0xccf5c
leaq 0xd3be(%rip), %rsi      # 0x1d99f
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x926a
cvttsd2si %xmm0, %eax
movl %eax, 0xbc969(%rip)     # 0xccf60
leaq 0xd3b7(%rip), %rsi      # 0x1d9b5
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x926a
cvttsd2si %xmm0, %eax
movl %eax, 0xbc950(%rip)     # 0xccf64
leaq 0xd3b0(%rip), %rsi      # 0x1d9cb
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x926a
cvttsd2si %xmm0, %eax
movl %eax, 0xbc91f(%rip)     # 0xccf50
movq %rbx, %rdi
callq 0x9054
movabsq $0x6e776f6e6b6e55, %rax # imm = 0x6E776F6E6B6E55
movq %rax, 0xbc926(%rip)     # 0xccf70
movq %rax, 0xbca1f(%rip)     # 0xcd070
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq