#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int usage(const char *reason) {
  fprintf(stderr,
          "Usage: knownfile [-h] [--check] [--size SIZE] [--offset OFFSET] "
          "[--quiet] filename\n"
          "\n"
          "Create a file of specified length / Check extract\n"
          "\n"
          "positional arguments:\n"
          "filename                    file to use\n"
          "\n"
          "optional arguments:\n"
          "-h, --help                  show this help message and exit\n"
          "--check, -c                 check mode\n"
          "--size SIZE, -s SIZE        size of the file\n"
          "--offset OFFSET, -o OFFSET  offset of the file\n"
          "--quiet, -q                 quiet mode\n");
  if (reason) {
    fprintf(stderr, "ERR: %s\n", reason);
  }
  return 1;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
cmpq   $0x0,-0x8(%rbp)
je     1159 <usage+0x49>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0x106f(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ec2(%rip),%r14
mov    (%r14),%edi
lea    0xed8(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
test   %rbx,%rbx
je     1148 <usage+0x38>
mov    (%r14),%edi
lea    0x1083(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [449 x i8] c"Usage: knownfile [-h] [--check] [--size SIZE] [--offset OFFSET] [--quiet] filename\0A\0ACreate a file of specified length / Check extract\0A\0Apositional arguments:\0Afilename file to use\0A\0Aoptional arguments:\0A-h, --help show this help message and exit\0A--check, -c check mode\0A--size SIZE, -s SIZE size of the file\0A--offset OFFSET, -o OFFSET offset of the file\0A--quiet, -q quiet mode\0A\00"
@.str.1 = [9 x i8] c"ERR: %s\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([449 x i8], [449 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = load i8*, i8** %2
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %7, %1
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [449 x i8] c"Usage: knownfile [-h] [--check] [--size SIZE] [--offset OFFSET] [--quiet] filename\0A\0ACreate a file of specified length / Check extract\0A\0Apositional arguments:\0Afilename file to use\0A\0Aoptional arguments:\0A-h, --help show this help message and exit\0A--check, -c check mode\0A--size SIZE, -s SIZE size of the file\0A--offset OFFSET, -o OFFSET offset of the file\0A--quiet, -q quiet mode\0A\00"
@.str.1 = [9 x i8] c"ERR: %s\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([449 x i8], [449 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i8* %0, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %5, %1
ret i32 1
}