// File: zyLiu6707[P]Arknights-Pull-Simulation/./utils.h
// Function: display_error_detail(ErrorFlag const&)
void display_error_detail(const ErrorFlag& error_flag) {
  if (error_flag.check_err()) {
    std::cerr << "The provided command line arguments are invalid due to the following error(s):\n";
    if (error_flag.err_help_ctrl_arg_with_other_args) {
      std::cerr << "\tOther argument(s) is(are) found with \"--help\"\n";
      std::cerr << "If you would like to see help message, please ony specify \"--help\"\n";
      std::cerr << "Other arguments are ignored. Will not run the simulation.\n";
      // Ignore other args and potential errors, aborting the program
      return;
    }
    if (error_flag.err_invalid_ctrl_args) {
      std::cerr << "\tInvalid control arguments: ";
      for (const auto& invalid_arg : error_flag.invalid_ctrl_args_list) {
        std::cerr << invalid_arg << " ";
      }
      std::cerr << std::endl;
    }
    if (error_flag.err_unexpected_arguments_at_the_beginning) {
      std::cerr << "\tUnexpected argument(s) at the beginning\n";
    }
    // Redundant argument
    if (error_flag.err_redundant_identical_ctrl_arg) {
      std::cerr << "\tSame arguments are specified more than once\n";
    }
    if (error_flag.err_redundant_total_pull_time_ctrl_arg) {
      std::cerr << "\tRedundant arguments: \"-t\" and \"--total-pull-time\" are specified at the same time\n";
    }
    if (error_flag.err_redundant_pity_ctrl_arg) {
      std::cerr << "\tRedundant arguments: \"-p\" and \"--pity\" are specified at the same time\n";
    }
    if (error_flag.err_redundant_num_rate_up_ctrl_arg) {
      std::cerr << "\tRedundant arguments: \"-n\" and \"--num-rate-up\" are specified at the same time\n";
    }
    if (error_flag.err_redundant_current_pull_ctrl_arg) {
      std::cerr << "\tRedundant arguments: \"-c\" and \"--current-pull\" are specified at the same time\n";
    }
    // Conflict arguments
    if (error_flag.err_conflict_ctrl_arg_flag) {
      std::cerr << "\tConflict arguments: \"--standard\" and \"--limited\" are specified at the same time\n";
    }
    // Missing detail value
    if (error_flag.err_missing_value_for_total_pull_time_ctrl_arg) {
      std::cerr << "\tMissing value for \"-t\"\n";
    }
    if (error_flag.err_missing_value_for_total_pull_time_long_name_ctrl_arg) {
      std::cerr << "\tMissing value for \"--total-pull-time\"\n";
    }
    if (error_flag.err_missing_value_for_pity_ctrl_arg) {
      std::cerr << "\tMissing value for \"-p\"\n";
    }
    if (error_flag.err_missing_value_for_pity_long_name_ctrl_arg) {
      std::cerr << "\tMissing value for \"--pity\"\n";
    }
    if (error_flag.err_missing_value_for_num_rate_up_ctrl_arg) {
      std::cerr << "\tMissing value for \"-n\"\n";
    }
    if (error_flag.err_missing_value_for_num_rate_up_long_name_ctrl_arg) {
      std::cerr << "\tMissing value for \"--num-rate-up\"\n";
    }
    if (error_flag.err_missing_value_for_current_pull_ctrl_arg) {
      std::cerr << "\tMissing value for \"-c\"\n";
    }
    if (error_flag.err_missing_value_for_current_pull_long_name_ctrl_arg) {
      std::cerr << "\tMissing value for \"--current-pull\"\n";
    }
    // Invalid value
    if (error_flag.err_invalid_value_for_total_pull_time_ctrl_arg) {
      std::cerr << "\tInvalid value for \"-t\" - it must be a positive integer\n";
    }
    if (error_flag.err_invalid_value_for_total_pull_time_long_name_ctrl_arg) {
      std::cerr << "\tInvalid value for \"--total-pull-time\" - it must be a positive integer\n";
    }
    if (error_flag.err_invalid_value_for_pity_ctrl_arg) {
      std::cerr << "\tInvalid value for \"-p\" - it must be a non-negative integer\n";
    }
    if (error_flag.err_invalid_value_for_pity_long_name_ctrl_arg) {
      std::cerr << "\tInvalid value for \"--pity\" - it must be a non-negative integer\n";
    }
    if (error_flag.err_invalid_value_for_num_rate_up_ctrl_arg) {
      std::cerr << "\tInvalid value for \"-n\" - it must be a 1 or 2\n";
    }
    if (error_flag.err_invalid_value_for_num_rate_up_long_name_ctrl_arg) {
      std::cerr << "\tInvalid value for \"--num-rate-up\" - it must be a 1 or 2\n";
    }
    if (error_flag.err_invalid_value_for_current_pull_ctrl_arg) {
      std::cerr << "\tInvalid value for \"-c\" - it must be an integer between [0, <-p|--pity value> + 49) (inclusive, exclusive)\n";
    }
    if (error_flag.err_invalid_value_for_current_pull_long_name_ctrl_arg) {
      std::cerr << "\tInvalid value for \"--current-pull\" - it must be an integer between [0, <-p|--pity value> + 49) (inclusive, exclusive)\n";
    }
    // Unexpected value
    if (error_flag.err_unexpected_value_for_ctrl_arg_standard) {
      std::cerr << "\tUnexpected value for \"--standard\"\n";
    }
    if (error_flag.err_unexpected_value_for_ctrl_arg_limited) {
      std::cerr << "\tUnexpected value for \"--limited\"\n";
    }
    std::cerr << "Please check and correct the error(s)\nYou can refer to help message, README, or visit the online repo:\n"
                 "https://github.com/zyLiu6707/Arknights-Gacha-Simulation\n" << std::endl;

    display_help_message();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6c30
testb $0x1, %al
jne 0x26ae
jmp 0x2aa8
movq 0x1493b(%rip), %rdi     # 0x16ff0
leaq 0xd0ef(%rip), %rsi      # 0xf7ab
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x19(%rax)
je 0x2709
movq 0x1491e(%rip), %rdi     # 0x16ff0
leaq 0xd122(%rip), %rsi      # 0xf7fb
callq 0x2210
movq 0x1490b(%rip), %rdi     # 0x16ff0
leaq 0xd13f(%rip), %rsi      # 0xf82b
callq 0x2210
movq 0x148f8(%rip), %rdi     # 0x16ff0
leaq 0xd170(%rip), %rsi      # 0xf86f
callq 0x2210
jmp 0x2aa8
movq -0x8(%rbp), %rax
testb $0x1, 0x1a(%rax)
je 0x27ad
movq 0x148d2(%rip), %rdi     # 0x16ff0
leaq 0xd185(%rip), %rsi      # 0xf8aa
callq 0x2210
movq -0x8(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6e20
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6e50
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x6e80
testb $0x1, %al
jne 0x2763
jmp 0x279a
leaq -0x18(%rbp), %rdi
callq 0x6ec0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
movq 0x14875(%rip), %rdi     # 0x16ff0
callq 0x21c0
movq %rax, %rdi
leaq 0xdb0c(%rip), %rsi      # 0x10296
callq 0x2210
leaq -0x18(%rbp), %rdi
callq 0x6ee0
jmp 0x2750
movq 0x1484f(%rip), %rdi     # 0x16ff0
movq 0x14818(%rip), %rsi     # 0x16fc0
callq 0x2240
movq -0x8(%rbp), %rax
testb $0x1, 0x18(%rax)
je 0x27ca
movq 0x14832(%rip), %rdi     # 0x16ff0
leaq 0xd102(%rip), %rsi      # 0xf8c7
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, (%rax)
je 0x27e6
movq 0x14816(%rip), %rdi     # 0x16ff0
leaq 0xd110(%rip), %rsi      # 0xf8f1
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x1(%rax)
je 0x2803
movq 0x147f9(%rip), %rdi     # 0x16ff0
leaq 0xd121(%rip), %rsi      # 0xf91f
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x6(%rax)
je 0x2820
movq 0x147dc(%rip), %rdi     # 0x16ff0
leaq 0xd157(%rip), %rsi      # 0xf972
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0xb(%rax)
je 0x283d
movq 0x147bf(%rip), %rdi     # 0x16ff0
leaq 0xd182(%rip), %rsi      # 0xf9ba
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x10(%rax)
je 0x285a
movq 0x147a2(%rip), %rdi     # 0x16ff0
leaq 0xd1b4(%rip), %rsi      # 0xfa09
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x15(%rax)
je 0x2877
movq 0x14785(%rip), %rdi     # 0x16ff0
leaq 0xd1e7(%rip), %rsi      # 0xfa59
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x4(%rax)
je 0x2894
movq 0x14768(%rip), %rdi     # 0x16ff0
leaq 0xd21c(%rip), %rsi      # 0xfaab
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x5(%rax)
je 0x28b1
movq 0x1474b(%rip), %rdi     # 0x16ff0
leaq 0xd218(%rip), %rsi      # 0xfac4
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x9(%rax)
je 0x28ce
movq 0x1472e(%rip), %rdi     # 0x16ff0
leaq 0xd223(%rip), %rsi      # 0xfaec
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0xa(%rax)
je 0x28eb
movq 0x14711(%rip), %rdi     # 0x16ff0
leaq 0xd21f(%rip), %rsi      # 0xfb05
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0xe(%rax)
je 0x2908
movq 0x146f4(%rip), %rdi     # 0x16ff0
leaq 0xd21f(%rip), %rsi      # 0xfb22
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0xf(%rax)
je 0x2925
movq 0x146d7(%rip), %rdi     # 0x16ff0
leaq 0xd21b(%rip), %rsi      # 0xfb3b
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x13(%rax)
je 0x2942
movq 0x146ba(%rip), %rdi     # 0x16ff0
leaq 0xd222(%rip), %rsi      # 0xfb5f
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x14(%rax)
je 0x295f
movq 0x1469d(%rip), %rdi     # 0x16ff0
leaq 0xd21e(%rip), %rsi      # 0xfb78
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x2(%rax)
je 0x297c
movq 0x14680(%rip), %rdi     # 0x16ff0
leaq 0xd226(%rip), %rsi      # 0xfb9d
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x3(%rax)
je 0x2999
movq 0x14663(%rip), %rdi     # 0x16ff0
leaq 0xd242(%rip), %rsi      # 0xfbd6
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x7(%rax)
je 0x29b6
movq 0x14646(%rip), %rdi     # 0x16ff0
leaq 0xd26d(%rip), %rsi      # 0xfc1e
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x8(%rax)
je 0x29d3
movq 0x14629(%rip), %rdi     # 0x16ff0
leaq 0xd28d(%rip), %rsi      # 0xfc5b
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0xc(%rax)
je 0x29f0
movq 0x1460c(%rip), %rdi     # 0x16ff0
leaq 0xd2b1(%rip), %rsi      # 0xfc9c
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0xd(%rax)
je 0x2a0d
movq 0x145ef(%rip), %rdi     # 0x16ff0
leaq 0xd2c3(%rip), %rsi      # 0xfccb
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x11(%rax)
je 0x2a2a
movq 0x145d2(%rip), %rdi     # 0x16ff0
leaq 0xd2e0(%rip), %rsi      # 0xfd05
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x12(%rax)
je 0x2a47
movq 0x145b5(%rip), %rdi     # 0x16ff0
leaq 0xd32f(%rip), %rsi      # 0xfd71
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x17(%rax)
je 0x2a64
movq 0x14598(%rip), %rdi     # 0x16ff0
leaq 0xd38a(%rip), %rsi      # 0xfde9
callq 0x2210
movq -0x8(%rbp), %rax
testb $0x1, 0x16(%rax)
je 0x2a81
movq 0x1457b(%rip), %rdi     # 0x16ff0
leaq 0xd391(%rip), %rsi      # 0xfe0d
callq 0x2210
movq 0x14568(%rip), %rdi     # 0x16ff0
leaq 0xd3a1(%rip), %rsi      # 0xfe30
callq 0x2210
movq %rax, %rdi
movq 0x14522(%rip), %rsi     # 0x16fc0
callq 0x2240
callq 0x2660
addq $0x30, %rsp
popq %rbp
retq
nop