#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 */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, char const *, char const *);
int /*<<< orphan*/ stderr;
void usage_exit(const char *argv0, const char *argvn, const char *reason) {
  fprintf(
      stderr,
      "%s: %s: %s\n"
      "Usage: %s [ Options ] service ...\n"
      "Supported services         : ttx | vps | wss | cc | raw\n"
      "Supported options:\n"
      "       -dev <path>         : device path\n"
      "       -api <type>         : v4l API: proxy|v4l2|v4l\n"
      "       -strict <level>     : service strictness level: 0..2\n"
      "       -channel <index>    : switch video input channel\n"
      "       -freq <kHz * 16>    : switch TV tuner frequency\n"
      "       -chnprio <1..3>     : channel switch priority\n"
      "       -subprio <0..4>     : background scheduling priority\n"
      "       -debug <level>      : enable debug output: 1=warnings, 2=all\n"
      "       -help               : this message\n"
      "You can also type service requests to stdin at runtime:\n"
      "Format: [\"+\"|\"-\"|\"=\"]<service>, e.g. \"+vps -ttx\" or \"=wss\"\n",
      argv0, reason, argvn, argv0);
  exit(1);
}


x86 assembly (clang, -O0):
<usage_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x8(%rbp),%r9
lea    0xeac(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage_exit>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%r8
mov    %rdi,%rdx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
mov    %rdx,%r9
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [724 x i8] c"%s: %s: %s\0AUsage: %s [ Options ] service ...\0ASupported services : ttx | vps | wss | cc | raw\0ASupported options:\0A -dev <path> : device path\0A -api <type> : v4l API: proxy|v4l2|v4l\0A -strict <level> : service strictness level: 0..2\0A -channel <index> : switch video input channel\0A -freq <kHz * 16> : switch TV tuner frequency\0A -chnprio <1..3> : channel switch priority\0A -subprio <0..4> : background scheduling priority\0A -debug <level> : enable debug output: 1=warnings, 2=all\0A -help : this message\0AYou can also type service requests to stdin at runtime:\0AFormat: [\22+\22|\22-\22|\22=\22]<service>, e.g. \22+vps -ttx\22 or \22=wss\22\0A\00"
define void @usage_exit(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %4
%9 = load i8*, i8** %6
%10 = load i8*, i8** %5
%11 = load i8*, i8** %4
%12 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([724 x i8], [724 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i8* %10, i8* %11)
%13 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [724 x i8] c"%s: %s: %s\0AUsage: %s [ Options ] service ...\0ASupported services : ttx | vps | wss | cc | raw\0ASupported options:\0A -dev <path> : device path\0A -api <type> : v4l API: proxy|v4l2|v4l\0A -strict <level> : service strictness level: 0..2\0A -channel <index> : switch video input channel\0A -freq <kHz * 16> : switch TV tuner frequency\0A -chnprio <1..3> : channel switch priority\0A -subprio <0..4> : background scheduling priority\0A -debug <level> : enable debug output: 1=warnings, 2=all\0A -help : this message\0AYou can also type service requests to stdin at runtime:\0AFormat: [\22+\22|\22-\22|\22=\22]<service>, e.g. \22+vps -ttx\22 or \22=wss\22\0A\00"
define void @usage_exit(i8* %0, i8* %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([724 x i8], [724 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %2, i8* %1, i8* %0)
%6 = tail call i32 @exit(i32 1)
unreachable
}