// File: eecs280staff[P]unit_test_framework/./unit_test_framework.hpp
// Function: unit_test_framework::TestSuite::run_tests(int, char**)
int run_tests(int argc, char** argv) {
      SetComplete completer(TestSuite::incomplete);
      std::vector<std::string> test_names_to_run;
      try {
        test_names_to_run = get_test_names_to_run(argc, argv);
      }
      catch (ExitSuite& e) {
        return e.status;
      }

      for (auto test_name : test_names_to_run) {
        if (tests_.find(test_name) == end(tests_)) {
          throw std::runtime_error("Test " + test_name + " not found");
        }
      }

      for (auto test_name : test_names_to_run) {
        tests_.at(test_name).run(quiet_mode);
      }

      std::cout << "\n*** Results ***" << std::endl;
      for (auto test_name : test_names_to_run) {
        tests_.at(test_name).print(quiet_mode);
      }

      auto num_failures =
        std::count_if(tests_.begin(), tests_.end(),
                      [](std::pair<std::string, TestCase> test_pair) {
                        return not test_pair.second.failure_msg.empty();
                      });
      auto num_errors =
        std::count_if(tests_.begin(), tests_.end(),
                      [](std::pair<std::string, TestCase> test_pair) {
                        return not test_pair.second.exception_msg.empty();
                      });

      if (not quiet_mode) {
        std::cout << "*** Summary ***" << std::endl;
        std::cout << "Out of " << test_names_to_run.size()
                  << " tests run:" << std::endl;
        std::cout << num_failures << " failure(s), " << num_errors
                  << " error(s)" << std::endl;
      }

      if (num_failures == 0 and num_errors == 0) {
        return 0;
      }
      return 1;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq 0xa835(%rip), %rsi      # 0xe26d
leaq -0x28(%rbp), %rdi
callq 0x5220
leaq -0x40(%rbp), %rdi
callq 0x5240
movq -0x1c0(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x20(%rbp), %rcx
leaq -0x58(%rbp), %rdi
callq 0x5260
jmp 0x3a63
leaq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x5bf0
leaq -0x58(%rbp), %rdi
callq 0x5c20
jmp 0x3ad2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x40cc
movq -0x60(%rbp), %rdi
callq 0x30e0
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x74(%rbp)
callq 0x3390
jmp 0x3abc
jmp 0x40ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x40cc
leaq -0x40(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdi
callq 0x5c80
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rdi
callq 0x5cb0
movq %rax, -0x90(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x5ce0
testb $0x1, %al
jne 0x3b16
jmp 0x3cbc
leaq -0x88(%rbp), %rdi
callq 0x5d20
movq %rax, %rsi
leaq -0xb0(%rbp), %rdi
callq 0x30f0
jmp 0x3b33
movq -0x1c0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x5d40
movq %rax, -0x1c8(%rbp)
jmp 0x3b4f
movq -0x1c0(%rbp), %rdi
movq -0x1c8(%rbp), %rax
movq %rax, -0xb8(%rbp)
callq 0x5d70
movq %rax, -0x1d0(%rbp)
jmp 0x3b72
movq -0x1d0(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq -0xb8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x47c0
testb $0x1, %al
jne 0x3b9c
jmp 0x3c8e
movb $0x1, -0x101(%rbp)
movl $0x10, %edi
callq 0x3110
movq %rax, -0x1d8(%rbp)
leaq 0x54b0(%rip), %rsi      # 0x906b
leaq -0x100(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
callq 0x5df0
jmp 0x3bd0
leaq 0x549a(%rip), %rdx      # 0x9071
leaq -0xe0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x5da0
jmp 0x3bec
movq -0x1d8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x3380
jmp 0x3c01
movq -0x1d8(%rbp), %rdi
movb $0x0, -0x101(%rbp)
movq 0xa3da(%rip), %rsi      # 0xdff0
movq 0xa39b(%rip), %rdx      # 0xdfb8
callq 0x33b0
jmp 0x40e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x3cab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x3c75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x3c69
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x3160
leaq -0x100(%rbp), %rdi
callq 0x3160
testb $0x1, -0x101(%rbp)
jne 0x3c80
jmp 0x3c8c
movq -0x1d8(%rbp), %rdi
callq 0x31b0
jmp 0x3cab
leaq -0xb0(%rbp), %rdi
callq 0x3160
leaq -0x88(%rbp), %rdi
callq 0x5f00
jmp 0x3afa
leaq -0xb0(%rbp), %rdi
callq 0x3160
jmp 0x40cc
leaq -0x40(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rdi
callq 0x5c80
movq %rax, -0x118(%rbp)
movq -0x110(%rbp), %rdi
callq 0x5cb0
movq %rax, -0x120(%rbp)
leaq -0x118(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x5ce0
testb $0x1, %al
jne 0x3d09
jmp 0x3d98
leaq -0x118(%rbp), %rdi
callq 0x5d20
movq %rax, %rsi
leaq -0x140(%rbp), %rdi
callq 0x30f0
jmp 0x3d26
movq -0x1c0(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x5f20
movq %rax, -0x1e0(%rbp)
jmp 0x3d42
movq -0x1e0(%rbp), %rdi
movq -0x1c0(%rbp), %rax
movzbl 0x30(%rax), %esi
andl $0x1, %esi
callq 0x5fc0
jmp 0x3d5e
leaq -0x140(%rbp), %rdi
callq 0x3160
leaq -0x118(%rbp), %rdi
callq 0x5f00
jmp 0x3ced
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x3160
jmp 0x40cc
movq 0xa229(%rip), %rdi      # 0xdfc8
leaq 0x52d6(%rip), %rsi      # 0x907c
callq 0x3220
movq %rax, -0x1e8(%rbp)
jmp 0x3db4
movq -0x1e8(%rbp), %rdi
movq 0xa1e6(%rip), %rsi      # 0xdfa8
callq 0x3270
jmp 0x3dc9
leaq -0x40(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rdi
callq 0x5c80
movq %rax, -0x150(%rbp)
movq -0x148(%rbp), %rdi
callq 0x5cb0
movq %rax, -0x158(%rbp)
leaq -0x150(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0x5ce0
testb $0x1, %al
jne 0x3e16
jmp 0x3ea5
leaq -0x150(%rbp), %rdi
callq 0x5d20
movq %rax, %rsi
leaq -0x178(%rbp), %rdi
callq 0x30f0
jmp 0x3e33
movq -0x1c0(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x5f20
movq %rax, -0x1f0(%rbp)
jmp 0x3e4f
movq -0x1f0(%rbp), %rdi
movq -0x1c0(%rbp), %rax
movzbl 0x30(%rax), %esi
andl $0x1, %esi
callq 0x6360
jmp 0x3e6b
leaq -0x178(%rbp), %rdi
callq 0x3160
leaq -0x150(%rbp), %rdi
callq 0x5f00
jmp 0x3dfa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x3160
jmp 0x40cc
movq -0x1c0(%rbp), %rdi
callq 0x6500
movq -0x1c0(%rbp), %rdi
movq %rax, -0x188(%rbp)
callq 0x6530
movq %rax, -0x190(%rbp)
movq -0x188(%rbp), %rdi
movq -0x190(%rbp), %rsi
callq 0x64c0
movq %rax, -0x1f8(%rbp)
jmp 0x3ee7
movq -0x1c0(%rbp), %rdi
movq -0x1f8(%rbp), %rax
movq %rax, -0x180(%rbp)
callq 0x6500
movq -0x1c0(%rbp), %rdi
movq %rax, -0x1a8(%rbp)
callq 0x6530
movq %rax, -0x1b0(%rbp)
movq -0x1a8(%rbp), %rdi
movq -0x1b0(%rbp), %rsi
callq 0x6560
movq %rax, -0x200(%rbp)
jmp 0x3f37
movq -0x1c0(%rbp), %rax
movq -0x200(%rbp), %rcx
movq %rcx, -0x1a0(%rbp)
testb $0x1, 0x30(%rax)
jne 0x407c
movq 0xa06b(%rip), %rdi      # 0xdfc8
leaq 0x5129(%rip), %rsi      # 0x908d
callq 0x3220
movq %rax, -0x208(%rbp)
jmp 0x3f72
movq -0x208(%rbp), %rdi
movq 0xa028(%rip), %rsi      # 0xdfa8
callq 0x3270
jmp 0x3f87
movq 0xa03a(%rip), %rdi      # 0xdfc8
leaq 0x5108(%rip), %rsi      # 0x909d
callq 0x3220
movq %rax, -0x210(%rbp)
jmp 0x3fa3
leaq -0x40(%rbp), %rdi
callq 0x65a0
movq -0x210(%rbp), %rdi
movq %rax, %rsi
callq 0x3070
movq %rax, -0x218(%rbp)
jmp 0x3fc4
movq -0x218(%rbp), %rdi
leaq 0x50d3(%rip), %rsi      # 0x90a5
callq 0x3220
movq %rax, -0x220(%rbp)
jmp 0x3fe0
movq -0x220(%rbp), %rdi
movq 0x9fba(%rip), %rsi      # 0xdfa8
callq 0x3270
jmp 0x3ff5
movq -0x180(%rbp), %rsi
movq 0x9fc5(%rip), %rdi      # 0xdfc8
callq 0x3410
movq %rax, -0x228(%rbp)
jmp 0x4011
movq -0x228(%rbp), %rdi
leaq 0x5092(%rip), %rsi      # 0x90b1
callq 0x3220
movq %rax, -0x230(%rbp)
jmp 0x402d
movq -0x230(%rbp), %rdi
movq -0x1a0(%rbp), %rsi
callq 0x3410
movq %rax, -0x238(%rbp)
jmp 0x4049
movq -0x238(%rbp), %rdi
leaq 0x5068(%rip), %rsi      # 0x90bf
callq 0x3220
movq %rax, -0x240(%rbp)
jmp 0x4065
movq -0x240(%rbp), %rdi
movq 0x9f35(%rip), %rsi      # 0xdfa8
callq 0x3270
jmp 0x407a
jmp 0x407c
cmpq $0x0, -0x180(%rbp)
jne 0x40a0
cmpq $0x0, -0x1a0(%rbp)
jne 0x40a0
movl $0x0, -0x4(%rbp)
movl $0x1, -0x74(%rbp)
jmp 0x40ae
movl $0x1, -0x4(%rbp)
movl $0x1, -0x74(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5c20
leaq -0x28(%rbp), %rdi
callq 0x65c0
movl -0x4(%rbp), %eax
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0x5c20
leaq -0x28(%rbp), %rdi
callq 0x65c0
movq -0x60(%rbp), %rdi
callq 0x33e0
nopw (%rax,%rax)