#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*/ printf(char *, char *);
void usage(char *name) {
  printf(
      "Usage: %s [OPTIONS]\n"
      "Install, uninstall and list kernels according to the bootloader spec\n"
      "\n"
      "command options, exactly one must be present:\n"
      "\n"
      "-a, --add                      Add a new boot entry\n"
      "-r, --remove[=num]             Remove a boot entry. If <num> is not "
      "present\n"
      "                               ask for it interactively\n"
      "-l, --list                     List all available entries\n"
      "-d, --default[=num]            Make an entry the default. If <num> is "
      "not\n"
      "                               present ask for it interactively\n"
      "--once[=num]                   start an entry once\n"
      "\n"
      "other options:\n"
      "\n"
      "--kernel-version=<version>     Specify kernel version, used for "
      "generating\n"
      "                               config filenames/directories. must be "
      "unique\n"
      "                               for each installed operating system\n"
      "--title=<name>                 Title for the entry. If unspecified "
      "defaults\n"
      "                               to \"Linux-<version>\"\n"
      "--machine-id=<id>              Specify machine id. Should be unique for "
      "each\n"
      "                               installation. Can be left unspecified "
      "when it\n"
      "                               can be read from "
      "<rootpath>/etc/machine-id.\n"
      "--kernel=<kernel>              Path to the kernel to install\n"
      "--initrd=<initrd>              Path to the initrd to install, optional\n"
      "--devicetree=<devicetree>      Path to the devicetree to install, "
      "optional\n"
      "-o, --options=<options>        Commandline options for the kernel, can "
      "be\n"
      "                               given multiple times\n"
      "-v, --verbose                  Be more verbose\n"
      "--add-root-option              If present, add a "
      "\"root=PARTUUID=xxxxxxxx-yy\"\n"
      "                               option to the kernel commandline. The "
      "partuuid\n"
      "                               is determined from the device given with "
      "the\n"
      "                               --device option and the partition "
      "number\n"
      "                               determined from either the device "
      "specified\n"
      "                               with --root or from the --num-root-part "
      "option.\n"
      "--num-root-part=<partnum>      Specify partition number for "
      "--add-root-option\n"
      "-h, --help                     This help\n"
      "\n"
      "Options for non-native mode:\n"
      "\n"
      "Each of the following options disables native mode. Useful for "
      "preparing\n"
      "boot media on another host.\n"
      "--device=<devicepath>          Specify device to work on\n"
      "--root=<path|device>           Specify path or device to use as '/', "
      "defaults to '/'\n"
      "--boot=<path|device>           Specify path or device to use as "
      "'/boot', defaults to '/boot'\n",
      name);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [2484 x i8] c"Usage: %s [OPTIONS]\0AInstall, uninstall and list kernels according to the bootloader spec\0A\0Acommand options, exactly one must be present:\0A\0A-a, --add Add a new boot entry\0A-r, --remove[=num] Remove a boot entry. If <num> is not present\0A ask for it interactively\0A-l, --list List all available entries\0A-d, --default[=num] Make an entry the default. If <num> is not\0A present ask for it interactively\0A--once[=num] start an entry once\0A\0Aother options:\0A\0A--kernel-version=<version> Specify kernel version, used for generating\0A config filenames/directories. must be unique\0A for each installed operating system\0A--title=<name> Title for the entry. If unspecified defaults\0A to \22Linux-<version>\22\0A--machine-id=<id> Specify machine id. Should be unique for each\0A installation. Can be left unspecified when it\0A can be read from <rootpath>/etc/machine-id.\0A--kernel=<kernel> Path to the kernel to install\0A--initrd=<initrd> Path to the initrd to install, optional\0A--devicetree=<devicetree> Path to the devicetree to install, optional\0A-o, --options=<options> Commandline options for the kernel, can be\0A given multiple times\0A-v, --verbose Be more verbose\0A--add-root-option If present, add a \22root=PARTUUID=xxxxxxxx-yy\22\0A option to the kernel commandline. The partuuid\0A is determined from the device given with the\0A --device option and the partition number\0A determined from either the device specified\0A with --root or from the --num-root-part option.\0A--num-root-part=<partnum> Specify partition number for --add-root-option\0A-h, --help This help\0A\0AOptions for non-native mode:\0A\0AEach of the following options disables native mode. Useful for preparing\0Aboot media on another host.\0A--device=<devicepath> Specify device to work on\0A--root=<path|device> Specify path or device to use as '/', defaults to '/'\0A--boot=<path|device> Specify path or device to use as '/boot', defaults to '/boot'\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([2484 x i8], [2484 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [2484 x i8] c"Usage: %s [OPTIONS]\0AInstall, uninstall and list kernels according to the bootloader spec\0A\0Acommand options, exactly one must be present:\0A\0A-a, --add Add a new boot entry\0A-r, --remove[=num] Remove a boot entry. If <num> is not present\0A ask for it interactively\0A-l, --list List all available entries\0A-d, --default[=num] Make an entry the default. If <num> is not\0A present ask for it interactively\0A--once[=num] start an entry once\0A\0Aother options:\0A\0A--kernel-version=<version> Specify kernel version, used for generating\0A config filenames/directories. must be unique\0A for each installed operating system\0A--title=<name> Title for the entry. If unspecified defaults\0A to \22Linux-<version>\22\0A--machine-id=<id> Specify machine id. Should be unique for each\0A installation. Can be left unspecified when it\0A can be read from <rootpath>/etc/machine-id.\0A--kernel=<kernel> Path to the kernel to install\0A--initrd=<initrd> Path to the initrd to install, optional\0A--devicetree=<devicetree> Path to the devicetree to install, optional\0A-o, --options=<options> Commandline options for the kernel, can be\0A given multiple times\0A-v, --verbose Be more verbose\0A--add-root-option If present, add a \22root=PARTUUID=xxxxxxxx-yy\22\0A option to the kernel commandline. The partuuid\0A is determined from the device given with the\0A --device option and the partition number\0A determined from either the device specified\0A with --root or from the --num-root-part option.\0A--num-root-part=<partnum> Specify partition number for --add-root-option\0A-h, --help This help\0A\0AOptions for non-native mode:\0A\0AEach of the following options disables native mode. Useful for preparing\0Aboot media on another host.\0A--device=<devicepath> Specify device to work on\0A--root=<path|device> Specify path or device to use as '/', defaults to '/'\0A--boot=<path|device> Specify path or device to use as '/boot', defaults to '/boot'\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([2484 x i8], [2484 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}