// File: /workspace/github_c_makefile_star2_O2/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 0x8973
movq %rax, %rdi
callq 0x8f80
movq %rax, %rbx
leaq 0xcf7d(%rip), %rsi      # 0x1c848
xorpd %xmm0, %xmm0
movq %rax, %rdi
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbc9cf(%rip)     # 0xcc2b0
leaq 0xcf75(%rip), %rsi      # 0x1c85d
movsd 0xa738(%rip), %xmm0     # 0x1a028
movq %rbx, %rdi
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbc9b2(%rip)     # 0xcc2b4
leaq 0xcf6a(%rip), %rsi      # 0x1c873
leaq 0xcf78(%rip), %rdx      # 0x1c888
movq %rbx, %rdi
callq 0x8ff5
leaq 0xbc999(%rip), %rdi     # 0xcc2b8
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
callq 0xe97a
leaq 0xcf60(%rip), %rsi      # 0x1c893
movsd 0xc1d5(%rip), %xmm0     # 0x1bb10
movq %rbx, %rdi
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbcd6b(%rip)     # 0xcc6b8
leaq 0xcf5a(%rip), %rsi      # 0x1c8ae
movq %rbx, %rdi
movsd 0xa6c9(%rip), %xmm0     # 0x1a028
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbcd4e(%rip)     # 0xcc6bc
leaq 0xcf51(%rip), %rsi      # 0x1c8c6
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbd5b9(%rip)     # 0xccf44
leaq 0xcf4f(%rip), %rsi      # 0x1c8e1
leaq 0xad70(%rip), %r14      # 0x1a709
movq %rbx, %rdi
movq %r14, %rdx
callq 0x8ff5
leaq 0xbcd15(%rip), %rdi     # 0xcc6c0
movl $0x80, %edx
movq %rax, %rsi
callq 0xe97a
leaq 0xcf35(%rip), %rsi      # 0x1c8f4
movq %rbx, %rdi
movq %r14, %rdx
callq 0x8ff5
leaq 0xbcd6f(%rip), %rdi     # 0xcc740
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
callq 0xe97a
leaq 0xcf26(%rip), %rsi      # 0x1c90b
movq %rbx, %rdi
movq %r14, %rdx
callq 0x8ff5
leaq 0xbd149(%rip), %rdi     # 0xccb40
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
callq 0xe97a
leaq 0xcf0f(%rip), %rsi      # 0x1c91a
movq %rbx, %rdi
movsd 0xa612(%rip), %xmm0     # 0x1a028
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbd51b(%rip)     # 0xccf40
leaq 0xcf07(%rip), %rsi      # 0x1c933
movsd 0xce0c(%rip), %xmm0     # 0x1c840
movq %rbx, %rdi
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbd502(%rip)     # 0xccf48
leaq 0xcefe(%rip), %rsi      # 0x1c94b
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbd4e9(%rip)     # 0xccf4c
leaq 0xcef8(%rip), %rsi      # 0x1c962
movq %rbx, %rdi
movsd 0xa5b3(%rip), %xmm0     # 0x1a028
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbd4d0(%rip)     # 0xccf54
leaq 0xceeb(%rip), %rsi      # 0x1c976
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbd4b7(%rip)     # 0xccf58
leaq 0xcee6(%rip), %rsi      # 0x1c98e
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbd49e(%rip)     # 0xccf5c
leaq 0xcee2(%rip), %rsi      # 0x1c9a7
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbd485(%rip)     # 0xccf60
leaq 0xcedb(%rip), %rsi      # 0x1c9bd
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbd46c(%rip)     # 0xccf64
leaq 0xced4(%rip), %rsi      # 0x1c9d3
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x91bd
cvttsd2si %xmm0, %eax
movl %eax, 0xbd43b(%rip)     # 0xccf50
movq %rbx, %rdi
callq 0x8fd6
movabsq $0x6e776f6e6b6e55, %rax # imm = 0x6E776F6E6B6E55
movq %rax, 0xbd442(%rip)     # 0xccf70
movq %rax, 0xbd53b(%rip)     # 0xcd070
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq