#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(int status) {
  fprintf(
      stderr,
      "Reads from or writes to an OSP ramdisk device.\nUsage: ./osprdaccess -w "
      "[SIZE] [OPTIONS] [DEVICE...] < DATA\n   or: ./osprdaccess -w [SIZE] -z "
      "[DEVICE...]        (writes zeros)\n   or: ./osprdaccess -r [SIZE] "
      "[OPTIONS] [DEVICE...] > DATA\n   SIZE is the number of bytes to "
      "read/write.  Default is whole file.\n   Options are:\n   -o OFF\n       "
      "Seek forward into the file to offset OFF before reading/writing.\n   -l "
      "[DELAY]\n       Lock the ramdisk after opening it.  DELAY, if given, is "
      "the number of\n       seconds to wait after opening but before "
      "acquiring the lock.\n   -L [DELAY]\n       Attempt to lock the ramdisk "
      "without blocking.  This is like -l, but if\n       -l would block, -L "
      "will return a \"resource busy\" error instead.\n   -d DELAY\n       "
      "Wait DELAY seconds before reading/writing (but after locking).\n   "
      "DEVICE is the device to read/write.  The default is /dev/osprda.\n   "
      "You can also give more than one device name.  All devices are opened, "
      "but\n   only the last device is read or written.\n");
  exit(status);
}


x86 assembly (clang, -O0):
<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):
<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):
@stderr = global i32 0
@.str = [997 x i8] c"Reads from or writes to an OSP ramdisk device.\0AUsage: ./osprdaccess -w [SIZE] [OPTIONS] [DEVICE...] < DATA\0A or: ./osprdaccess -w [SIZE] -z [DEVICE...] (writes zeros)\0A or: ./osprdaccess -r [SIZE] [OPTIONS] [DEVICE...] > DATA\0A SIZE is the number of bytes to read/write. Default is whole file.\0A Options are:\0A -o OFF\0A Seek forward into the file to offset OFF before reading/writing.\0A -l [DELAY]\0A Lock the ramdisk after opening it. DELAY, if given, is the number of\0A seconds to wait after opening but before acquiring the lock.\0A -L [DELAY]\0A Attempt to lock the ramdisk without blocking. This is like -l, but if\0A -l would block, -L will return a \22resource busy\22 error instead.\0A -d DELAY\0A Wait DELAY seconds before reading/writing (but after locking).\0A DEVICE is the device to read/write. The default is /dev/osprda.\0A You can also give more than one device name. All devices are opened, but\0A only the last device is read or written.\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([997 x i8], [997 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [997 x i8] c"Reads from or writes to an OSP ramdisk device.\0AUsage: ./osprdaccess -w [SIZE] [OPTIONS] [DEVICE...] < DATA\0A or: ./osprdaccess -w [SIZE] -z [DEVICE...] (writes zeros)\0A or: ./osprdaccess -r [SIZE] [OPTIONS] [DEVICE...] > DATA\0A SIZE is the number of bytes to read/write. Default is whole file.\0A Options are:\0A -o OFF\0A Seek forward into the file to offset OFF before reading/writing.\0A -l [DELAY]\0A Lock the ramdisk after opening it. DELAY, if given, is the number of\0A seconds to wait after opening but before acquiring the lock.\0A -L [DELAY]\0A Attempt to lock the ramdisk without blocking. This is like -l, but if\0A -l would block, -L will return a \22resource busy\22 error instead.\0A -d DELAY\0A Wait DELAY seconds before reading/writing (but after locking).\0A DEVICE is the device to read/write. The default is /dev/osprda.\0A You can also give more than one device name. All devices are opened, but\0A only the last device is read or written.\0A\00"
define void @usage(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([997 x i8], [997 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 %0)
unreachable
}