// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH03_StringsVectorsAndArrays/examples/strcompare.cc
// Function: main
int main()
{
    string str = "Hello";
    string phrase = "Hello World";
    string slang  = "Hiya";

    if (str < phrase) cout << "str is smaller" << endl;
    if (slang > str) cout << "slang is greater" << endl;
    if (slang > phrase) cout << "slang is greater" << endl;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
leaq -0x78(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0xdb8(%rip), %rsi       # 0x2004
leaq 0xdb6(%rip), %rdx       # 0x2009
leaq -0x88(%rbp), %rdi
callq 0x1514
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xd9c(%rip), %rsi       # 0x200a
leaq 0xda0(%rip), %rdx       # 0x2015
leaq -0x68(%rbp), %rdi
callq 0x1514
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0xd88(%rip), %rsi       # 0x2016
leaq 0xd85(%rip), %rdx       # 0x201a
leaq -0x48(%rbp), %rdi
callq 0x1514
movq -0x80(%rbp), %rbx
movq -0x60(%rbp), %r13
cmpq %rbx, %r13
movq %rbx, %rdx
cmovbq %r13, %rdx
testq %rdx, %rdx
je 0x12c7
movq -0x68(%rbp), %rsi
movq -0x88(%rbp), %rdi
callq 0x1040
jmp 0x12c9
xorl %eax, %eax
testl %eax, %eax
jne 0x12ee
subq %r13, %rbx
cmpq $-0x7fffffff, %rbx      # imm = 0x80000001
movq $-0x80000000, %rax      # imm = 0x80000000
cmovgeq %rbx, %rax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %rax
cmovgeq %rcx, %rax
testl %eax, %eax
jns 0x1338
movq 0x2cdf(%rip), %rbx      # 0x3fd8
leaq 0xd1b(%rip), %rsi       # 0x201b
movl $0xe, %edx
movq %rbx, %rdi
callq 0x10b0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x1090
movsbl %al, %esi
movq 0x2cad(%rip), %rdi      # 0x3fd8
callq 0x1030
movq %rax, %rdi
callq 0x1050
movq -0x40(%rbp), %rbx
movq -0x80(%rbp), %r13
cmpq %rbx, %r13
movq %rbx, %rdx
cmovbq %r13, %rdx
testq %rdx, %rdx
je 0x1361
movq -0x88(%rbp), %rsi
movq -0x48(%rbp), %rdi
callq 0x1040
jmp 0x1363
xorl %eax, %eax
testl %eax, %eax
jne 0x1388
subq %r13, %rbx
cmpq $-0x7fffffff, %rbx      # imm = 0x80000001
movq $-0x80000000, %rax      # imm = 0x80000000
cmovgeq %rbx, %rax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %rax
cmovgeq %rcx, %rax
testl %eax, %eax
jle 0x13d2
movq 0x2c45(%rip), %rbx      # 0x3fd8
leaq 0xc90(%rip), %rsi       # 0x202a
movl $0x10, %edx
movq %rbx, %rdi
callq 0x10b0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x1090
movsbl %al, %esi
movq 0x2c13(%rip), %rdi      # 0x3fd8
callq 0x1030
movq %rax, %rdi
callq 0x1050
movq -0x40(%rbp), %rbx
movq -0x60(%rbp), %r13
cmpq %rbx, %r13
movq %rbx, %rdx
cmovbq %r13, %rdx
testq %rdx, %rdx
je 0x13f8
movq -0x68(%rbp), %rsi
movq -0x48(%rbp), %rdi
callq 0x1040
jmp 0x13fa
xorl %eax, %eax
testl %eax, %eax
jne 0x141f
subq %r13, %rbx
cmpq $-0x7fffffff, %rbx      # imm = 0x80000001
movq $-0x80000000, %rax      # imm = 0x80000000
cmovgeq %rbx, %rax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %rax
cmovgeq %rcx, %rax
testl %eax, %eax
jle 0x1469
movq 0x2bae(%rip), %rbx      # 0x3fd8
leaq 0xbf9(%rip), %rsi       # 0x202a
movl $0x10, %edx
movq %rbx, %rdi
callq 0x10b0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x1090
movsbl %al, %esi
movq 0x2b7c(%rip), %rdi      # 0x3fd8
callq 0x1030
movq %rax, %rdi
callq 0x1050
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x147e
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x10a0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x1493
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x10a0
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
je 0x14ab
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x10a0
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x14de
movq %rax, %rbx
jmp 0x14f3
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x14de
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x10a0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x14f3
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x10a0
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
je 0x150b
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x10a0
movq %rbx, %rdi
callq 0x10d0
nop