// File: /workspace/github_c_makefile_star2_O1/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 0x8969
movq %rax, %rdi
callq 0x9004
movq %rax, %rbx
leaq 0xd7c5(%rip), %rsi      # 0x1d868
xorpd %xmm0, %xmm0
movq %rax, %rdi
callq 0x9276
cvttsd2si %xmm0, %eax
movl %eax, 0xbc1f7(%rip)     # 0xcc2b0
leaq 0xd7bd(%rip), %rsi      # 0x1d87d
movsd 0xaf60(%rip), %xmm0     # 0x1b028
movq %rbx, %rdi
callq 0x9276
cvttsd2si %xmm0, %eax
movl %eax, 0xbc1da(%rip)     # 0xcc2b4
leaq 0xd7b2(%rip), %rsi      # 0x1d893
leaq 0xd7c0(%rip), %rdx      # 0x1d8a8
movq %rbx, %rdi
callq 0x907b
leaq 0xbc1c1(%rip), %rdi     # 0xcc2b8
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
callq 0xf038
leaq 0xd7a8(%rip), %rsi      # 0x1d8b3
movsd 0xca1d(%rip), %xmm0     # 0x1cb30
movq %rbx, %rdi
callq 0x9276
cvttsd2si %xmm0, %eax
movl %eax, 0xbc593(%rip)     # 0xcc6b8
leaq 0xd7a2(%rip), %rsi      # 0x1d8ce
movq %rbx, %rdi
movsd 0xaef1(%rip), %xmm0     # 0x1b028
callq 0x9276
cvttsd2si %xmm0, %eax
movl %eax, 0xbc576(%rip)     # 0xcc6bc
leaq 0xd799(%rip), %rsi      # 0x1d8e6
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x9276
cvttsd2si %xmm0, %eax
movl %eax, 0xbcde1(%rip)     # 0xccf44
leaq 0xd797(%rip), %rsi      # 0x1d901
leaq 0xb5a0(%rip), %r14      # 0x1b711
movq %rbx, %rdi
movq %r14, %rdx
callq 0x907b
leaq 0xbc53d(%rip), %rdi     # 0xcc6c0
movl $0x80, %edx
movq %rax, %rsi
callq 0xf038
leaq 0xd77d(%rip), %rsi      # 0x1d914
movq %rbx, %rdi
movq %r14, %rdx
callq 0x907b
leaq 0xbc597(%rip), %rdi     # 0xcc740
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
callq 0xf038
leaq 0xd76e(%rip), %rsi      # 0x1d92b
movq %rbx, %rdi
movq %r14, %rdx
callq 0x907b
leaq 0xbc971(%rip), %rdi     # 0xccb40
movl $0x400, %edx            # imm = 0x400
movq %rax, %rsi
callq 0xf038
leaq 0xd757(%rip), %rsi      # 0x1d93a
movq %rbx, %rdi
movsd 0xae3a(%rip), %xmm0     # 0x1b028
callq 0x9276
cvttsd2si %xmm0, %eax
movl %eax, 0xbcd43(%rip)     # 0xccf40
leaq 0xd74f(%rip), %rsi      # 0x1d953
movsd 0xd654(%rip), %xmm0     # 0x1d860
movq %rbx, %rdi
callq 0x9276
cvttsd2si %xmm0, %eax
movl %eax, 0xbcd2a(%rip)     # 0xccf48
leaq 0xd746(%rip), %rsi      # 0x1d96b
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x9276
cvttsd2si %xmm0, %eax
movl %eax, 0xbcd11(%rip)     # 0xccf4c
leaq 0xd740(%rip), %rsi      # 0x1d982
movq %rbx, %rdi
movsd 0xaddb(%rip), %xmm0     # 0x1b028
callq 0x9276
cvttsd2si %xmm0, %eax
movl %eax, 0xbccf8(%rip)     # 0xccf54
leaq 0xd733(%rip), %rsi      # 0x1d996
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x9276
cvttsd2si %xmm0, %eax
movl %eax, 0xbccdf(%rip)     # 0xccf58
leaq 0xd72e(%rip), %rsi      # 0x1d9ae
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x9276
cvttsd2si %xmm0, %eax
movl %eax, 0xbccc6(%rip)     # 0xccf5c
leaq 0xd72a(%rip), %rsi      # 0x1d9c7
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x9276
cvttsd2si %xmm0, %eax
movl %eax, 0xbccad(%rip)     # 0xccf60
leaq 0xd723(%rip), %rsi      # 0x1d9dd
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x9276
cvttsd2si %xmm0, %eax
movl %eax, 0xbcc94(%rip)     # 0xccf64
leaq 0xd71c(%rip), %rsi      # 0x1d9f3
xorpd %xmm0, %xmm0
movq %rbx, %rdi
callq 0x9276
cvttsd2si %xmm0, %eax
movl %eax, 0xbcc63(%rip)     # 0xccf50
movq %rbx, %rdi
callq 0x905c
movabsq $0x6e776f6e6b6e55, %rax # imm = 0x6E776F6E6B6E55
movq %rax, 0xbcc6a(%rip)     # 0xccf70
movq %rax, 0xbcd63(%rip)     # 0xcd070
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq