#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 *);
void usage(void) {
  printf(
      "usage: corehandler <generate_coredump> <tid> <pid> <sig> <uid> <gid>\n"
      "       corehandler --install [<generate_coredump>]\n"
      "       corehandler --version\n"
      "\n"
      "  First synopsis -- is how the Linux kernel calls corehandler\n"
      "when a process crashes. The coredump is fed to corehandler\n"
      "via stdin.\n"
      "	 <generate_coredump> -- \"1\" to enable generation of a coredump;\n"
      "    <tid>               -- PID of crashed tid;\n"
      "    <pid>               -- PID of process;\n"
      "    <sig>               -- signal received by program;\n"
      "    <uid>               -- UID of process;\n"
      "    <gid>               -- GID of process;\n"
      "\n"
      "  Second synopsis -- hooks up corehandler into system by modifying\n"
      "/proc/sys/kernel/{core_pattern,core_pipe_limit}. If "
      "<generate_coredump>\n"
      "is \"1\", coredumps will be generated in addition to crash reports.\n"
      "\n"
      "  Third synopsis -- allows to retrive corehandler's version.\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [847 x i8] c"usage: corehandler <generate_coredump> <tid> <pid> <sig> <uid> <gid>\0A corehandler --install [<generate_coredump>]\0A corehandler --version\0A\0A First synopsis -- is how the Linux kernel calls corehandler\0Awhen a process crashes. The coredump is fed to corehandler\0Avia stdin.\0A\09 <generate_coredump> -- \221\22 to enable generation of a coredump;\0A <tid> -- PID of crashed tid;\0A <pid> -- PID of process;\0A <sig> -- signal received by program;\0A <uid> -- UID of process;\0A <gid> -- GID of process;\0A\0A Second synopsis -- hooks up corehandler into system by modifying\0A/proc/sys/kernel/{core_pattern,core_pipe_limit}. If <generate_coredump>\0Ais \221\22, coredumps will be generated in addition to crash reports.\0A\0A Third synopsis -- allows to retrive corehandler's version.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([847 x i8], [847 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [846 x i8] c"usage: corehandler <generate_coredump> <tid> <pid> <sig> <uid> <gid>\0A corehandler --install [<generate_coredump>]\0A corehandler --version\0A\0A First synopsis -- is how the Linux kernel calls corehandler\0Awhen a process crashes. The coredump is fed to corehandler\0Avia stdin.\0A\09 <generate_coredump> -- \221\22 to enable generation of a coredump;\0A <tid> -- PID of crashed tid;\0A <pid> -- PID of process;\0A <sig> -- signal received by program;\0A <uid> -- UID of process;\0A <gid> -- GID of process;\0A\0A Second synopsis -- hooks up corehandler into system by modifying\0A/proc/sys/kernel/{core_pattern,core_pipe_limit}. If <generate_coredump>\0Ais \221\22, coredumps will be generated in addition to crash reports.\0A\0A Third synopsis -- allows to retrive corehandler's version.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([846 x i8], [846 x i8]* @str, i64 0, i64 0))
ret void
}