#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 *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *prog) {
  fprintf(stderr,
          "Usage:\n"
          "\t%s [-t <timestamp>] <cpio_list>\n"
          "\n"
          "<cpio_list> is a file containing newline separated entries that\n"
          "describe the files to be included in the initramfs archive:\n"
          "\n"
          "# a comment\n"
          "file <name> <location> <mode> <uid> <gid> [<hard links>]\n"
          "dir <name> <mode> <uid> <gid>\n"
          "nod <name> <mode> <uid> <gid> <dev_type> <maj> <min>\n"
          "slink <name> <target> <mode> <uid> <gid>\n"
          "pipe <name> <mode> <uid> <gid>\n"
          "sock <name> <mode> <uid> <gid>\n"
          "\n"
          "<name>       name of the file/dir/nod/etc in the archive\n"
          "<location>   location of the file in the current filesystem\n"
          "             expands shell variables quoted with ${}\n"
          "<target>     link target\n"
          "<mode>       mode/permissions of the file\n"
          "<uid>        user id (0=root)\n"
          "<gid>        group id (0=root)\n"
          "<dev_type>   device type (b=block, c=character)\n"
          "<maj>        major number of nod\n"
          "<min>        minor number of nod\n"
          "<hard links> space separated list of other links to file\n"
          "\n"
          "example:\n"
          "# A simple initramfs\n"
          "dir /dev 0755 0 0\n"
          "nod /dev/console 0600 0 0 c 5 1\n"
          "dir /root 0700 0 0\n"
          "dir /sbin 0755 0 0\n"
          "file /sbin/kinit /usr/src/klibc/kinit/kinit 0755 0 0\n"
          "\n"
          "<timestamp> is time in seconds since Epoch that will be used\n"
          "as mtime for symlinks, special files and directories. The default\n"
          "is to use the current time for these entries.\n",
          prog);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [1238 x i8] c"Usage:\0A\09%s [-t <timestamp>] <cpio_list>\0A\0A<cpio_list> is a file containing newline separated entries that\0Adescribe the files to be included in the initramfs archive:\0A\0A# a comment\0Afile <name> <location> <mode> <uid> <gid> [<hard links>]\0Adir <name> <mode> <uid> <gid>\0Anod <name> <mode> <uid> <gid> <dev_type> <maj> <min>\0Aslink <name> <target> <mode> <uid> <gid>\0Apipe <name> <mode> <uid> <gid>\0Asock <name> <mode> <uid> <gid>\0A\0A<name> name of the file/dir/nod/etc in the archive\0A<location> location of the file in the current filesystem\0A expands shell variables quoted with ${}\0A<target> link target\0A<mode> mode/permissions of the file\0A<uid> user id (0=root)\0A<gid> group id (0=root)\0A<dev_type> device type (b=block, c=character)\0A<maj> major number of nod\0A<min> minor number of nod\0A<hard links> space separated list of other links to file\0A\0Aexample:\0A# A simple initramfs\0Adir /dev 0755 0 0\0Anod /dev/console 0600 0 0 c 5 1\0Adir /root 0700 0 0\0Adir /sbin 0755 0 0\0Afile /sbin/kinit /usr/src/klibc/kinit/kinit 0755 0 0\0A\0A<timestamp> is time in seconds since Epoch that will be used\0Aas mtime for symlinks, special files and directories. The default\0Ais to use the current time for these entries.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([1238 x i8], [1238 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [1238 x i8] c"Usage:\0A\09%s [-t <timestamp>] <cpio_list>\0A\0A<cpio_list> is a file containing newline separated entries that\0Adescribe the files to be included in the initramfs archive:\0A\0A# a comment\0Afile <name> <location> <mode> <uid> <gid> [<hard links>]\0Adir <name> <mode> <uid> <gid>\0Anod <name> <mode> <uid> <gid> <dev_type> <maj> <min>\0Aslink <name> <target> <mode> <uid> <gid>\0Apipe <name> <mode> <uid> <gid>\0Asock <name> <mode> <uid> <gid>\0A\0A<name> name of the file/dir/nod/etc in the archive\0A<location> location of the file in the current filesystem\0A expands shell variables quoted with ${}\0A<target> link target\0A<mode> mode/permissions of the file\0A<uid> user id (0=root)\0A<gid> group id (0=root)\0A<dev_type> device type (b=block, c=character)\0A<maj> major number of nod\0A<min> minor number of nod\0A<hard links> space separated list of other links to file\0A\0Aexample:\0A# A simple initramfs\0Adir /dev 0755 0 0\0Anod /dev/console 0600 0 0 c 5 1\0Adir /root 0700 0 0\0Adir /sbin 0755 0 0\0Afile /sbin/kinit /usr/src/klibc/kinit/kinit 0755 0 0\0A\0A<timestamp> is time in seconds since Epoch that will be used\0Aas mtime for symlinks, special files and directories. The default\0Ais to use the current time for these entries.\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([1238 x i8], [1238 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}