// File: /workspace/github_cpp_makefile_star2_O1/Necrelox[P]Auto_Presence/src/automatic_presence.cpp
// Function: automatic_presence::automatic_presence(int, char**)
automatic_presence::automatic_presence(int nbArg, char **args)
{
    this->path = args[1];
    if (nbArg == 5)
        this->late_authorized = std::atoi(args[4]);
    time_t now = time(NULL);
    tm *date = localtime(&now);
    std::string NameNewFile = "presence-" + std::to_string(date->tm_mday) + ":" + std::to_string(date->tm_mon+1) + ":" + std::to_string(date->tm_year+1900) + ".txt";
    this->newfile.open(NameNewFile, std::ios::out);

    for (int i = 2; i < 4 ; i++) {
        std::string rules(args[i]);
        std::istringstream flux_rules(rules);
        std::string split_rules;
        int check = std::count(rules.begin(), rules.end(), ':');
        for (int t = 0, div = 10000; t < check+1; t++) {
            getline(flux_rules, split_rules, ':');

            split_rules.erase(std::remove(split_rules.begin(), split_rules.end(), 0), split_rules.end()); 
            for (size_t j = 0; j < split_rules.size() ; j++) {
                // std::cout << "[" << split_rules[j] << "] \n";
                if (!std::isdigit(split_rules[j]))
                    throw CError("Error argument");
            }

            if (i == 2)
                this->time_rules_start += std::atoi(split_rules.c_str()) * div;
            else
                this->time_rules_end += std::atoi(split_rules.c_str()) * div;
            div /= 100;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movq %rdx, 0x78(%rsp)
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x108(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x20(%rdi), %r12
movq %r12, %rdi
callq 0x3330
xorps %xmm0, %xmm0
movups %xmm0, 0x220(%rbx)
movw $0x5, 0x230(%rbx)
leaq 0x238(%rbx), %rdi
leaq 0x248(%rbx), %rax
movq %rax, 0x68(%rsp)
movq %rax, 0x238(%rbx)
leaq 0x2a79(%rip), %rdx      # 0x605b
movq %rdi, 0x60(%rsp)
movq %rdx, %rsi
movq %rbx, 0x70(%rsp)
callq 0x4bf6
movq 0x78(%rsp), %rax
movq 0x8(%rax), %r14
movq 0x8(%rbx), %r15
movq %r14, %rdi
callq 0x30f0
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x32e0
cmpl $0x5, %ebp
jne 0x363b
movq 0x78(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x32f0
movq 0x70(%rsp), %rcx
movw %ax, 0x230(%rcx)
xorl %edi, %edi
callq 0x3200
leaq 0x130(%rsp), %rdi
movq %rax, (%rdi)
callq 0x3190
movq %rax, %r13
movl 0xc(%rax), %r14d
movl %r14d, %ebp
negl %ebp
cmovsl %r14d, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0x36b6
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x36ad
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x36b3
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x36b6
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x367a
addl $-0x3, %r15d
jmp 0x36b6
addl $-0x2, %r15d
jmp 0x36b6
decl %r15d
movq %r12, 0x80(%rsp)
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq 0xf8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xe8(%rsp), %rdi
movl $0x2d, %edx
callq 0x3270
leaq 0xe8(%rsp), %r12
addq (%r12), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x4abd
leaq 0x291c(%rip), %rcx      # 0x6020
movl $0x9, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3240
leaq 0x120(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3747
movq %rdx, 0x110(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x120(%rsp)
jmp 0x374f
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x110(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x28b5(%rip), %rsi      # 0x602a
callq 0x33b0
leaq 0x50(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x37a1
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x37a7
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl 0x10(%r13), %ebx
incl %ebx
movl %ebx, %ebp
negl %ebp
cmovsl %ebx, %ebp
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x3820
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x3817
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x381d
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x3820
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x37e4
addl $-0x3, %r14d
jmp 0x3820
addl $-0x2, %r14d
jmp 0x3820
decl %r14d
shrl $0x1f, %ebx
leal (%r14,%rbx), %esi
leaq 0xb8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xa8(%rsp), %rdi
movl $0x2d, %edx
callq 0x3270
movl %ebx, %edi
addq 0xa8(%rsp), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x4abd
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %r8
movq 0xb0(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
leaq 0x50(%rsp), %rdi
cmpq %rdi, %rcx
je 0x3883
movq 0x50(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x38a4
movl $0xf, %esi
cmpq %r15, 0xa8(%rsp)
je 0x389f
movq 0xb8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x38b8
movq 0xa8(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x30a0
jmp 0x38c9
leaq 0xa8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3240
leaq 0x10(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x38ec
movq %rsi, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x38f2
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x2714(%rip), %rsi      # 0x602a
movq %rsp, %rdi
callq 0x33b0
leaq 0x30(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3945
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x394b
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0x76c, %ebx            # imm = 0x76C
addl 0x14(%r13), %ebx
movl %ebx, %ebp
negl %ebp
cmovsl %ebx, %ebp
movl $0x1, %r14d
cmpl $0xa, %ebp
jb 0x39c7
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x39be
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x39c4
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x39c7
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x398b
addl $-0x3, %r14d
jmp 0x39c7
addl $-0x2, %r14d
jmp 0x39c7
decl %r14d
shrl $0x1f, %ebx
leal (%r14,%rbx), %esi
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x88(%rsp), %rdi
movl $0x2d, %edx
callq 0x3270
movl %ebx, %edi
addq 0x88(%rsp), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x4abd
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0x90(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
leaq 0x30(%rsp), %rdi
cmpq %rdi, %rcx
je 0x3a2a
movq 0x30(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x3a4b
movl $0xf, %esi
cmpq %r13, 0x88(%rsp)
je 0x3a46
movq 0x98(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x3a5f
movq 0x88(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x30a0
jmp 0x3a70
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3240
leaq 0x148(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x3a9d
movq %rsi, 0x138(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x148(%rsp)
jmp 0x3aa3
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x140(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x2562(%rip), %rsi      # 0x602c
leaq 0x138(%rsp), %rdi
callq 0x33b0
leaq 0xd8(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3b07
movq %rdx, 0xc8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd8(%rsp)
jmp 0x3b0d
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xd0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b49
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x3b66
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3b82
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b9d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3bba
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x3bd6
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x110(%rsp), %rdi
cmpq %r12, %rdi
je 0x3bf3
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
movq 0x80(%rsp), %rbx
je 0x3c20
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0xc8(%rsp), %rsi
movq %rbx, %rdi
movl $0x10, %edx
callq 0x3100
movq 0x70(%rsp), %rax
addq $0x220, %rax            # imm = 0x220
movq %rax, 0x80(%rsp)
movl $0x2, %r13d
leaq 0x20(%rsp), %rbx
leaq 0x138(%rsp), %rbp
leaq 0x40(%rsp), %r12
movq 0x78(%rsp), %rax
movq (%rax,%r13,8), %rsi
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x49ac
movq %rbp, %rdi
movq %rbx, %rsi
movl $0x8, %edx
callq 0x3320
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x3cc5
movq 0x20(%rsp), %rcx
xorl %edx, %edx
xorl %ebx, %ebx
xorl %esi, %esi
cmpb $0x3a, (%rcx,%rdx)
sete %sil
addq %rsi, %rbx
incq %rdx
cmpq %rdx, %rax
jne 0x3cae
jmp 0x3cc7
xorl %ebx, %ebx
testl %ebx, %ebx
js 0x3d89
xorl %r15d, %r15d
movl $0x2710, %r14d          # imm = 0x2710
movq %rbp, %rdi
movq %rsp, %rsi
movl $0x3a, %edx
callq 0x3390
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
addq %rdi, %rsi
movl $0x0, 0x40(%rsp)
movq %r12, %rdx
callq 0x4c86
movq %rax, %rcx
subq (%rsp), %rcx
movq %rcx, 0x8(%rsp)
movb $0x0, (%rax)
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0x3d3b
xorl %ecx, %ecx
movsbl (%rdi,%rcx), %edx
addl $-0x30, %edx
cmpl $0xa, %edx
jae 0x3e25
incq %rcx
cmpq %rcx, %rax
jne 0x3d23
callq 0x32f0
imull %r14d, %eax
cmpq $0x2, %r13
jne 0x3d56
movq 0x80(%rsp), %rcx
addl %eax, (%rcx)
jmp 0x3d61
movq 0x70(%rsp), %rcx
addl %eax, 0x224(%rcx)
movslq %r14d, %rax
imulq $0x51eb851f, %rax, %r14 # imm = 0x51EB851F
movq %r14, %rax
shrq $0x3f, %rax
sarq $0x25, %r14
addl %eax, %r14d
leal 0x1(%r15), %eax
cmpl %ebx, %r15d
movl %eax, %r15d
jne 0x3cd8
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3da4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbp, %rdi
movq 0x421a(%rip), %rsi      # 0x7fc8
callq 0x32a0
leaq 0x1b0(%rsp), %rdi
callq 0x30b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3ddc
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3230
incq %r13
cmpq $0x4, %r13
leaq 0x20(%rsp), %rbx
jne 0x3c60
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x3e13
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3230
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0x3120
movq %rax, %r15
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %r14
movq %r14, (%rdi)
leaq 0x21eb(%rip), %rsi      # 0x6031
leaq 0x21f2(%rip), %rdx      # 0x603f
callq 0x4bf6
movb $0x1, %bl
leaq 0x40(%rsp), %rsi
movq %r15, %rdi
callq 0x5132
xorl %ebx, %ebx
leaq 0x3eee(%rip), %rsi      # 0x7d58
leaq 0xb79(%rip), %rdx       # 0x49ea
movq %r15, %rdi
callq 0x3340
jmp 0x3faf
movq %rax, %rbp
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3ea7
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3ea7
movq %rax, %rbp
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x3ec9
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3ec9
movq %rax, %rbp
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3eea
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3eea
movq %rax, %rbp
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f0a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3f0a
movq %rax, %rbp
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3f2c
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3f2c
movq %rax, %rbp
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x3f4d
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3f4d
movq %rax, %rbp
movq 0x110(%rsp), %rdi
cmpq %r12, %rdi
je 0x3f6f
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3f6f
movq %rax, %rbp
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x406d
movq 0xf8(%rsp), %rsi
jmp 0x4065
jmp 0x3f97
movq %rax, %rbp
jmp 0x406d
movq %rax, %rbp
jmp 0x408a
movq %rax, %rbp
jmp 0x40bf
movq %rax, %rbp
jmp 0x4048
movq %rax, %rbp
jmp 0x402c
jmp 0x3fbe
movq %rax, %rbp
jmp 0x3ff0
movq %rax, %rbp
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x3fe4
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3fe4
movq %rax, %rbp
movb $0x1, %bl
testb %bl, %bl
je 0x3ff0
movq %r15, %rdi
callq 0x3170
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x400b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x3fb6(%rip), %rsi      # 0x7fc8
leaq 0x138(%rsp), %rdi
callq 0x32a0
leaq 0x1b0(%rsp), %rdi
callq 0x30b0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x4048
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x406d
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x68(%rsp), %rax
movq 0x60(%rsp), %rcx
movq (%rcx), %rdi
cmpq %rax, %rdi
je 0x408a
movq (%rax), %rsi
incq %rsi
callq 0x3230
movq 0x3f2f(%rip), %rax      # 0x7fc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
movq 0x70(%rsp), %rbx
movq %rcx, 0x20(%rbx)
movq -0x18(%rcx), %rcx
movq %rax, 0x20(%rbx,%rcx)
leaq 0x28(%rbx), %rdi
callq 0x31d0
leaq 0x118(%rbx), %rdi
callq 0x30b0
movq (%rbx), %rdi
movq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x40da
movq (%rax), %rsi
incq %rsi
callq 0x3230
movq %rbp, %rdi
callq 0x3360