#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*/ lprintf(int, char *, ...);
int /*<<< orphan*/ stderr;
void exit_usage(char *program, char *msg) {
  if (msg != NULL) {
    lprintf(1, "exit_usage: %s", msg);
    fprintf(stderr, "%s: %s\n", program, msg);
  }
  fprintf(stderr, "usage: %s [options] <fax-number> <page(s) in g3-format>\n",
          program);
  fprintf(stderr, "\tvalid options: -p, -v, -l <device(s)>, -x <debug>, -n, "
                  "-S, -r, -D <x>\n");
  lprintf(2, "failed: command line error");
  exit(1);
}


x86 assembly (clang, -O0):
<exit_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1181 <exit_usage+0x51>
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
lea    0xea5(%rip),%rsi
mov    $0x0,%al
call   1050 <lprintf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe95(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe82(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e3d(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x2,%edi
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1050 <lprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %rsi,%rsi
je     1172 <exit_usage+0x42>
mov    %rsi,%rbx
lea    0xeba(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <lprintf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
lea    0xeaa(%rip),%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x2e67(%rip),%rbx
mov    (%rbx),%edi
lea    0xe95(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xebb(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xef5(%rip),%rsi
mov    $0x2,%edi
xor    %eax,%eax
call   1050 <lprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"exit_usage: %s\00"
@stderr = global i32 0
@.str.1 = [8 x i8] c"%s: %s\0A\00"
@.str.2 = [57 x i8] c"usage: %s [options] <fax-number> <page(s) in g3-format>\0A\00"
@.str.3 = [72 x i8] c"\09valid options: -p, -v, -l <device(s)>, -x <debug>, -n, -S, -r, -D <x>\0A\00"
@.str.4 = [27 x i8] c"failed: command line error\00"
define void @exit_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 %14
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 (i32, i8*, ...) @lprintf(i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %3
%12 = load i8*, i8** %4
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %11, i8* %12)
br label %14
14: ; preds = %7, %2
%15 = load i32, i32* @stderr
%16 = load i8*, i8** %3
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0), i8* %16)
%18 = load i32, i32* @stderr
%19 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 (i32, i8*, ...) @lprintf(i32 2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%21 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [15 x i8] c"exit_usage: %s\00"
@stderr = global i32 0
@.str.1 = [8 x i8] c"%s: %s\0A\00"
@.str.2 = [57 x i8] c"usage: %s [options] <fax-number> <page(s) in g3-format>\0A\00"
@.str.3 = [72 x i8] c"\09valid options: -p, -v, -l <device(s)>, -x <debug>, -n, -S, -r, -D <x>\0A\00"
@.str.4 = [27 x i8] c"failed: command line error\00"
define void @exit_usage(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i32 (i32, i8*, ...) @lprintf(i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %1)
br label %8
8: ; preds = %4, %2
%9 = load i32, i32* @stderr
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%11 = load i32, i32* @stderr
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %11, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.3, i64 0, i64 0))
%13 = tail call i32 (i32, i8*, ...) @lprintf(i32 2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%14 = tail call i32 @exit(i32 1)
unreachable
}