#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_FAILURE;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ *stderr;
int /*<<< orphan*/ *stdout;
void usage(char **argv, int error) {
  FILE *where = error == EXIT_FAILURE ? stderr : stdout;
  fprintf(
      where,
      "Usage: %s [OPTION]... VR_MANGR.IFO [VR_MOVIE.VRO]\n"
      "Print info about and optionally extract vob data from DVD-VR files.\n"
      "\n"
      "If the VRO file is specified, the component programs are\n"
      "extracted to the current directory or to stdout.\n"
      "\n"
      "  -p, --program=NUM  Only process program NUM rather than all "
      "programs.\n"
      "\n"
      "  -n, --name=NAME    Specify a basename to use for extracted vob files\n"
      "                     rather than using one based on the timestamp.\n"
      "                     If you pass `-' the vob files will be written to "
      "stdout.\n"
      "                     If you pass `[label]' the names will be based on\n"
      "                     a sanitized version of the title or label.\n"
      "\n"
      "      --help         Display this help and exit.\n"
      "      --version      Output version information and exit.\n",
      argv[0]);
  exit(error);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e9f(%rip),%rcx
cmp    (%rcx),%eax
jne    1154 <usage+0x34>
mov    0x2e98(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
jmp    1162 <usage+0x42>
mov    0x2e75(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xe84(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %esi,%ebx
mov    0x2eae(%rip),%rax
cmp    %esi,(%rax)
jne    1137 <usage+0x17>
mov    0x2eab(%rip),%rax
jmp    113e <usage+0x1e>
mov    0x2e92(%rip),%rax
mov    (%rax),%rax
mov    (%rdi),%rdx
lea    0xeb5(%rip),%rsi
mov    %rax,%rdi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@stderr = global i32* null
@stdout = global i32* null
@.str = [758 x i8] c"Usage: %s [OPTION]... VR_MANGR.IFO [VR_MOVIE.VRO]\0APrint info about and optionally extract vob data from DVD-VR files.\0A\0AIf the VRO file is specified, the component programs are\0Aextracted to the current directory or to stdout.\0A\0A -p, --program=NUM Only process program NUM rather than all programs.\0A\0A -n, --name=NAME Specify a basename to use for extracted vob files\0A rather than using one based on the timestamp.\0A If you pass `-' the vob files will be written to stdout.\0A If you pass `[label]' the names will be based on\0A a sanitized version of the title or label.\0A\0A --help Display this help and exit.\0A --version Output version information and exit.\0A\00"
define void @usage(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32*
store i8** %0, i8*** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* @EXIT_FAILURE
%8 = icmp eq i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32*, i32** @stderr
br label %13
11: ; preds = %2
%12 = load i32*, i32** @stdout
br label %13
13: ; preds = %11, %9
%14 = phi i32* [ %10, %9 ], [ %12, %11 ]
store i32* %14, i32** %5
%15 = load i32*, i32** %5
%16 = load i8**, i8*** %3
%17 = getelementptr inbounds i8*, i8** %16, i64 0
%18 = load i8*, i8** %17
%19 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([758 x i8], [758 x i8]* @.str, i64 0, i64 0), i8* %18)
%20 = load i32, i32* %4
%21 = call i32 @exit(i32 %20)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@stderr = global i32* null
@stdout = global i32* null
@.str = [758 x i8] c"Usage: %s [OPTION]... VR_MANGR.IFO [VR_MOVIE.VRO]\0APrint info about and optionally extract vob data from DVD-VR files.\0A\0AIf the VRO file is specified, the component programs are\0Aextracted to the current directory or to stdout.\0A\0A -p, --program=NUM Only process program NUM rather than all programs.\0A\0A -n, --name=NAME Specify a basename to use for extracted vob files\0A rather than using one based on the timestamp.\0A If you pass `-' the vob files will be written to stdout.\0A If you pass `[label]' the names will be based on\0A a sanitized version of the title or label.\0A\0A --help Display this help and exit.\0A --version Output version information and exit.\0A\00"
define void @usage(i8** nocapture %0, i32 %1) {
%3 = load i32, i32* @EXIT_FAILURE
%4 = icmp eq i32 %3, %1
%5 = load i32*, i32** @stderr
%6 = load i32*, i32** @stdout
%7 = select i1 %4, i32* %5, i32* %6
%8 = load i8*, i8** %0
%9 = tail call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([758 x i8], [758 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = tail call i32 @exit(i32 %1)
unreachable
}