// File: /workspace/github_cpp_makefile_star2_O3/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 0x150e
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xd9c(%rip), %rsi       # 0x200a
leaq 0xda0(%rip), %rdx       # 0x2015
leaq -0x68(%rbp), %rdi
callq 0x150e
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0xd88(%rip), %rsi       # 0x2016
leaq 0xd85(%rip), %rdx       # 0x201a
leaq -0x48(%rbp), %rdi
callq 0x150e
movq -0x80(%rbp), %r13
movq -0x60(%rbp), %rbx
cmpq %r13, %rbx
movq %r13, %rdx
cmovbq %rbx, %rdx
testq %rdx, %rdx
je 0x12c9
movq -0x68(%rbp), %rsi
movq -0x88(%rbp), %rdi
callq 0x1040
testl %eax, %eax
jne 0x12ed
movq %r13, %rcx
subq %rbx, %rcx
cmpq $-0x7fffffff, %rcx      # imm = 0x80000001
movq $-0x80000000, %rax      # imm = 0x80000000
cmovgeq %rcx, %rax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %rax
cmovgeq %rcx, %rax
testl %eax, %eax
jns 0x133b
movq 0x2ce0(%rip), %rbx      # 0x3fd8
leaq 0xd1c(%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 0x2cae(%rip), %rdi      # 0x3fd8
callq 0x1030
movq %rax, %rdi
callq 0x1050
movq -0x80(%rbp), %r13
movq -0x40(%rbp), %rbx
cmpq %rbx, %r13
movq %rbx, %rdx
cmovbq %r13, %rdx
testq %rdx, %rdx
je 0x1362
movq -0x88(%rbp), %rsi
movq -0x48(%rbp), %rdi
callq 0x1040
testl %eax, %eax
jne 0x1386
movq %rbx, %rcx
subq %r13, %rcx
cmpq $-0x7fffffff, %rcx      # imm = 0x80000001
movq $-0x80000000, %rax      # imm = 0x80000000
cmovgeq %rcx, %rax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
cmpq %rcx, %rax
cmovgeq %rcx, %rax
testl %eax, %eax
jle 0x13d4
movq 0x2c47(%rip), %rbx      # 0x3fd8
leaq 0xc92(%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 0x2c15(%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
testl %eax, %eax
jne 0x1419
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 0x1463
movq 0x2bb4(%rip), %rbx      # 0x3fd8
leaq 0xbff(%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 0x2b82(%rip), %rdi      # 0x3fd8
callq 0x1030
movq %rax, %rdi
callq 0x1050
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x1478
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x10a0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x148d
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x10a0
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
je 0x14a5
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 0x14d8
movq %rax, %rbx
jmp 0x14ed
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x14d8
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x10a0
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x14ed
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x10a0
movq -0x88(%rbp), %rdi
cmpq %r14, %rdi
je 0x1505
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x10a0
movq %rbx, %rdi
callq 0x10d0
nop