// File: /workspace/github_cpp_makefile_star2_O1/acliusBackHome[P]kamaya/dist/ParseType.cpp
// Function: ParseType::operator<(ParseType const&) const
bool ParseType::operator<(const ParseType &other) const {
    if (type_size < other.type_size) {
        return true;
    } else if (type_size > other.type_size) {
        return false;
    }
    if (base_type < other.base_type) {
        return true;
    } else if (base_type > other.base_type) {
        return false;
    }
    if (specifier < other.specifier) {
        return true;
    } else if (specifier > other.specifier) {
        return false;
    }
    if (lower_type < other.lower_type) {
        return true;
    } else if (lower_type > other.lower_type) {
        return false;
    }
    if (pointer_level < other.pointer_level) {
        return true;
    } else if (pointer_level > other.pointer_level) {
        return false;
    }
    if (array_size < other.array_size) {
        return true;
    } else if (array_size > other.array_size) {
        return false;
    }
    if (!fields && other.fields) {
        return true;
    } else if (fields && !other.fields) {
        return false;
    } else if (fields && other.fields) {
        if (fields->size() < other.fields->size()) {
            return true;
        } else if (fields->size() > other.fields->size()) {
            return false;
        }
        set<string> all_fields;
        // 字典比较遵循以下原则: 遍历字典: 对两者都有的键来说, 没有键的一方小
        // 同样键中, 值小的一方小
        for (const auto &each : *fields) {
            if (all_fields.find(each.first) == all_fields.end()) {
                all_fields.insert(each.first);
            }
        }
        for (const auto &each : *other.fields) {
            if (all_fields.find(each.first) == all_fields.end()) {
                all_fields.insert(each.first);
            }
        }
        for (const auto &each: all_fields) {
            auto iter_this = fields->find(each), iter_other = other.fields->find(each);
            if (iter_this == fields->end() && iter_other != other.fields->end()) {
                return true;
            } else if (iter_this != fields->end() && iter_other == other.fields->end()) {
                return false;
            } else {
                // 到这一步一定都存在该键值
                if (iter_this->second < iter_other->second) {
                    return true;
                } else if (iter_this->second > iter_other->second) {
                    return false;
                }
            }
        }
    }
    // 到了这一步说明相等
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x20(%rdi), %rax
movq 0x20(%rsi), %rcx
movb $0x1, %r15b
cmpq %rcx, %rax
jb 0x289f2
jbe 0x289e4
xorl %r15d, %r15d
jmp 0x289f2
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %eax
movl (%rsi), %ecx
cmpl %ecx, %eax
jge 0x28a08
andb $0x1, %r15b
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jg 0x289df
movl 0x4(%r14), %eax
movl 0x4(%rbx), %ecx
cmpl %ecx, %eax
jl 0x289f2
jg 0x289df
movq 0x8(%r14), %rax
movq 0x8(%rbx), %rcx
cmpq %rcx, %rax
jb 0x289f2
ja 0x289df
movq 0x28(%r14), %rax
movq 0x28(%rbx), %rcx
cmpq %rcx, %rax
jb 0x289f2
ja 0x289df
movq 0x30(%r14), %rax
movq 0x30(%rbx), %rcx
cmpq %rcx, %rax
jb 0x289f2
ja 0x289df
movq 0x10(%r14), %r12
testq %r12, %r12
setne %cl
movq 0x10(%rbx), %rax
testq %rax, %rax
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x289f2
testq %rax, %rax
sete %cl
testq %r12, %r12
setne %dl
testb %cl, %dl
jne 0x289df
testq %rax, %rax
sete %cl
testq %r12, %r12
sete %dl
orb %cl, %dl
jne 0x289df
movq 0x28(%r12), %rcx
movq 0x28(%rax), %rax
cmpq %rax, %rcx
jb 0x289f2
ja 0x289df
leaq -0x60(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq 0x18(%r12), %r15
addq $0x8, %r12
cmpq %r12, %r15
je 0x28afe
leaq 0x20(%r15), %r13
leaq -0x68(%rbp), %rdi
movq %r13, %rsi
callq 0x2a362
leaq -0x60(%rbp), %rcx
cmpq %rcx, %rax
jne 0x28aee
leaq -0x68(%rbp), %rdi
movq %r13, %rsi
callq 0x2a400
movq %r15, %rdi
callq 0x4230
movq %rax, %r15
cmpq %r12, %rax
jne 0x28ac9
movq 0x10(%rbx), %r12
movq 0x18(%r12), %r15
addq $0x8, %r12
cmpq %r12, %r15
je 0x28b45
leaq 0x20(%r15), %r13
leaq -0x68(%rbp), %rdi
movq %r13, %rsi
callq 0x2a362
leaq -0x60(%rbp), %rcx
cmpq %rcx, %rax
jne 0x28b35
leaq -0x68(%rbp), %rdi
movq %r13, %rsi
callq 0x2a400
movq %r15, %rdi
callq 0x4230
movq %rax, %r15
cmpq %r12, %rax
jne 0x28b10
movq -0x50(%rbp), %rdx
leaq -0x60(%rbp), %rax
cmpq %rax, %rdx
sete -0x29(%rbp)
je 0x28bed
movq %rdx, %rcx
movq %rcx, -0x38(%rbp)
leaq 0x20(%rcx), %r12
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0x19e18
movq %rax, %r13
movq 0x10(%rbx), %rdi
movq %r12, %rsi
callq 0x19e18
movq 0x10(%r14), %rcx
addq $0x8, %rcx
cmpq %rcx, %r13
jne 0x28ba1
movq 0x10(%rbx), %rdx
addq $0x8, %rdx
cmpq %rdx, %rax
je 0x28ba1
xorl %eax, %eax
movb $0x1, %r15b
jmp 0x28bca
cmpq %rcx, %r13
je 0x28bba
movq 0x10(%rbx), %rcx
addq $0x8, %rcx
cmpq %rcx, %rax
jne 0x28bba
xorl %eax, %eax
xorl %r15d, %r15d
jmp 0x28bca
movq 0x40(%rax), %rax
cmpq %rax, 0x40(%r13)
jb 0x28b9a
setbe %al
andb %al, %r15b
testb %al, %al
je 0x28bed
movq -0x38(%rbp), %rdi
callq 0x4350
movq %rax, %rcx
leaq -0x60(%rbp), %rax
cmpq %rax, %rcx
sete -0x29(%rbp)
jne 0x28b5d
jmp 0x28bed
leaq -0x68(%rbp), %rdi
callq 0x2999e
testb $0x1, -0x29(%rbp)
jne 0x289df
jmp 0x289f2
jmp 0x28c0f
jmp 0x28c0f
jmp 0x28c0f
jmp 0x28c0f
jmp 0x28c0f
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x2999e
movq %rbx, %rdi
callq 0x4560
nop