#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
char *_program_name(char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, char const *, char const *,
                           char const *, char const *, char const *);
int /*<<< orphan*/ stdout;
void _show_usage(int argc, const char **argv) {
  const char *prog_name = _program_name(argc >= 2 ? argv[0] : NULL);
  fprintf(
      stdout,
      ("Usage: %s [options]\n"
       "Actions:\n"
       "  -k, --key\n"
       "           Generate a new key. You can pass\n"
       "           -c along and set length or alphabet\n"
       "  -r, --remove\n"
       "           Remove key, and disable OTP.\n"
       "\n"
       "  -s, --skip <which>\n"
       "           Skip to a card specified as an argument.\n"
       "  -t, --text <which>\n"
       "           Generate either one ascii passcard\n"
       "           or a single passcode depending on argument. \n"
       "  -l, --latex <which>\n"
       "           Generate a LaTeX output with 6 passcards\n"
       "           starting with the specified one\n"
       "  -a, --authenticate <passcode>\n"
       "           Try to authenticate with given passcode\n"
       "  -w, --warning\n"
       "           Display warnings (ex. user on last passcard)\n"
       "  -P, --prompt <which>\n"
       "           Display authentication prompt for given passcode\n"
       "\n"
       "Where <which> might be one of:\n"
       "  number         - a decimal number of a passcode\n"
       "  [number]       - a passcard number\n"
       "\n"
       "  CRR[number] or RRC[number] \n"
       "                 - a passcode in passcard of a given number.\n"
       "                   C is column (A through G), RR - row (1..10)\n"
       "  current        - passcode used for next time authentication\n"
       "  [current]      - passcard containing current passcode\n"
       "  next or [next] - first, not yet printed, passcard\n"
       "\n"
       "Configuration:\n"
       "  -i, --info\n"
       "           Print current configuration and state.\n"
       "      --info-key\n"
       "           Print key and counter used for generating passcodes.\n"
       "           Warning: This will print private data.\n"
       "  -c, --config <arg>\n"
       "           Can be passed multiple times. Manages various settings:\n"
       "           show=<on|off> configure visibility of passcode during\n"
       "                         authentication.\n"
       "           alphabet=<ID|list>\n"
       "                         select passcode alphabet. Use 'list' "
       "argument\n"
       "                         to get IDs of available alphabets.\n"
       "           codelength=<length>\n"
       "                         select passcode length.\n"
       "\n"
       "           contact=X     Set contact info (e.g. phone number) with\n"
       "                         which to receive a passcode during "
       "authentication.\n"
       "                         Details depends configuration. Use \"\" to "
       "disable.\n"
       "           label=X       Set a caption to use on generated passcards.\n"
       "                         Use \"\" to set default (hostname)\n"
       "\n"
       "           salt=<on|off>\n"
       "                         Meaningful only during key generation.\n"
       "                         Enable/disable salting of a passcode "
       "counter.\n"
       "                         Disabling this option will make program\n"
       "                         compatible with PPPv3.1 and will increase\n"
       "                         available passcard number at the cost of\n"
       "                         (theoretically) less security.\n"
       "\n"
       "           disable=<on|off>\n"
       "                         Disable user without removing his data.\n"
       "\n"
       "  -p, --password\n"
       "           Set static password. (optionally: --password=<pass>)\n"
       "  -u, --user <username|UID>\n"
       "           Operate on state of specified user. Administrator-only "
       "option.\n"
       "  -v, --verbose\n"
       "           Display more information about what is happening.\n"
       "           Try double -v -v for even more information.\n"
       "  --version\n"
       "           Display license, warranty, version and author information.\n"
       "  -h, --help\n"
       "           Display this message\n"
       "  OBSOLETE:\n"
       "  --check  Run all testcases. (Moved to agent_otp executable)\n"
       "\n"
       "Notes:\n"
       "  Both --text and --latex can get \"next\" as a parameter which\n"
       "  will print the first not-yet printed passcard. Usage of this "
       "argument\n"
       "  is recommended as it enables OTPasswd to display warnings when user\n"
       "  reaches his last printed passcard.\n"
       "\nExamples:\n"
       "%s --config salt=off --key   generate new (not salted) key\n"
       "%s --text next               print first not-yet-printed passcard\n"
       "%s --text '[3]'              print third passcard to standard output\n"
       "%s --text current            print current passcode\n"
       "%s --config codelength=5     use 5-character long passcodes\n"
       "Generate a 6 passcards on A4 page using LaTeX:\n"
       "%s --latex next > tmp.latex\n"
       "pdflatex tmp.latex\n"),
      prog_name, prog_name, prog_name, prog_name, prog_name, prog_name,
      prog_name);
}


