#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 *);
int /*<<< orphan*/ stderr;
void print_help(char *argv[]) {
  fprintf(
      stderr,
      "Usage: %s COMMAND [[ARG] ...]\n"
      "\n"
      "Docker runs your processes as PID1. The kernel doesn't apply default "
      "signal\n"
      "handling to PID1 processes, so if your process doesn't register a "
      "custom\n"
      "signal handler, signals like TERM will just bounce off your process.\n"
      "\n"
      "This can result in cases where sending signals to a `docker run` "
      "process\n"
      "results in the run process exiting, but the container continuing in "
      "the\n"
      "background.\n"
      "\n"
      "A workaround is to wrap your script in this proxy, which runs as PID1. "
      "Your\n"
      "process then runs as some other PID, and the kernel won't treat the "
      "signals\n"
      "that are proxied to them specially.\n"
      "\n"
      "The proxy dies when your process dies, so it must not double-fork or do "
      "other\n"
      "weird things (this is basically a requirement for doing things sanely "
      "in\n"
      "Docker anyway).\n",
      argv[0]);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [765 x i8] c"Usage: %s COMMAND [[ARG] ...]\0A\0ADocker runs your processes as PID1. The kernel doesn't apply default signal\0Ahandling to PID1 processes, so if your process doesn't register a custom\0Asignal handler, signals like TERM will just bounce off your process.\0A\0AThis can result in cases where sending signals to a `docker run` process\0Aresults in the run process exiting, but the container continuing in the\0Abackground.\0A\0AA workaround is to wrap your script in this proxy, which runs as PID1. Your\0Aprocess then runs as some other PID, and the kernel won't treat the signals\0Athat are proxied to them specially.\0A\0AThe proxy dies when your process dies, so it must not double-fork or do other\0Aweird things (this is basically a requirement for doing things sanely in\0ADocker anyway).\0A\00"
define void @print_help(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @stderr
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([765 x i8], [765 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [765 x i8] c"Usage: %s COMMAND [[ARG] ...]\0A\0ADocker runs your processes as PID1. The kernel doesn't apply default signal\0Ahandling to PID1 processes, so if your process doesn't register a custom\0Asignal handler, signals like TERM will just bounce off your process.\0A\0AThis can result in cases where sending signals to a `docker run` process\0Aresults in the run process exiting, but the container continuing in the\0Abackground.\0A\0AA workaround is to wrap your script in this proxy, which runs as PID1. Your\0Aprocess then runs as some other PID, and the kernel won't treat the signals\0Athat are proxied to them specially.\0A\0AThe proxy dies when your process dies, so it must not double-fork or do other\0Aweird things (this is basically a requirement for doing things sanely in\0ADocker anyway).\0A\00"
define void @print_help(i8** nocapture %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %0
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([765 x i8], [765 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}