// File: /workspace/github_cpp_makefile_star2_O3/ljl0222[P]SecondFileSystem/User.cpp
// Function: User::checkPathName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool User::checkPathName(string path) {
    // FileManager �к������жϲ����ĺϷ��ԣ�������User�й��ˣ�
    // �ݲ����ǹ����Ĳ������Ϸ�����
    if (path.empty()) {
        cout << "parameter path can't be empty ! \n";
        return false;
    }

    if (path.substr(0, 2) != "..") {
        u_dirp = path;
    }
    else {
        string pre = u_curdir;
        unsigned int p = 0;
        //���Զ�������·�� .. ../ ../.. ../../
        for (; pre.length() > 3 && p < path.length() && path.substr(p, 2) == ".."; ) {
            pre.pop_back();
            pre.erase(pre.find_last_of('/') + 1);
            p += 2;
            p += p < path.length() && path[p] == '/';
        }
        u_dirp = pre + path.substr(p);
    }

    if (u_dirp.length() > 1 && u_dirp.back() == '/') {
        u_dirp.pop_back();
    }

    for (unsigned int p = 0, q = 0; p < u_dirp.length(); p = q + 1) {
        q = u_dirp.find('/', p);
        q = min(q, (unsigned int)u_dirp.length());
        if (q - p > DirectoryEntry::DIRSIZ) {
            cout << "�ļ�·�����ȹ����� \n";
            return false;
        }
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
cmpq $0x0, 0x8(%rsi)
je 0x6517
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x48(%rbp), %r12
movl $0x2, %ecx
movq %r12, %rdi
xorl %edx, %edx
callq 0x3230
leaq 0x2d04(%rip), %rsi      # 0x91de
movq %r12, %rdi
callq 0x30b0
movl %eax, %r15d
movq (%r12), %rdi
leaq -0x38(%rbp), %r12
cmpq %r12, %rdi
je 0x64fe
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3220
testl %r15d, %r15d
je 0x652f
leaq 0x1038(%rbx), %rdi
movq %r14, %rsi
callq 0x3130
jmp 0x66f0
movq 0x6aaa(%rip), %rdi      # 0xcfc8
leaq 0x2c97(%rip), %rsi      # 0x91bc
movl $0x21, %edx
jmp 0x676e
movq %r12, %rax
leaq -0x48(%rbp), %r12
movq %rax, (%r12)
movq 0x10a8(%rbx), %rsi
movq 0x10b0(%rbx), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x773c
xorl %r15d, %r15d
cmpq $0x4, 0x8(%r12)
leaq -0x58(%rbp), %r12
jb 0x6627
movq 0x8(%r14), %rax
leaq -0x68(%rbp), %r12
movl %r15d, %edx
cmpq %rdx, %rax
jbe 0x6620
movl $0x2, %ecx
movq %r12, %rdi
movq %r14, %rsi
callq 0x3230
movq %r12, %rdi
leaq 0x2c4a(%rip), %rsi      # 0x91de
callq 0x30b0
movl %eax, %r13d
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x65b5
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3220
testl %r13d, %r13d
jne 0x6620
leaq -0x48(%rbp), %r13
movq %r13, %rdi
callq 0x3290
movq %r13, %rdi
movl $0x2f, %esi
movq $-0x1, %rdx
callq 0x3430
incq %rax
movq -0x40(%rbp), %rcx
cmpq %rax, %rcx
jb 0x6784
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rcx
movb $0x0, (%rcx,%rax)
addl $0x2, %r15d
movq 0x8(%r14), %rax
xorl %ecx, %ecx
cmpq %r15, %rax
jbe 0x6612
movq (%r14), %rdx
xorl %ecx, %ecx
cmpb $0x2f, (%rdx,%r15)
sete %cl
addl %ecx, %r15d
cmpq $0x3, -0x40(%rbp)
ja 0x656e
movl %r15d, %r15d
leaq -0x58(%rbp), %r12
leaq -0x88(%rbp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq $-0x1, %rcx
leaq -0x38(%rbp), %r15
callq 0x3230
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %r8
leaq -0x88(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3250
movq %r12, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x667c
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x6684
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq -0x68(%rbp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1038(%rbx), %rdi
movq %r14, %rsi
callq 0x32a0
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x66c2
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3220
leaq -0x78(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x66db
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x3220
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x66f0
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3220
leaq 0x1038(%rbx), %r14
movq 0x1040(%rbx), %rax
cmpq $0x2, %rax
jb 0x671d
movq (%r14), %rcx
cmpb $0x2f, -0x1(%rcx,%rax)
jne 0x6722
movq %r14, %rdi
callq 0x3290
movq 0x1040(%rbx), %rax
testq %rax, %rax
je 0x6757
xorl %eax, %eax
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x2f, %esi
movq %rax, %rdx
callq 0x32e0
movq 0x1040(%rbx), %rcx
cmpl %eax, %ecx
cmovbl %ecx, %eax
movl %eax, %edx
subl %r15d, %edx
cmpl $0x1d, %edx
jae 0x675b
incl %eax
movl %eax, %r15d
cmpq %rax, %rcx
ja 0x6727
movb $0x1, %al
jmp 0x6775
movq 0x6866(%rip), %rdi      # 0xcfc8
leaq 0x2a78(%rip), %rsi      # 0x91e1
movl $0x14, %edx
callq 0x3260
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2b5b(%rip), %rdi      # 0x92e6
leaq 0x2b8b(%rip), %rsi      # 0x931d
movq %rax, %rdx
xorl %eax, %eax
callq 0x3350
movq %rax, %rbx
leaq -0x78(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x67c1
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x3220
jmp 0x67c1
jmp 0x67be
jmp 0x67be
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x67da
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x33e0