#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_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
void usage(char *prog_name, char *msg) {
  if (msg != NULL)
    fputs(msg, stderr);
  printf("Usage: %s [options]\n", prog_name);
  printf("Options are:\n");
  printf("\t%s", "-a<policy><prio> Set scheduling policy and priority in\n");
  ;
  printf("\t%s", "                 thread attributes object\n");
  ;
  printf("\t%s", "                 <policy> can be\n");
  ;
  printf("\t%s", "                     f  SCHED_FIFO\n");
  ;
  printf("\t%s", "                     r  SCHED_RR\n");
  ;
  printf("\t%s", "                     o  SCHED_OTHER\n");
  ;
  printf("\t%s", "-A               Use default thread attributes object\n");
  ;
  printf("\t%s", "-i {e|s}         Set inherit scheduler attribute to\n");
  ;
  printf("\t%s", "                 'explicit' or 'inherit'\n");
  ;
  printf("\t%s", "-m<policy><prio> Set scheduling policy and priority on\n");
  ;
  printf("\t%s", "                 main thread before pthread_create() call\n");
  ;
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115d <usage+0x2d>
mov    -0x10(%rbp),%rdi
mov    0x2e8a(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    -0x8(%rbp),%rsi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9f(%rip),%rdi
lea    0xe9c(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8a(%rip),%rdi
lea    0xebf(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe75(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe60(%rip),%rdi
lea    0xee2(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe4b(%rip),%rdi
lea    0xef1(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe36(%rip),%rdi
lea    0xefe(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe21(%rip),%rdi
lea    0xf0e(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe0c(%rip),%rdi
lea    0xf30(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdf7(%rip),%rdi
lea    0xf50(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xde2(%rip),%rdi
lea    0xf65(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdcd(%rip),%rdi
lea    0xf88(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d6d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
test   %rsi,%rsi
je     115c <usage+0x1c>
mov    0x2e90(%rip),%rax
mov    (%rax),%eax
mov    %rsi,%rdi
mov    %eax,%esi
call   1050 <fputs@plt>
lea    0xe9d(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x109e(%rip),%rdi
call   1030 <puts@plt>
lea    0xe95(%rip),%rbx
lea    0xe92(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb9(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee4(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef7(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf08(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf1c(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf42(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf66(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf7f(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfa6(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d96(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.1 = [14 x i8] c"Options are:\0A\00"
@.str.2 = [4 x i8] c"\09%s\00"
@.str.3 = [56 x i8] c"-a<policy><prio> Set scheduling policy and priority in\0A\00"
@.str.4 = [43 x i8] c" thread attributes object\0A\00"
@.str.5 = [34 x i8] c" <policy> can be\0A\00"
@.str.6 = [36 x i8] c" f SCHED_FIFO\0A\00"
@.str.7 = [34 x i8] c" r SCHED_RR\0A\00"
@.str.8 = [37 x i8] c" o SCHED_OTHER\0A\00"
@.str.9 = [55 x i8] c"-A Use default thread attributes object\0A\00"
@.str.10 = [53 x i8] c"-i {e|s} Set inherit scheduler attribute to\0A\00"
@.str.11 = [42 x i8] c" 'explicit' or 'inherit'\0A\00"
@.str.12 = [56 x i8] c"-m<policy><prio> Set scheduling policy and priority on\0A\00"
@.str.13 = [59 x i8] c" main thread before pthread_create() call\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = load i32, i32* @stderr
%10 = call i32 @fputs(i8* %8, i32 %9)
br label %11
11: ; preds = %7, %2
%12 = load i8*, i8** %3
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.9, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.10, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.11, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.12, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.13, i64 0, i64 0))
%26 = load i32, i32* @EXIT_FAILURE
%27 = call i32 @exit(i32 %26)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"Usage: %s [options]\0A\00"
@.str.2 = [4 x i8] c"\09%s\00"
@.str.3 = [56 x i8] c"-a<policy><prio> Set scheduling policy and priority in\0A\00"
@.str.4 = [43 x i8] c" thread attributes object\0A\00"
@.str.5 = [34 x i8] c" <policy> can be\0A\00"
@.str.6 = [36 x i8] c" f SCHED_FIFO\0A\00"
@.str.7 = [34 x i8] c" r SCHED_RR\0A\00"
@.str.8 = [37 x i8] c" o SCHED_OTHER\0A\00"
@.str.9 = [55 x i8] c"-A Use default thread attributes object\0A\00"
@.str.10 = [53 x i8] c"-i {e|s} Set inherit scheduler attribute to\0A\00"
@.str.11 = [42 x i8] c" 'explicit' or 'inherit'\0A\00"
@.str.12 = [56 x i8] c"-m<policy><prio> Set scheduling policy and priority on\0A\00"
@.str.13 = [59 x i8] c" main thread before pthread_create() call\0A\00"
@EXIT_FAILURE = global i32 0
@str = [13 x i8] c"Options are:\00"
define void @usage(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fputs(i8* %1, i32 %5)
br label %7
7: ; preds = %4, %2
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0))
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0))
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0))
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.9, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.10, i64 0, i64 0))
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.11, i64 0, i64 0))
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.12, i64 0, i64 0))
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.13, i64 0, i64 0))
%21 = load i32, i32* @EXIT_FAILURE
%22 = tail call i32 @exit(i32 %21)
unreachable
}