x86 assembly (clang, -O0):
<_show_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
jl     1149 <_show_usage+0x29>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
jmp    1154 <_show_usage+0x34>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    1154 <_show_usage+0x34>
mov    -0x20(%rbp),%rdi
call   1040 <_program_name@plt>
mov    %rax,-0x18(%rbp)
mov    0x3e78(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x18(%rbp),%r9
mov    -0x18(%rbp),%r11
mov    -0x18(%rbp),%r10
mov    -0x18(%rbp),%rax
lea    0xe73(%rip),%rsi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <fprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_show_usage>:
push   %rax
cmp    $0x2,%edi
jl     112b <_show_usage+0xb>
mov    (%rsi),%rdi
jmp    112d <_show_usage+0xd>
xor    %edi,%edi
call   1040 <_program_name@plt>
mov    0x3ea7(%rip),%rcx
mov    (%rcx),%edi
sub    $0x8,%rsp
lea    0xeba(%rip),%rsi
mov    %rax,%rdx
mov    %rax,%rcx
mov    %rax,%r8
mov    %rax,%r9
push   %rax
push   %rax
push   %rax
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rax
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [3862 x i8] c"Usage: %s [options]\0AActions:\0A -k, --key\0A Generate a new key. You can pass\0A -c along and set length or alphabet\0A -r, --remove\0A Remove key, and disable OTP.\0A\0A -s, --skip <which>\0A Skip to a card specified as an argument.\0A -t, --text <which>\0A Generate either one ascii passcard\0A or a single passcode depending on argument. \0A -l, --latex <which>\0A Generate a LaTeX output with 6 passcards\0A starting with the specified one\0A -a, --authenticate <passcode>\0A Try to authenticate with given passcode\0A -w, --warning\0A Display warnings (ex. user on last passcard)\0A -P, --prompt <which>\0A Display authentication prompt for given passcode\0A\0AWhere <which> might be one of:\0A number - a decimal number of a passcode\0A [number] - a passcard number\0A\0A CRR[number] or RRC[number] \0A - a passcode in passcard of a given number.\0A C is column (A through G), RR - row (1..10)\0A current - passcode used for next time authentication\0A [current] - passcard containing current passcode\0A next or [next] - first, not yet printed, passcard\0A\0AConfiguration:\0A -i, --info\0A Print current configuration and state.\0A --info-key\0A Print key and counter used for generating passcodes.\0A Warning: This will print private data.\0A -c, --config <arg>\0A Can be passed multiple times. Manages various settings:\0A show=<on|off> configure visibility of passcode during\0A authentication.\0A alphabet=<ID|list>\0A select passcode alphabet. Use 'list' argument\0A to get IDs of available alphabets.\0A codelength=<length>\0A select passcode length.\0A\0A contact=X Set contact info (e.g. phone number) with\0A which to receive a passcode during authentication.\0A Details depends configuration. Use \22\22 to disable.\0A label=X Set a caption to use on generated passcards.\0A Use \22\22 to set default (hostname)\0A\0A salt=<on|off>\0A Meaningful only during key generation.\0A Enable/disable salting of a passcode counter.\0A Disabling this option will make program\0A compatible with PPPv3.1 and will increase\0A available passcard number at the cost of\0A (theoretically) less security.\0A\0A disable=<on|off>\0A Disable user without removing his data.\0A\0A -p, --password\0A Set static password. (optionally: --password=<pass>)\0A -u, --user <username|UID>\0A Operate on state of specified user. Administrator-only option.\0A -v, --verbose\0A Display more information about what is happening.\0A Try double -v -v for even more information.\0A --version\0A Display license, warranty, version and author information.\0A -h, --help\0A Display this message\0A OBSOLETE:\0A --check Run all testcases. (Moved to agent_otp executable)\0A\0ANotes:\0A Both --text and --latex can get \22next\22 as a parameter which\0A will print the first not-yet printed passcard. Usage of this argument\0A is recommended as it enables OTPasswd to display warnings when user\0A reaches his last printed passcard.\0A\0AExamples:\0A%s --config salt=off --key generate new (not salted) key\0A%s --text next print first not-yet-printed passcard\0A%s --text '[3]' print third passcard to standard output\0A%s --text current print current passcode\0A%s --config codelength=5 use 5-character long passcodes\0AGenerate a 6 passcards on A4 page using LaTeX:\0A%s --latex next > tmp.latex\0Apdflatex tmp.latex\0A\00"
define void @_show_usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* %3
%7 = icmp sge i32 %6, 2
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
br label %13
12: ; preds = %2
br label %13
13: ; preds = %12, %8
%14 = phi i8* [ %11, %8 ], [ null, %12 ]
%15 = call i8* @_program_name(i8* %14)
store i8* %15, i8** %5
%16 = load i32, i32* @stdout
%17 = load i8*, i8** %5
%18 = load i8*, i8** %5
%19 = load i8*, i8** %5
%20 = load i8*, i8** %5
%21 = load i8*, i8** %5
%22 = load i8*, i8** %5
%23 = load i8*, i8** %5
%24 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([3862 x i8], [3862 x i8]* @.str, i64 0, i64 0), i8* %17, i8* %18, i8* %19, i8* %20, i8* %21, i8* %22, i8* %23)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [3862 x i8] c"Usage: %s [options]\0AActions:\0A -k, --key\0A Generate a new key. You can pass\0A -c along and set length or alphabet\0A -r, --remove\0A Remove key, and disable OTP.\0A\0A -s, --skip <which>\0A Skip to a card specified as an argument.\0A -t, --text <which>\0A Generate either one ascii passcard\0A or a single passcode depending on argument. \0A -l, --latex <which>\0A Generate a LaTeX output with 6 passcards\0A starting with the specified one\0A -a, --authenticate <passcode>\0A Try to authenticate with given passcode\0A -w, --warning\0A Display warnings (ex. user on last passcard)\0A -P, --prompt <which>\0A Display authentication prompt for given passcode\0A\0AWhere <which> might be one of:\0A number - a decimal number of a passcode\0A [number] - a passcard number\0A\0A CRR[number] or RRC[number] \0A - a passcode in passcard of a given number.\0A C is column (A through G), RR - row (1..10)\0A current - passcode used for next time authentication\0A [current] - passcard containing current passcode\0A next or [next] - first, not yet printed, passcard\0A\0AConfiguration:\0A -i, --info\0A Print current configuration and state.\0A --info-key\0A Print key and counter used for generating passcodes.\0A Warning: This will print private data.\0A -c, --config <arg>\0A Can be passed multiple times. Manages various settings:\0A show=<on|off> configure visibility of passcode during\0A authentication.\0A alphabet=<ID|list>\0A select passcode alphabet. Use 'list' argument\0A to get IDs of available alphabets.\0A codelength=<length>\0A select passcode length.\0A\0A contact=X Set contact info (e.g. phone number) with\0A which to receive a passcode during authentication.\0A Details depends configuration. Use \22\22 to disable.\0A label=X Set a caption to use on generated passcards.\0A Use \22\22 to set default (hostname)\0A\0A salt=<on|off>\0A Meaningful only during key generation.\0A Enable/disable salting of a passcode counter.\0A Disabling this option will make program\0A compatible with PPPv3.1 and will increase\0A available passcard number at the cost of\0A (theoretically) less security.\0A\0A disable=<on|off>\0A Disable user without removing his data.\0A\0A -p, --password\0A Set static password. (optionally: --password=<pass>)\0A -u, --user <username|UID>\0A Operate on state of specified user. Administrator-only option.\0A -v, --verbose\0A Display more information about what is happening.\0A Try double -v -v for even more information.\0A --version\0A Display license, warranty, version and author information.\0A -h, --help\0A Display this message\0A OBSOLETE:\0A --check Run all testcases. (Moved to agent_otp executable)\0A\0ANotes:\0A Both --text and --latex can get \22next\22 as a parameter which\0A will print the first not-yet printed passcard. Usage of this argument\0A is recommended as it enables OTPasswd to display warnings when user\0A reaches his last printed passcard.\0A\0AExamples:\0A%s --config salt=off --key generate new (not salted) key\0A%s --text next print first not-yet-printed passcard\0A%s --text '[3]' print third passcard to standard output\0A%s --text current print current passcode\0A%s --config codelength=5 use 5-character long passcodes\0AGenerate a 6 passcards on A4 page using LaTeX:\0A%s --latex next > tmp.latex\0Apdflatex tmp.latex\0A\00"
define void @_show_usage(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = load i8*, i8** %1
br label %6
6: ; preds = %2, %4
%7 = phi i8* [ %5, %4 ], [ null, %2 ]
%8 = tail call i8* @_program_name(i8* %7)
%9 = load i32, i32* @stdout
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([3862 x i8], [3862 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %8, i8* %8, i8* %8, i8* %8, i8* %8, i8* %8)
ret void
}