// File: PrzemekWirkus[P]functional-workshop/src/testconf.cpp
// Function: main
int main()
{
    // auto and lambda
    auto func = [] (string str) {cout << str << endl; };
    func("Lambda function call!"); // now call the function

    // some more templates
    global_address_book.push_back(string("http://www.cprogramming.com"));
    global_address_book.push_back(string("http://mbed.org"));
    global_address_book.push_back(string("http://google.com"));

    vector<string> v = findAddressesFromOrgs();

    cout << endl;
    cout << "Found .org domains:" << endl;
    for_each(v.begin(), v.end(), func);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
leaq -0x29(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x1180
movq -0xf0(%rbp), %rdx
leaq 0x1af9(%rip), %rsi      # 0x3032
leaq -0x28(%rbp), %rdi
callq 0x1120
jmp 0x1544
leaq -0x1(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x1800
jmp 0x1553
leaq -0x28(%rbp), %rdi
callq 0x1090
leaq -0x29(%rbp), %rdi
callq 0x1110
leaq -0x61(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x1180
movq -0xf8(%rbp), %rdx
leaq 0x1ac5(%rip), %rsi      # 0x3048
leaq -0x60(%rbp), %rdi
callq 0x1120
jmp 0x158e
leaq 0x3b63(%rip), %rdi      # 0x50f8
leaq -0x60(%rbp), %rsi
callq 0x1950
jmp 0x15a0
leaq -0x60(%rbp), %rdi
callq 0x1090
leaq -0x61(%rbp), %rdi
callq 0x1110
leaq -0x89(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x1180
movq -0x100(%rbp), %rdx
leaq 0x1a91(%rip), %rsi      # 0x3064
leaq -0x88(%rbp), %rdi
callq 0x1120
jmp 0x15e1
leaq 0x3b10(%rip), %rdi      # 0x50f8
leaq -0x88(%rbp), %rsi
callq 0x1950
jmp 0x15f6
leaq -0x88(%rbp), %rdi
callq 0x1090
leaq -0x89(%rbp), %rdi
callq 0x1110
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x1180
movq -0x108(%rbp), %rdx
leaq 0x1a45(%rip), %rsi      # 0x3074
leaq -0xb0(%rbp), %rdi
callq 0x1120
jmp 0x163d
leaq 0x3ab4(%rip), %rdi      # 0x50f8
leaq -0xb0(%rbp), %rsi
callq 0x1950
jmp 0x1652
leaq -0xb0(%rbp), %rdi
callq 0x1090
leaq -0xb1(%rbp), %rdi
callq 0x1110
leaq -0xd0(%rbp), %rdi
callq 0x1400
movq 0x395b(%rip), %rdi      # 0x4fd8
movq 0x3944(%rip), %rsi      # 0x4fc8
callq 0x1100
jmp 0x168b
movq 0x3946(%rip), %rdi      # 0x4fd8
leaq 0x19ed(%rip), %rsi      # 0x3086
callq 0x10e0
movq %rax, -0x110(%rbp)
jmp 0x16a7
movq -0x110(%rbp), %rdi
movq 0x3913(%rip), %rsi      # 0x4fc8
callq 0x1100
jmp 0x16bc
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x1980
movq -0x118(%rbp), %rdi
movq %rax, -0xd8(%rbp)
callq 0x19b0
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rdi
movq -0xe0(%rbp), %rsi
callq 0x1840
jmp 0x16fe
leaq -0xd0(%rbp), %rdi
callq 0x19e0
xorl %eax, %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1738
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x1090
leaq -0x29(%rbp), %rdi
callq 0x1110
jmp 0x17f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x1769
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x1090
leaq -0x61(%rbp), %rdi
callq 0x1110
jmp 0x17f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x179d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x1090
leaq -0x89(%rbp), %rdi
callq 0x1110
jmp 0x17f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x17d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x1090
leaq -0xb1(%rbp), %rdi
callq 0x1110
jmp 0x17f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x19e0
movq -0x38(%rbp), %rdi
callq 0x1170