// File: /workspace/github_cpp_makefile_star2_O2/Neotoxic-off[P]Abstrakt/src/abstract/scan/count_functions.cpp
// Function: abstrakt::count_functions()
bool abstrakt::count_functions()
{
    size_t size = this->current_line.length();
    std::istringstream splitted(this->current_line);
    std::vector<std::string> results(
        std::istream_iterator<std::string>{splitted},
        std::istream_iterator<std::string>()
    );
    std::map<std::string, std::size_t> construction = {
        { "type", 0 },
        { "other", 0 },
        { "parenth_o", 0 },
        { "parenth_c", 0 }
    };

    if (size > 0) {
        for (auto i = results.begin(); i != results.end(); i++) {
            if (this->types.is_type(*i) == true) {
                construction["type"]++;
            } else {
                construction["other"]++;
                if (i->find("(") != std::string::npos) {
                    construction["parenth_o"]++;
                }
                if (i->find(")") != std::string::npos) {
                    construction["parenth_c"]++;
                }
            }
        }

        if (construction["other"] > 0 && construction["type"] > 0 && construction["parenth_o"] > 0 && construction["parenth_c"] > 0) {
            std::cout << "this is maybe a function:" << this->current_line << std::endl;
        }
    }

    return (false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x368, %rsp            # imm = 0x368
movq 0x138(%rdi), %r12
leaq 0x130(%rdi), %rsi
movq %rdi, -0x38(%rbp)
leaq -0x388(%rbp), %rbx
pushq $0x8
popq %rdx
movq %rbx, %rdi
movq %rsi, -0x60(%rbp)
callq 0x2270
leaq -0x1b8(%rbp), %rdi
movq %rbx, %rsi
callq 0x321a
leaq -0x200(%rbp), %r14
leaq -0x1f0(%rbp), %rax
xorl %ecx, %ecx
andq $0x0, -0x8(%r14)
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
movb %cl, 0x10(%rax)
leaq -0x78(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
leaq -0x208(%rbp), %rdx
leaq -0x188(%rbp), %rcx
callq 0x325a
movq %r14, %rdi
callq 0x20e0
leaq -0x1b0(%rbp), %rdi
callq 0x20e0
leaq -0x58(%rbp), %rdx
andl $0x0, (%rdx)
leaq -0x188(%rbp), %r14
leaq 0x427e(%rip), %rsi      # 0x7063
movq %r14, %rdi
callq 0x32e8
leaq -0x98(%rbp), %rdx
leaq -0x160(%rbp), %r15
andl $0x0, (%rdx)
leaq 0x4263(%rip), %rsi      # 0x7068
movq %r15, %rdi
callq 0x3312
leaq -0xe8(%rbp), %rdx
leaq -0x138(%rbp), %r15
andl $0x0, (%rdx)
leaq 0x4249(%rip), %rsi      # 0x706e
movq %r15, %rdi
callq 0x333c
leaq -0x30(%rbp), %rdx
leaq -0x110(%rbp), %r15
andl $0x0, (%rdx)
leaq 0x4236(%rip), %rsi      # 0x7078
movq %r15, %rdi
callq 0x333c
leaq -0xc8(%rbp), %rdi
leaq -0x188(%rbp), %rsi
pushq $0x4
popq %rdx
leaq -0x2a(%rbp), %rcx
leaq -0x29(%rbp), %r8
callq 0x3366
pushq $0x78
popq %rbx
leaq -0x188(%rbp,%rbx), %rdi
callq 0x20e0
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x2e6b
testq %r12, %r12
je 0x30f1
movq -0x78(%rbp), %r15
addq $0xb0, -0x38(%rbp)
leaq -0x1d8(%rbp), %r12
leaq -0x188(%rbp), %rbx
leaq -0xc8(%rbp), %r14
cmpq -0x70(%rbp), %r15
je 0x2fb2
movq %r12, %rdi
movq %r15, %rsi
callq 0x2210
movq -0x38(%rbp), %rdi
movq %r12, %rsi
callq 0x3ec0
movq %r12, %rdi
movl %eax, %r13d
callq 0x20e0
testb %r13b, %r13b
je 0x2f00
leaq 0x417f(%rip), %rsi      # 0x7063
leaq -0x58(%rbp), %rdx
movq %rbx, %rdi
callq 0x2c2c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33ae
jmp 0x2f9e
leaq 0x4161(%rip), %rsi      # 0x7068
leaq -0x58(%rbp), %rdx
movq %rbx, %rdi
callq 0x2c2c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33ae
incq (%rax)
movq %rbx, %rdi
callq 0x20e0
leaq 0x4152(%rip), %rsi      # 0x7082
movq %r15, %rdi
xorl %edx, %edx
callq 0x22b0
cmpq $-0x1, %rax
je 0x2f69
leaq 0x4127(%rip), %rsi      # 0x706e
leaq -0x58(%rbp), %rdx
movq %rbx, %rdi
callq 0x2c2c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33ae
incq (%rax)
movq %rbx, %rdi
callq 0x20e0
leaq 0x4412(%rip), %rsi      # 0x7382
movq %r15, %rdi
xorl %edx, %edx
callq 0x22b0
cmpq $-0x1, %rax
je 0x2fa9
leaq 0x40f1(%rip), %rsi      # 0x7078
leaq -0x58(%rbp), %rdx
movq %rbx, %rdi
callq 0x2c2c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33ae
incq (%rax)
movq %rbx, %rdi
callq 0x20e0
addq $0x20, %r15
jmp 0x2eac
leaq 0x40af(%rip), %rsi      # 0x7068
leaq -0x188(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x2c2c
leaq -0xc8(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x33ae
cmpq $0x0, (%rax)
je 0x30e5
leaq 0x4076(%rip), %rsi      # 0x7063
leaq -0x58(%rbp), %rdi
leaq -0x2a(%rbp), %rdx
callq 0x2c2c
leaq -0xc8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x33ae
cmpq $0x0, (%rax)
je 0x30dc
leaq 0x4053(%rip), %rsi      # 0x706e
leaq -0x98(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x2c2c
leaq -0xc8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x33ae
cmpq $0x0, (%rax)
je 0x30d0
leaq 0x4029(%rip), %rsi      # 0x7078
leaq -0xe8(%rbp), %rdi
leaq -0x2b(%rbp), %rdx
callq 0x2c2c
leaq -0xc8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x33ae
movq (%rax), %rbx
leaq -0xe8(%rbp), %rdi
callq 0x20e0
leaq -0x98(%rbp), %rdi
callq 0x20e0
leaq -0x58(%rbp), %rdi
callq 0x20e0
leaq -0x188(%rbp), %rdi
callq 0x20e0
testq %rbx, %rbx
je 0x30f1
movq 0x7f2a(%rip), %rdi      # 0xafd8
leaq 0x3fcf(%rip), %rsi      # 0x7084
callq 0x21a0
movq -0x60(%rbp), %rsi
movq %rax, %rdi
callq 0x2190
movq %rax, %rdi
callq 0x2100
jmp 0x30f1
leaq -0x98(%rbp), %rdi
callq 0x20e0
leaq -0x58(%rbp), %rdi
callq 0x20e0
leaq -0x188(%rbp), %rdi
callq 0x20e0
leaq -0xc8(%rbp), %rdi
callq 0x3444
leaq -0x78(%rbp), %rdi
callq 0x3418
leaq -0x388(%rbp), %rdi
callq 0x20f0
xorl %eax, %eax
addq $0x368, %rsp            # imm = 0x368
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0xe8(%rbp), %rdi
movq %rax, %rbx
callq 0x20e0
jmp 0x313c
jmp 0x3139
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x20e0
jmp 0x3154
jmp 0x3151
jmp 0x31dc
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x20e0
jmp 0x31d3
jmp 0x31d0
jmp 0x31d0
jmp 0x31dc
movq %rax, %rbx
pushq $0x78
popq %r14
leaq -0x188(%rbp,%r14), %rdi
callq 0x20e0
addq $-0x28, %r14
cmpq $-0x28, %r14
jne 0x316c
jmp 0x31fc
jmp 0x3189
jmp 0x3189
movq %rax, %rbx
addq $-0x28, %r15
movq %r15, %rdi
callq 0x20e0
cmpq %r14, %r15
jne 0x318c
jmp 0x31fc
movq %rax, %rbx
jmp 0x31fc
movq %r14, %rdi
movq %rax, %rbx
callq 0x20e0
leaq -0x1b0(%rbp), %rdi
callq 0x20e0
jmp 0x3205
movq %rax, %rbx
jmp 0x3205
jmp 0x31d0
jmp 0x31dc
jmp 0x31d0
jmp 0x31dc
jmp 0x31d0
jmp 0x31dc
jmp 0x31dc
movq %rax, %rbx
leaq -0x188(%rbp), %rdi
jmp 0x31eb
movq %rax, %rbx
jmp 0x31f0
leaq -0x1d8(%rbp), %rdi
movq %rax, %rbx
callq 0x20e0
leaq -0xc8(%rbp), %rdi
callq 0x3444
leaq -0x78(%rbp), %rdi
callq 0x3418
leaq -0x388(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2280
nop