// File: /workspace/github_cpp_makefile_star2_O3/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, 0x80(%rsp)
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x20(%rdi), %r13
movq %r13, %rdi
callq 0x3330
xorps %xmm0, %xmm0
movups %xmm0, 0x220(%rbx)
movw $0x5, 0x230(%rbx)
leaq 0x238(%rbx), %rdi
leaq 0x248(%rbx), %rax
movq %rax, 0x70(%rsp)
movq %rax, 0x238(%rbx)
leaq 0x2a7e(%rip), %rdx      # 0x605b
movq %rdi, 0x68(%rsp)
movq %rdx, %rsi
movq %rbx, 0x78(%rsp)
callq 0x4c06
movq 0x80(%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
movq %r13, 0x88(%rsp)
cmpl $0x5, %ebp
jne 0x3644
movq 0x80(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x32f0
movq 0x78(%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 0x36bf
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x36b6
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x36bc
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x36bf
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x3683
addl $-0x3, %r15d
jmp 0x36bf
addl $-0x2, %r15d
jmp 0x36bf
decl %r15d
movq %r12, (%rsp)
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq 0x100(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xf0(%rsp), %rdi
movl $0x2d, %edx
callq 0x3270
leaq 0xf0(%rsp), %r12
addq (%r12), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0x4ac6
leaq 0x2917(%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 0x374c
movq %rdx, 0x110(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x120(%rsp)
jmp 0x3754
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 0x28b0(%rip), %rsi      # 0x602a
callq 0x33b0
leaq 0x58(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x37a6
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x37ac
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x50(%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 0x3825
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x381c
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x3822
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x3825
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x37e9
addl $-0x3, %r14d
jmp 0x3825
addl $-0x2, %r14d
jmp 0x3825
decl %r14d
shrl $0x1f, %ebx
leal (%r14,%rbx), %esi
leaq 0xc0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xb0(%rsp), %rdi
movl $0x2d, %edx
callq 0x3270
movl %ebx, %edi
addq 0xb0(%rsp), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x4ac6
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %r8
movq 0xb8(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
leaq 0x58(%rsp), %rsi
cmpq %rsi, %rcx
je 0x3888
movq 0x58(%rsp), %rdi
movq 0xb0(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x38ac
movl $0xf, %edi
cmpq %r15, %rsi
je 0x38a7
movq 0xc0(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x38b8
leaq 0x48(%rsp), %rdi
callq 0x30a0
jmp 0x38c9
leaq 0xb0(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3240
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x38ed
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x38f3
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x2713(%rip), %rsi      # 0x602a
leaq 0x8(%rsp), %rdi
callq 0x33b0
leaq 0x38(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3948
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x394e
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%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 0x39ca
movl $0x4, %r14d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x39c1
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x39c7
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x39ca
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r14d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x398e
addl $-0x3, %r14d
jmp 0x39ca
addl $-0x2, %r14d
jmp 0x39ca
decl %r14d
shrl $0x1f, %ebx
leal (%r14,%rbx), %esi
leaq 0xa0(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x90(%rsp), %rdi
movl $0x2d, %edx
callq 0x3270
movl %ebx, %edi
addq 0x90(%rsp), %rdi
movl %r14d, %esi
movl %ebp, %edx
callq 0x4ac6
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x98(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
leaq 0x38(%rsp), %rsi
cmpq %rsi, %rcx
je 0x3a2d
movq 0x38(%rsp), %rdi
movq 0x90(%rsp), %rsi
cmpq %rdi, %rax
leaq 0x58(%rsp), %rbx
jbe 0x3a56
movl $0xf, %edi
cmpq %r13, %rsi
je 0x3a51
movq 0xa0(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x3a62
leaq 0x28(%rsp), %rdi
callq 0x30a0
jmp 0x3a73
leaq 0x90(%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 0x3aa0
movq %rsi, 0x138(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x148(%rsp)
jmp 0x3aa6
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 0x255f(%rip), %rsi      # 0x602c
leaq 0x138(%rsp), %rdi
callq 0x33b0
leaq 0xe0(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3b0a
movq %rdx, 0xd0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xe0(%rsp)
jmp 0x3b10
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xd8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b4c
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x90(%rsp), %rdi
cmpq %r13, %rdi
je 0x3b69
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
movq 0x88(%rsp), %r14
je 0x3b8d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3ba8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0xb0(%rsp), %rdi
cmpq %r15, %rdi
je 0x3bc5
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x48(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3bdc
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x110(%rsp), %rdi
cmpq %r12, %rdi
leaq 0x100(%rsp), %r12
je 0x3c01
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0xf0(%rsp), %rdi
cmpq %r12, %rdi
je 0x3c1e
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0xd0(%rsp), %rsi
movq %r14, %rdi
movl $0x10, %edx
callq 0x3100
movq 0x78(%rsp), %rax
addq $0x220, %rax            # imm = 0x220
movq %rax, 0x88(%rsp)
movl $0x2, %ebx
leaq 0x28(%rsp), %r15
leaq 0x138(%rsp), %rbp
movq 0x80(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq %r15, %rdi
movq %rbp, %rdx
callq 0x49b2
movq %rbp, %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x3320
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq 0x30(%rsp), %rax
xorl %r13d, %r13d
movl $0x0, %r14d
testq %rax, %rax
je 0x3cd2
movq 0x28(%rsp), %rcx
xorl %edx, %edx
xorl %r14d, %r14d
xorl %esi, %esi
cmpb $0x3a, (%rcx,%rdx)
sete %sil
addl %esi, %r14d
incq %rdx
cmpq %rdx, %rax
jne 0x3cb4
testl %r14d, %r14d
js 0x3db3
movl $0x2710, %r15d          # imm = 0x2710
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
movl $0x3a, %edx
callq 0x3390
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq %rdi, %rsi
movl $0x0, 0x48(%rsp)
leaq 0x48(%rsp), %rdx
callq 0x4c9b
movq %rax, %rcx
subq 0x8(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movb $0x0, (%rax)
movq 0x8(%rsp), %r12
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x3d43
xorl %ecx, %ecx
movsbl (%r12,%rcx), %edx
addl $-0x30, %edx
cmpl $0xa, %edx
jae 0x3e2f
incq %rcx
cmpq %rcx, %rax
jne 0x3d2a
movq %r12, %rdi
callq 0x32f0
imull %r15d, %eax
cmpq $0x2, %rbx
jne 0x3d61
movq 0x88(%rsp), %rcx
addl %eax, (%rcx)
jmp 0x3d6c
movq 0x78(%rsp), %rcx
addl %eax, 0x224(%rcx)
movslq %r15d, %rax
imulq $0x51eb851f, %rax, %r15 # imm = 0x51EB851F
movq %r15, %rax
shrq $0x3f, %rax
sarq $0x25, %r15
addl %eax, %r15d
leal 0x1(%r13), %eax
cmpl %r14d, %r13d
movl %eax, %r13d
jne 0x3cd8
leaq 0x18(%rsp), %rax
cmpq %rax, %r12
leaq 0x28(%rsp), %r15
je 0x3db3
movq 0x18(%rsp), %rsi
incq %rsi
movq %r12, %rdi
callq 0x3230
movq %rbp, %rdi
movq 0x420b(%rip), %rsi      # 0x7fc8
callq 0x32a0
leaq 0x1b0(%rsp), %rdi
callq 0x30b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3deb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3230
incq %rbx
cmpq $0x4, %rbx
jne 0x3c58
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x3e1d
movq 0xe0(%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, %r14
leaq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
movq %rax, (%rdi)
leaq 0x21e1(%rip), %rsi      # 0x6031
leaq 0x21e8(%rip), %rdx      # 0x603f
callq 0x4c06
movb $0x1, %bl
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
movq (%rsp), %r12
callq 0x5116
xorl %ebx, %ebx
leaq 0x3ee0(%rip), %rsi      # 0x7d58
leaq 0xb71(%rip), %rdx       # 0x49f0
movq %r14, %rdi
callq 0x3340
jmp 0x3fc8
movq %rax, %rbp
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3eb5
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3eb5
movq %rax, %rbp
movq 0x90(%rsp), %rdi
cmpq %r13, %rdi
je 0x3ed7
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3ed7
movq %rax, %rbp
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3ef8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3ef8
movq %rax, %rbp
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f18
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3f18
movq %rax, %rbp
movq 0xb0(%rsp), %rdi
cmpq %r15, %rdi
je 0x3f3a
movq 0xc0(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3f3a
movq %rax, %rbp
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3f5b
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3f5b
movq %rax, %rbp
movq 0x110(%rsp), %rdi
cmpq %r12, %rdi
je 0x3f7d
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3f7d
movq %rax, %rbp
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0x3fa7
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x3fa7
movq %rax, %rbp
movq (%rsp), %r12
jmp 0x409a
movq %rax, %rbp
jmp 0x409a
movq %rax, %rbp
jmp 0x40b7
movq %rax, %rbp
jmp 0x40ec
movq %rax, %rbp
movq (%rsp), %r12
jmp 0x4075
movq %rax, %rbp
movq (%rsp), %r12
jmp 0x4059
jmp 0x3fdf
movq %rax, %rbp
movq (%rsp), %r12
jmp 0x401c
movq %rax, %rbp
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x4007
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3230
testb %bl, %bl
jne 0x4014
jmp 0x401c
movq %rax, %rbp
movq (%rsp), %r12
movq %r14, %rdi
callq 0x3170
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4038
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x3f89(%rip), %rsi      # 0x7fc8
leaq 0x138(%rsp), %rdi
callq 0x32a0
leaq 0x1b0(%rsp), %rdi
callq 0x30b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x4075
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0x409a
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x70(%rsp), %rax
movq 0x68(%rsp), %rcx
movq (%rcx), %rdi
cmpq %rax, %rdi
je 0x40b7
movq (%rax), %rsi
incq %rsi
callq 0x3230
movq 0x3f02(%rip), %rax      # 0x7fc0
movq (%rax), %rcx
movq 0x18(%rax), %rax
movq 0x78(%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
cmpq %r12, %rdi
je 0x4100
movq (%r12), %rsi
incq %rsi
callq 0x3230
movq %rbp, %rdi
callq 0x3360