// File: /workspace/github_cpp_makefile_star2_O3/nvanbenschoten[P]byzantine-agreement/src/main.cc
// Function: GetMaliciousBehavior(args::ValueFlagList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector, args::ValueReader<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, bool)
generals::MaliciousBehavior GetMaliciousBehavior(StringFlagList& malicious,
                                                 bool is_commander) {
  // Create the MaliciousBehavior instance.
  generals::MaliciousBehavior b = generals::MaliciousBehavior::NONE;
  try {
    for (const auto mal : args::get(malicious)) {
      b |= generals::StringToMaliciousBehavior(mal);
    }
  } catch (std::invalid_argument e) {
    throw args::ValidationError(e.what());
  }

  // Validate that the malicious behavior is valid for the general type.
  if (is_commander) {
    for (auto const& not_avail : only_lieutenant_behavior) {
      if (generals::Exhibits(b, not_avail)) {
        throw args::ValidationError(
            "only a lieutenant can have the malicious behavior \"" +
            generals::MaliciousBehaviorString(not_avail) + "\"");
      }
    }
  } else {
    for (auto const& not_avail : only_commander_behavior) {
      if (generals::Exhibits(b, not_avail)) {
        throw args::ValidationError(
            "only a commander can have the malicious behavior \"" +
            generals::MaliciousBehaviorString(not_avail) + "\"");
      }
    }
  }

  return b;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %esi, 0x24(%rsp)
movq 0xc8(%rdi), %r13
movq 0xd0(%rdi), %r14
xorl %ebx, %ebx
cmpq %r14, %r13
je 0x7161
leaq 0x78(%rsp), %rbp
leaq 0x68(%rsp), %r15
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0xe276
movq %rbp, 0x68(%rsp)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xe276
movq %r15, %rdi
callq 0x1168c
movl %eax, %r12d
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x713a
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x5340
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7155
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5340
orl %r12d, %ebx
addq $0x20, %r13
cmpq %r14, %r13
jne 0x70e3
cmpb $0x0, 0x24(%rsp)
je 0x7193
movq 0x193b1(%rip), %r15     # 0x20520
leaq 0x1939a(%rip), %r14     # 0x20510
cmpq %r14, %r15
je 0x71c0
testl %ebx, 0x20(%r15)
jne 0x71d4
movq %r15, %rdi
callq 0x53d0
movq %rax, %r15
cmpq %r14, %rax
jne 0x717b
jmp 0x71c0
movq 0x193b6(%rip), %r15     # 0x20550
leaq 0x1939f(%rip), %r14     # 0x20540
cmpq %r14, %r15
je 0x71c0
testl %ebx, 0x20(%r15)
jne 0x7237
movq %r15, %rdi
callq 0x53d0
movq %rax, %r15
cmpq %r14, %rax
jne 0x71a6
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x51a0
movq %rax, %r14
movl 0x20(%r15), %esi
leaq 0x28(%rsp), %rdi
callq 0x11743
leaq 0xf844(%rip), %rsi      # 0x16a3a
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x9c49
leaq 0xf893(%rip), %rsi      # 0x16a9f
leaq 0x48(%rsp), %rdi
callq 0x5660
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x729a
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x72a6
movl $0x10, %edi
callq 0x51a0
movq %rax, %r14
movl 0x20(%r15), %esi
leaq 0x28(%rsp), %rdi
callq 0x11743
leaq 0xf815(%rip), %rsi      # 0x16a6e
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x9c49
leaq 0xf830(%rip), %rsi      # 0x16a9f
leaq 0x48(%rsp), %rdi
callq 0x5660
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x72f2
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x72fe
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %r14, %rdi
callq 0x5410
leaq 0x1828e(%rip), %rax     # 0x1f560
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0x181aa(%rip), %rsi     # 0x1f488
movq 0x18c9b(%rip), %rdx     # 0x1ff80
movq %r14, %rdi
callq 0x55d0
jmp 0x74b8
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %r14, %rdi
callq 0x5410
leaq 0x18236(%rip), %rax     # 0x1f560
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0x18152(%rip), %rsi     # 0x1f488
movq 0x18c43(%rip), %rdx     # 0x1ff80
movq %r14, %rdi
callq 0x55d0
jmp 0x74b8
jmp 0x734c
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x736f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x736f
jmp 0x7369
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x738a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x73a5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5340
testb %bpl, %bpl
jne 0x73d6
jmp 0x74f7
jmp 0x73b1
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x73d6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x73d6
jmp 0x73d3
movq %rax, %rbx
movq %r14, %rdi
callq 0x5270
jmp 0x74f7
movq %rdx, %r14
movq %rax, %rbx
jmp 0x742b
movq %rdx, %r14
movq %rax, %rbx
jmp 0x7410
movq %rdx, %r14
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7410
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x5340
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x742b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5340
cmpl $0x1, %r14d
jne 0x74f7
movq %rbx, %rdi
callq 0x5400
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x5590
movq 0x18b0c(%rip), %rax     # 0x1ff60
addq $0x10, %rax
movq %rax, (%r15)
movq %rbx, %rdi
callq 0x5160
movl $0x10, %edi
callq 0x51a0
movq %rax, %r14
movq %r15, %rdi
callq 0x54f0
movq %rsp, %rdi
leaq 0x28(%rsp), %rdx
movq %rax, %rsi
callq 0x9ac6
movb $0x1, %bpl
movq %rsp, %rsi
movq %r14, %rdi
callq 0x5410
leaq 0x180c3(%rip), %rax     # 0x1f560
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0x17fdf(%rip), %rsi     # 0x1f488
movq 0x18ad0(%rip), %rdx     # 0x1ff80
movq %r14, %rdi
callq 0x55d0
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x74d6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5340
testb %bpl, %bpl
jne 0x74e0
jmp 0x74e8
movq %rax, %rbx
movq %r14, %rdi
callq 0x5270
leaq 0x48(%rsp), %rdi
callq 0x5690
callq 0x5580
movq %rbx, %rdi
callq 0x5600
movq %rax, %rdi
callq 0x9b59