#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*/ stderr;
void usage(const char *str) {
  if (str)
    fprintf(stderr, "*** ERROR: %s\n\n", str);
  fprintf(
      stderr,
      "Usage: commercial [-i <i>] [-o <o>] [-s 
] [-e <e>] [-r] [filename]\n"
      "       -i -- input filename\n"
      "       -o -- output filename\n"
      "       -s -- start time, in seconds\n"
      "       -e -- end time, in seconds\n"
      "       -r -- remove rather than add\n"
      "\n"
      "If no files are given, reads from stdin and writes to stdout\n"
      "If [filename] is given, it's used for both input and output\n"
      "If -r is given with no start or end time, all commercial breaks are "
      "removed\n"
      "If -r is not given, start and end time must be given\n");
  exit(str ? 1 : 0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1152 <usage+0x32>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeb5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rcx
xor    %edi,%edi
mov    $0x1,%eax
cmp    $0x0,%rcx
cmovne %eax,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
test   %rdi,%rdi
je     1145 <usage+0x25>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %ebp,%ebp
test   %rbx,%rbx
setne  %bpl
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xeb2(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    %ebp,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"*** ERROR: %s\0A\0A\00"
@.str.1 = [485 x i8] c"Usage: commercial [-i <i>] [-o <o>] [-s 
] [-e <e>] [-r] [filename]\0A -i -- input filename\0A -o -- output filename\0A -s -- start time, in seconds\0A -e -- end time, in seconds\0A -r -- remove rather than add\0A\0AIf no files are given, reads from stdin and writes to stdout\0AIf [filename] is given, it's used for both input and output\0AIf -r is given with no start or end time, all commercial breaks are removed\0AIf -r is not given, start and end time must be given\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %2
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %5, %1
%10 = load i32, i32* @stderr
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([485 x i8], [485 x i8]* @.str.1, i64 0, i64 0))
%12 = load i8*, i8** %2
%13 = icmp ne i8* %12, null
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 1, i32 0
%16 = call i32 @exit(i32 %15)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"*** ERROR: %s\0A\0A\00"
@.str.1 = [485 x i8] c"Usage: commercial [-i <i>] [-o <o>] [-s 
] [-e <e>] [-r] [filename]\0A -i -- input filename\0A -o -- output filename\0A -s -- start time, in seconds\0A -e -- end time, in seconds\0A -r -- remove rather than add\0A\0AIf no files are given, reads from stdin and writes to stdout\0AIf [filename] is given, it's used for both input and output\0AIf -r is given with no start or end time, all commercial breaks are removed\0AIf -r is not given, start and end time must be given\0A\00"
define void @usage(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %3, %1
%7 = load i32, i32* @stderr
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([485 x i8], [485 x i8]* @.str.1, i64 0, i64 0))
%9 = xor i1 %2, true
%10 = zext i1 %9 to i32
%11 = tail call i32 @exit(i32 %10)
unreachable
}