// File: Konano[P]UselessDatabase/FileManager.cpp
// Function: dirPath(char const*, char const*, char const*, char const*)
char* dirPath(const char* dir, const char* filename, const char* subname, const char* filetype) { // get str "db/dir/filename_subname.filetype"
    int length = 3 + strlen(dir) + 1 + strlen(filename) + 1 + strlen(subname) + 1 + strlen(filetype);
    char* data = new char[length + 1];
    strcpy(data, "db/");
    strcpy(data + 3, dir);
    strcpy(data + 3 + strlen(dir), "/");
    strcpy(data + 3 + strlen(dir) + 1, filename);
    strcpy(data + 3 + strlen(dir) + 1 + strlen(filename), "_");
    strcpy(data + 3 + strlen(dir) + 1 + strlen(filename) + 1, subname);
    strcpy(data + 3 + strlen(dir) + 1 + strlen(filename) + 1 + strlen(subname), ".");
    strcpy(data + 3 + strlen(dir) + 1 + strlen(filename) + 1 + strlen(subname) + 1, filetype);
    return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
addq $0x3, %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6250
movq %rax, %rcx
movq -0xa8(%rbp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6250
movq %rax, %rcx
movq -0xa0(%rbp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x98(%rbp)
movq -0x20(%rbp), %rdi
callq 0x6250
movq %rax, %rcx
movq -0x98(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x6040
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq 0x4e2f5(%rip), %rsi     # 0x83790
callq 0x6460
movq -0x30(%rbp), %rdi
addq $0x3, %rdi
movq -0x8(%rbp), %rsi
callq 0x6460
movq -0x30(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x90(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
movq -0x90(%rbp), %rdi
addq %rax, %rdi
leaq 0x4e2b8(%rip), %rsi     # 0x83792
callq 0x6460
movq -0x30(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x88(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
movq -0x88(%rbp), %rdi
addq %rax, %rdi
addq $0x1, %rdi
movq -0x10(%rbp), %rsi
callq 0x6460
movq -0x30(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x80(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
movq %rax, %rcx
movq -0x80(%rbp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6250
movq -0x78(%rbp), %rdi
addq %rax, %rdi
leaq 0x4e6d8(%rip), %rsi     # 0x83c24
callq 0x6460
movq -0x30(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
movq %rax, %rcx
movq -0x70(%rbp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6250
movq -0x68(%rbp), %rdi
addq %rax, %rdi
addq $0x1, %rdi
movq -0x18(%rbp), %rsi
callq 0x6460
movq -0x30(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
movq %rax, %rcx
movq -0x60(%rbp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6250
movq %rax, %rcx
movq -0x58(%rbp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6250
movq -0x50(%rbp), %rdi
addq %rax, %rdi
leaq 0x494e0(%rip), %rsi     # 0x7eace
callq 0x6460
movq -0x30(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6250
movq %rax, %rcx
movq -0x48(%rbp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6250
movq %rax, %rcx
movq -0x40(%rbp), %rax
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6250
movq -0x38(%rbp), %rdi
addq %rax, %rdi
addq $0x1, %rdi
movq -0x20(%rbp), %rsi
callq 0x6460
movq -0x30(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nop