#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 *);
int /*<<< orphan*/ stdout;
void show_usage(int rc) {
  fprintf(
      stdout,
      ("\nchrt - manipulate real-time attributes of a process.\n"
       "\nSet policy:\n"
       "  chrt [options] <policy> <priority> {<pid> | <command> [<arg> ...]}\n"
       "\nGet policy:\n"
       "  chrt [options] {<pid> | <command> [<arg> ...]}\n\n"
       "\nScheduling policies:\n"
       "  -b | --batch         set policy to SCHED_BATCH\n"
       "  -f | --fifo          set policy to SCHED_FIFO\n"
       "  -i | --idle          set policy to SCHED_IDLE\n"
       "  -o | --other         set policy to SCHED_OTHER\n"
       "  -r | --rr            set policy to SCHED_RR (default)\n"
       "\nOptions:\n"
       "  -h | --help          display this help\n"
       "  -p | --pid           operate on existing given pid\n"
       "  -m | --max           show min and max valid priorities\n"
       "  -v | --verbose       display status information\n"
       "  -V | --version       output version information\n\n"));
  exit(rc);
}


x86 assembly (clang, -O0):
<show_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<show_usage>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [734 x i8] c"\0Achrt - manipulate real-time attributes of a process.\0A\0ASet policy:\0A chrt [options] <policy> <priority> {<pid> | <command> [<arg> ...]}\0A\0AGet policy:\0A chrt [options] {<pid> | <command> [<arg> ...]}\0A\0A\0AScheduling policies:\0A -b | --batch set policy to SCHED_BATCH\0A -f | --fifo set policy to SCHED_FIFO\0A -i | --idle set policy to SCHED_IDLE\0A -o | --other set policy to SCHED_OTHER\0A -r | --rr set policy to SCHED_RR (default)\0A\0AOptions:\0A -h | --help display this help\0A -p | --pid operate on existing given pid\0A -m | --max show min and max valid priorities\0A -v | --verbose display status information\0A -V | --version output version information\0A\0A\00"
define void @show_usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([734 x i8], [734 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [734 x i8] c"\0Achrt - manipulate real-time attributes of a process.\0A\0ASet policy:\0A chrt [options] <policy> <priority> {<pid> | <command> [<arg> ...]}\0A\0AGet policy:\0A chrt [options] {<pid> | <command> [<arg> ...]}\0A\0A\0AScheduling policies:\0A -b | --batch set policy to SCHED_BATCH\0A -f | --fifo set policy to SCHED_FIFO\0A -i | --idle set policy to SCHED_IDLE\0A -o | --other set policy to SCHED_OTHER\0A -r | --rr set policy to SCHED_RR (default)\0A\0AOptions:\0A -h | --help display this help\0A -p | --pid operate on existing given pid\0A -m | --max show min and max valid priorities\0A -v | --verbose display status information\0A -V | --version output version information\0A\0A\00"
define void @show_usage(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([734 x i8], [734 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 %0)
unreachable
}