// File: alfanick[P]rest-cpp/src/rest/router.cpp
// Function: REST::Router::print()
void Router::print() {
    std::cout << "Available routes:\n";

    for (auto& r : routes) {
      std::cout << "  " << std::get<1>(r);

      auto service = std::get<2>(r)[0];

      if (dynamic_cast< LambdaService* >(service) != nullptr) {
        std::cout << " - lambda";
      } else
      if (dynamic_cast< Resource* >(service) != nullptr) {
        std::cout << " - resource";
      } else {
        std::cout << " - service";
      }

      if (service->features.size() > 0) {
        std::cout << " (";
        int s = service->features.size();

        for (auto feature : service->features) {
          std::cout << feature->feature_name();
          if (--s)
            std::cout << ", ";
        }
        std::cout << ")";
      }

      std::cout << std::endl;
    }
  }

// Assembly:
subq $0xc8, %rsp
movq %rdi, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x5efb5(%rip), %rdi     # 0x105e28
leaq 0x3e2b6(%rip), %rsi     # 0xe5130
callq 0x930c0
movq 0x38(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rdi
callq 0x94260
movq %rax, 0xb0(%rsp)
movq 0xb8(%rsp), %rdi
callq 0x8dd60
movq %rax, 0xa8(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x98060
testb $0x1, %al
jne 0xa6ed4
jmp 0xa718e
leaq 0xb0(%rsp), %rdi
callq 0x8ecd0
movq %rax, 0xa0(%rsp)
movq 0x5ef38(%rip), %rdi     # 0x105e28
leaq 0x3e24c(%rip), %rsi     # 0xe5143
callq 0x930c0
movq %rax, 0x28(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x973b0
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x925d0
movq 0xa0(%rsp), %rdi
callq 0x8eea0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8f790
movq (%rax), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpq $0x0, %rax
je 0xa6f78
movq 0x30(%rsp), %rdi
movq 0x5efc2(%rip), %rsi     # 0x105f20
movq 0x5ec13(%rip), %rdx     # 0x105b78
movq $-0x1, %rcx
callq 0x93f90
movq %rax, 0x20(%rsp)
jmp 0xa6f81
xorl %eax, %eax
movq %rax, 0x20(%rsp)
jmp 0xa6f81
movq 0x20(%rsp), %rax
cmpq $0x0, %rax
je 0xa6fa1
movq 0x5ee95(%rip), %rdi     # 0x105e28
leaq 0x3e1ac(%rip), %rsi     # 0xe5146
callq 0x930c0
jmp 0xa7018
movq 0x98(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0xa6fda
movq 0x18(%rsp), %rdi
movq 0x5ef60(%rip), %rsi     # 0x105f20
movq 0x5ec21(%rip), %rdx     # 0x105be8
movq $-0x1, %rcx
callq 0x93f90
movq %rax, 0x10(%rsp)
jmp 0xa6fe3
xorl %eax, %eax
movq %rax, 0x10(%rsp)
jmp 0xa6fe3
movq 0x10(%rsp), %rax
cmpq $0x0, %rax
je 0xa7003
movq 0x5ee33(%rip), %rdi     # 0x105e28
leaq 0x3e154(%rip), %rsi     # 0xe5150
callq 0x930c0
jmp 0xa7016
movq 0x5ee1e(%rip), %rdi     # 0x105e28
leaq 0x3e14b(%rip), %rsi     # 0xe515c
callq 0x930c0
jmp 0xa7018
movq 0x98(%rsp), %rdi
addq $0x18, %rdi
callq 0x979e0
cmpq $0x0, %rax
jbe 0xa7169
movq 0x5edee(%rip), %rdi     # 0x105e28
leaq 0x3e126(%rip), %rsi     # 0xe5167
callq 0x930c0
movq 0x98(%rsp), %rdi
addq $0x18, %rdi
callq 0x979e0
movl %eax, 0x94(%rsp)
movq 0x98(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rdi
callq 0x90680
movq %rax, 0x80(%rsp)
movq 0x88(%rsp), %rdi
callq 0x93330
movq %rax, 0x78(%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x975c0
testb $0x1, %al
jne 0xa70b4
jmp 0xa7156
leaq 0x80(%rsp), %rdi
callq 0x8f1b0
movq (%rax), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq 0x50(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq *%rax
movq 0x8(%rsp), %rsi
movq 0x5ed3c(%rip), %rdi     # 0x105e28
callq 0x925d0
jmp 0xa70f3
leaq 0x50(%rsp), %rdi
callq 0x99830
movl 0x94(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x94(%rsp)
cmpl $0x0, %eax
je 0xa7142
movq 0x5ed0e(%rip), %rdi     # 0x105e28
leaq 0x3e049(%rip), %rsi     # 0xe516a
callq 0x930c0
jmp 0xa7142
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x99830
jmp 0xa7196
jmp 0xa7144
leaq 0x80(%rsp), %rdi
callq 0x97190
jmp 0xa7099
movq 0x5eccb(%rip), %rdi     # 0x105e28
leaq 0x3e8d8(%rip), %rsi     # 0xe5a3c
callq 0x930c0
movq 0x5ecb8(%rip), %rdi     # 0x105e28
movq 0x5ea81(%rip), %rsi     # 0x105bf8
callq 0x935c0
leaq 0xb0(%rsp), %rdi
callq 0x94080
jmp 0xa6eb6
addq $0xc8, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x981c0